aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-sublevel-options.h
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@gmail.com>2020-08-08 10:31:30 +0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-08-14 09:15:47 -0300
commita80abe2a9a8a420b4dd88713ba0ad3c163e7a79b (patch)
tree844592e2162a0b8d0a6a2165b88d28788d77d091 /tools/perf/util/parse-sublevel-options.h
parentperf ftrace: Add option '--inherit' to trace children processes (diff)
downloadlinux-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.h11
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