From: Arnaldo Carvalho de Melo Date: Wed, 22 Jul 2015 19:16:16 +0000 (-0300) Subject: perf trace: Provide libtracevent with a kernel symbol resolver X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=706c3da409dfc6964740ac503c040c4c621954fd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf trace: Provide libtracevent with a kernel symbol resolver So that beautifiers wanting to resolve kernel function addresses to names can do its work, now, for instance, the 'timer' tracepoints beautifiers works with 'perf trace', see the "function=tick..." part: # perf trace --event timer:hrtimer_start 0.000 timer:hrtimer_start:hrtimer=0xffff88026f3101c0 function=tick_sched_timer/0x0 expires=52098339000000 softexpires=52098339000000) 0.003 timer:hrtimer_start:hrtimer=0xffff88026f3101c0 function=tick_sched_timer/0x0 expires=52098339000000 softexpires=52098339000000) Reported-by: Thomas Gleixner Acked-by: David Ahern Cc: Adrian Hunter Cc: Borislav Petkov Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Steven Rostedt Link: http://lkml.kernel.org/n/tip-n4i0hxpbl1tnleiqkok47fw2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 32b4d280af4f..282841b10f24 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1489,6 +1489,9 @@ static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist) if (trace->host == NULL) return -ENOMEM; + if (trace_event__register_resolver(trace->host) < 0) + return -errno; + err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target, evlist->threads, trace__tool_process, false, trace->opts.proc_map_timeout);