tools lib traceevent: Allow setting an alternative symbol resolver
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 22 Jul 2015 15:36:55 +0000 (12:36 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 24 Jul 2015 01:01:26 +0000 (22:01 -0300)
commit33a2471cc9b7b1fb27ff2031dbaff701644b1a4d
treecb905a193c70d7104182497ebea6450f02bec9c5
parente6ce712634ea038ce42bbb11932b692696756882
tools lib traceevent: Allow setting an alternative symbol resolver

The perf tools have a symbol resolver that includes solving kernel
symbols using either kallsyms or ELF symtabs, and it also is using
libtraceevent to format the trace events fields, including via
subsystem specific plugins, like the "timer" one.

To solve fields like "timer:hrtimer_start"'s "function", libtraceevent
needs a way to map from its value to a function name and addr.

This patch provides a way for tools that already have symbol resolving
facilities to ask libtraceevent to use it when needing to resolve
kernel symbols.

Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-fdx1fazols17w5py26ia3bwh@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/event-parse.c
tools/lib/traceevent/event-parse.h