From a80abe2a9a8a420b4dd88713ba0ad3c163e7a79b Mon Sep 17 00:00:00 2001 From: Changbin Du Date: Sat, 8 Aug 2020 10:31:30 +0800 Subject: perf tools: Add general function to parse sublevel options This factors out a general function perf_parse_sublevel_options() to parse sublevel options. The 'sublevel' options is something like the '--debug' options which allow more sublevel options. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-8-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/parse-sublevel-options.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tools/perf/util/parse-sublevel-options.h (limited to 'tools/perf/util/parse-sublevel-options.h') diff --git a/tools/perf/util/parse-sublevel-options.h b/tools/perf/util/parse-sublevel-options.h new file mode 100644 index 000000000000..9b9efcc2aaad --- /dev/null +++ b/tools/perf/util/parse-sublevel-options.h @@ -0,0 +1,11 @@ +#ifndef _PERF_PARSE_SUBLEVEL_OPTIONS_H +#define _PERF_PARSE_SUBLEVEL_OPTIONS_H + +struct sublevel_option { + const char *name; + int *value_ptr; +}; + +int perf_parse_sublevel_options(const char *str, struct sublevel_option *opts); + +#endif \ No newline at end of file -- cgit v1.2.3