aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-06-02 23:20:13 -0400
committerJiri Olsa <jolsa@kernel.org>2014-06-07 17:33:36 -0400
commita7c3196c79051f9e1a498f5be8fe6870bde5e55d (patch)
treef20cea545ac8f7faa6bcd9d3c60e0c13437bb35f /tools/lib
parent82b897782d10fcc4930c9d4a15b175348fdd2871 (diff)
tools lib traceevent: Add flag to not load event plugins
Add a flag to pevent that will let the callers be able to set it and keep the system, and perhaps even normal plugins from being loaded. This is useful when plugins might hide certain information and seeing the raw events shows what may be going on. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Acked-by: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/20140603032223.678098063@goodmis.org Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/traceevent/event-parse.h2
-rw-r--r--tools/lib/traceevent/event-plugin.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index feab94281634..a68ec3d8289f 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -354,6 +354,8 @@ enum pevent_func_arg_type {
354 354
355enum pevent_flag { 355enum pevent_flag {
356 PEVENT_NSEC_OUTPUT = 1, /* output in NSECS */ 356 PEVENT_NSEC_OUTPUT = 1, /* output in NSECS */
357 PEVENT_DISABLE_SYS_PLUGINS = 1 << 1,
358 PEVENT_DISABLE_PLUGINS = 1 << 2,
357}; 359};
358 360
359#define PEVENT_ERRORS \ 361#define PEVENT_ERRORS \
diff --git a/tools/lib/traceevent/event-plugin.c b/tools/lib/traceevent/event-plugin.c
index 0c8bf6780e4d..317466bd1a37 100644
--- a/tools/lib/traceevent/event-plugin.c
+++ b/tools/lib/traceevent/event-plugin.c
@@ -148,12 +148,17 @@ load_plugins(struct pevent *pevent, const char *suffix,
148 char *path; 148 char *path;
149 char *envdir; 149 char *envdir;
150 150
151 if (pevent->flags & PEVENT_DISABLE_PLUGINS)
152 return;
153
151 /* 154 /*
152 * If a system plugin directory was defined, 155 * If a system plugin directory was defined,
153 * check that first. 156 * check that first.
154 */ 157 */
155#ifdef PLUGIN_DIR 158#ifdef PLUGIN_DIR
156 load_plugins_dir(pevent, suffix, PLUGIN_DIR, load_plugin, data); 159 if (!(pevent->flags & PEVENT_DISABLE_SYS_PLUGINS))
160 load_plugins_dir(pevent, suffix, PLUGIN_DIR,
161 load_plugin, data);
157#endif 162#endif
158 163
159 /* 164 /*