[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131121065820.7e9855c5@gandalf.local.home>
Date: Thu, 21 Nov 2013 06:58:20 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Jiri Olsa <jolsa@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Namhyung Kim <namhyung@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
David Ahern <dsahern@...il.com>
Subject: Re: [PATCH 01/22] tools lib traceevent: Add plugin support
On Thu, 21 Nov 2013 12:00:59 +0100
Jiri Olsa <jolsa@...hat.com> wrote:
> 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 enahnce 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 vairable. 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@...hat.com>
> Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Ingo Molnar <mingo@...e.hu>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> Cc: Steven Rostedt <rostedt@...dmis.org>
As I authored the original code, you can add my:
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
-- Steve
> Cc: David Ahern <dsahern@...il.com>
> ---
> tools/lib/traceevent/Makefile | 6 +-
> tools/lib/traceevent/event-parse.h | 5 +
> tools/lib/traceevent/event-plugin.c | 202 ++++++++++++++++++++++++++++++++++++
> 3 files changed, 212 insertions(+), 1 deletion(-)
> create mode 100644 tools/lib/traceevent/event-plugin.c
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists