• Masami Hiramatsu's avatar
    perf probe: Allow wildcard for cached events · 42bba263
    Masami Hiramatsu authored
    Allo glob wildcard for reusing cached/SDT events. E.g.
    
      # perf probe -x /usr/lib64/libc-2.20.so -a %sdt_libc:\*
    
    This example adds probes for all SDT in libc.
    Note that the SDTs must have been scanned by perf buildid-cache.
    
    Committer note:
    
    Using it to check what of those SDT probes would take place when doing
    a cargo run (rust):
    
      # trace --no-sys --event sdt_libc:* cargo run
         0.000 sdt_libc:setjmp:(7f326b69c4d1))
        28.423 sdt_libc:setjmp:(7f4b0a5364d1))
        29.000 sdt_libc:setjmp:(7f4b0a5364d1))
        88.597 sdt_libc:setjmp:(7fc01fd414d1))
        89.220 sdt_libc:setjmp:(7fc01fd414d1))
        95.501 sdt_libc:setjmp:(7f326b69c4d1))
         Running `target/debug/hello_world`
        97.110 sdt_libc:setjmp:(7f95e09234d1))
      Hello, world!
      #
    Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
    Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
    Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
    Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/146831791813.17065.17846564230840594888.stgit@devboxSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    42bba263
probe-event.c 73.6 KB