tools lib traceevent: Add interface for options to plugins
authorTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Thu, 2 Jul 2020 18:53:48 +0000 (14:53 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 6 Jul 2020 11:35:23 +0000 (08:35 -0300)
commit74006289cfedbb2f922fcd6fef7efee232450550
tree8bf927a4e719016b70f0d1c506f2c4618f55ff34
parent662081acfa25edf0d8fabd8021ac26f0d1e2d3a1
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>
tools/lib/traceevent/event-parse.h
tools/lib/traceevent/event-plugin.c