aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/traceevent/Makefile
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2013-12-03 14:09:16 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-12-04 15:16:44 -0300
commitc877bbd8eceb14c5eac6779cc804fa8b34044736 (patch)
tree78993da56e8c22201cc32d90485c13c8408af910 /tools/lib/traceevent/Makefile
parentperf script: Do not call perf_event__preprocess_sample() twice) (diff)
downloadlinux-dev-c877bbd8eceb14c5eac6779cc804fa8b34044736.tar.xz
linux-dev-c877bbd8eceb14c5eac6779cc804fa8b34044736.zip
tools lib traceevent: Add plugin support
Backporting plugin support for traceevent lib. Backported from Steven Rostedt's trace-cmd repo (HEAD 0f2c2fb): git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git It's now possible to use following interface to load plugins (shared objects) to enhance pevent object functionality. The plugin interface/hooks are as follows: (taken from event-parse.h comments) - 'pevent_plugin_loader' (required) The function name to initialized the plugin. int pevent_plugin_loader(struct pevent *pevent) - 'pevent_plugin_unloader' (optional) The function called just before unloading int pevent_plugin_unloader(void) - 'pevent_plugin_options' (optional) Plugin options that can be set before loading struct plugin_option pevent_plugin_options[] = { { .name = "option-name", .plugin_alias = "overide-file-name", (optional) .description = "description of option to show users", }, { .name = NULL, }, }; Array must end with .name = NULL; The plugin_alias (below) can be used to give a shorter name to access the variable. Useful if a plugin handles more than one event. NOTE options support is not backported yet. - 'pevent_plugin_alias' (optional) The name to use for finding options (uses filename if not defined) New traceevent functions are added to search and load available plugins: struct plugin_list* traceevent_load_plugins(struct pevent *pevent) - loads plusing for 'struct pevent' object and returns loaded plugins list void traceevent_unload_plugins(struct plugin_list *plugin_list); - unload plugin list Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386076182-14484-3-git-send-email-jolsa@redhat.com Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent/Makefile')
-rw-r--r--tools/lib/traceevent/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index fc1502098595..2ccb5bc800e8 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -180,7 +180,11 @@ $(obj)/%.o: $(src)/%.c
%.o: $(src)/%.c
$(Q)$(call do_compile)
-PEVENT_LIB_OBJS = event-parse.o trace-seq.o parse-filter.o parse-utils.o
+PEVENT_LIB_OBJS = event-parse.o
+PEVENT_LIB_OBJS += event-plugin.o
+PEVENT_LIB_OBJS += trace-seq.o
+PEVENT_LIB_OBJS += parse-filter.o
+PEVENT_LIB_OBJS += parse-utils.o
PEVENT_LIB_OBJS += kbuffer-parse.o
ALL_OBJS = $(PEVENT_LIB_OBJS)