summaryrefslogtreecommitdiffstats
path: root/tools/lib/traceevent/event-parse.h
diff options
context:
space:
mode:
authorTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>2020-07-02 14:53:48 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-07-06 08:35:23 -0300
commit74006289cfedbb2f922fcd6fef7efee232450550 (patch)
tree8bf927a4e719016b70f0d1c506f2c4618f55ff34 /tools/lib/traceevent/event-parse.h
parent662081acfa25edf0d8fabd8021ac26f0d1e2d3a1 (diff)
downloadlinux-74006289cfedbb2f922fcd6fef7efee232450550.tar.bz2
tools lib traceevent: Add interface for options to plugins
Add tep_plugin_add_option() and tep_plugin_print_options() to lib traceevent library that allows plugins to have their own options. For example, the function plugin by default does not print the parent, as it uses the parent to do the indenting. The "parent" option is created by the function plugin that will print the parent of the function like it does in the trace file. The tep_plugin_print_options() will print out the list of options that a Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> plugin has defined. Link: http://lore.kernel.org/linux-trace-devel/20190802110101.14759-3-tz.stoyanov@gmail.com Link: http://lore.kernel.org/linux-trace-devel/20200625100516.365338-5-tz.stoyanov@gmail.com Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185704.092654084@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent/event-parse.h')
-rw-r--r--tools/lib/traceevent/event-parse.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index 776c7c24ee79..02c0438527de 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -406,7 +406,9 @@ char **tep_plugin_list_options(void);
void tep_plugin_free_options_list(char **list);
int tep_plugin_add_options(const char *name,
struct tep_plugin_option *options);
+int tep_plugin_add_option(const char *name, const char *val);
void tep_plugin_remove_options(struct tep_plugin_option *options);
+void tep_plugin_print_options(struct trace_seq *s);
void tep_print_plugins(struct trace_seq *s,
const char *prefix, const char *suffix,
const struct tep_plugin_list *list);