diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2014-06-02 23:20:13 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2015-03-24 15:21:37 -0400 |
commit | 1a74d14a116eb53de1d32b0c329b222ebf6bc52d (patch) | |
tree | 1e34f8468612a4a2dcd9fa763beef14846b1bf43 | |
parent | e414891c645a21e87ab837d3fc7bf858617868f5 (diff) | |
download | trace-cmd-1a74d14a116eb53de1d32b0c329b222ebf6bc52d.tar.gz |
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>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | event-parse.h | 2 | ||||
-rw-r--r-- | event-plugin.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/event-parse.h b/event-parse.h index ce887415..18fd8c3a 100644 --- a/event-parse.h +++ b/event-parse.h @@ -365,6 +365,8 @@ enum pevent_func_arg_type { enum pevent_flag { PEVENT_NSEC_OUTPUT = 1, /* output in NSECS */ + PEVENT_DISABLE_SYS_PLUGINS = 1 << 1, + PEVENT_DISABLE_PLUGINS = 1 << 2, }; #define PEVENT_ERRORS \ diff --git a/event-plugin.c b/event-plugin.c index 0236bd26..136162c0 100644 --- a/event-plugin.c +++ b/event-plugin.c @@ -344,12 +344,17 @@ load_plugins(struct pevent *pevent, const char *suffix, char *path; char *envdir; + if (pevent->flags & PEVENT_DISABLE_PLUGINS) + return; + /* * If a system plugin directory was defined, * check that first. */ #ifdef PLUGIN_DIR - load_plugins_dir(pevent, suffix, PLUGIN_DIR, load_plugin, data); + if (!(pevent->flags & PEVENT_DISABLE_SYS_PLUGINS)) + load_plugins_dir(pevent, suffix, PLUGIN_DIR, + load_plugin, data); #endif /* |