lkml.org 
[lkml]   [2016]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH perf/core v13 06/15] perf buildid-cache: Scan and import user SDT events to probe cache
On Fri, 1 Jul 2016 15:22:01 -0300
Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Em Fri, Jul 01, 2016 at 05:04:10PM +0900, Masami Hiramatsu escreveu:
> > From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> >
> > perf buildid-cache --add <binary> scans given binary and add
> > the SDT events to probe cache. "sdt_" prefix is appended for
> > all SDT providers to avoid event-name clash with other pre-defined
> > events. It is possible to use the cached SDT events as other cached
> > events, via perf probe --add "sdt_<provider>:<event>=<event>".
> >
> > e.g.
> > ----
> > # perf buildid-cache --add /lib/libc-2.17.so
> > # perf probe --cache --list | head -n 5
> > /usr/lib/libc-2.17.so (a6fb821bdf53660eb2c29f778757aef294d3d392):
> > sdt_libc:setjmp=setjmp
> > sdt_libc:longjmp=longjmp
> > sdt_libc:longjmp_target=longjmp_target
> > sdt_libc:memory_heap_new=memory_heap_new
> > # perf probe -x /usr/lib/libc-2.17.so \
> > -a sdt_libc:memory_heap_new=memory_heap_new
>
> Why not remove the need for that build-cache --add? I.e. go straight to:
>
> perf probe -x /usr/lib/libc-2.17.so -a sdt_libc:memory_heap_new=memory_heap_new
>
> And all the various steps above be done automagically?

Ah, this has been done :) Yes, you can do that already.

See commit dd975497ad ("perf probe: Introduce perf_cache interfaces")
which introduces probe cache and it automatically add the target
binary to the buildid-cache.

Thank you,


--
Masami Hiramatsu <mhiramat@kernel.org>

\
 
 \ /
  Last update: 2016-07-05 04:41    [W:0.061 / U:11.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site