lkml.org 
[lkml]   [2018]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf report: Provide libtraceevent with a kernel symbol resolver
On Mon, Jan 15, 2018 at 12:47:32PM +0800, Wang YanQing wrote:
> So that beautifiers wanting to resolve kernel function addresses to
> names can do its work, and when we use "perf report" for output of
> "perf kmem record", we will get kernel symbol output.
>
> Signed-off-by: Wang YanQing <udknight@gmail.com>
> ---
> tools/perf/builtin-report.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index dd4df9a..7b65100 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -1317,6 +1317,15 @@ int cmd_report(int argc, const char **argv)
> report.range_num = 1;
> }
>
> + if (session->tevent.pevent &&
> + pevent_set_function_resolver(session->tevent.pevent,
> + machine__resolve_kernel_addr,
> + &session->machines.host) < 0) {
> + pr_err("%s: failed to set libtraceevent function resolver\n",
> + __func__);
> + return -1;
> + }

why not calling the wrapper trace_event__register_resolver?

jirka

> +
> sort__setup_elide(stdout);
>
> ret = __cmd_report(&report);
> --
> 1.8.5.6.2.g3d8a54e.dirty
>

\
 
 \ /
  Last update: 2018-01-15 11:06    [W:0.103 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site