diff options
author | Changbin Du <changbin.du@gmail.com> | 2020-08-08 10:31:30 +0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-08-14 09:15:47 -0300 |
commit | a80abe2a9a8a420b4dd88713ba0ad3c163e7a79b (patch) | |
tree | 844592e2162a0b8d0a6a2165b88d28788d77d091 /tools/perf/util/parse-sublevel-options.h | |
parent | perf ftrace: Add option '--inherit' to trace children processes (diff) | |
download | linux-dev-a80abe2a9a8a420b4dd88713ba0ad3c163e7a79b.tar.xz linux-dev-a80abe2a9a8a420b4dd88713ba0ad3c163e7a79b.zip |
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 <changbin.du@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Link: http://lore.kernel.org/lkml/20200808023141.14227-8-changbin.du@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-sublevel-options.h')
-rw-r--r-- | tools/perf/util/parse-sublevel-options.h | 11 |
1 files changed, 11 insertions, 0 deletions
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 |