Re: [PATCH perf/core v12 00/16] perf-probe --cache and SDT support
From: Brendan Gregg
Date: Fri Jun 24 2016 - 16:25:55 EST
On Fri, Jun 24, 2016 at 2:05 AM, Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:
> Hi,
>
> Here is the 12th version of the patchset for probe-cache and
> initial SDT support.
>
> Here is the previous v11: https://lkml.org/lkml/2016/6/14/1041
>
> In this version I just rename strlist__for_each to
> strlist__for_each_entry, and change some patch description.
>
I tested it on Node.js (and applied to acme's perf/core), and it works. Thanks!
# perf script
node 36750 [006] 3080.761533:
sdt_node:http__server__request: (da8b0c)
node 36750 [006] 3081.368771:
sdt_node:http__server__request: (da8b0c)
node 36750 [006] 3081.592925:
sdt_node:http__server__request: (da8b0c)
node 36750 [006] 3081.976802:
sdt_node:http__server__request: (da8b0c)
node 36750 [006] 3082.296709:
sdt_node:http__server__request: (da8b0c)
Since it doesn't set the is-enabled semaphore yet, I had to do that
manually for the probes that use it. I know that will be a latter
addition.
# perf list | grep sdt
sdt_node:http__client__request [Tracepoint event]
sdt_node:http__server__request [Tracepoint event]
sdt_node:gc__done [SDT event]
sdt_node:gc__start [SDT event]
sdt_node:http__client__request [SDT event]
sdt_node:http__client__response [SDT event]
sdt_node:http__server__request [SDT event]
sdt_node:http__server__response [SDT event]
sdt_node:net__server__connection [SDT event]
sdt_node:net__stream__end [SDT event]
It's also a bit weird to see these listed twice, but I understand
what's happening. If this continues to prove confusing, I guess later
on we could change it to exclude listing SDT events that have been
promoted to Tracepoint events, or not list SDT events in "perf list"
at all, leaving them for "perf probe --cache --list".
Anyway, this is great as is, and thanks again.
Brendan
> Thank you,
>
> ---
>
> Hemant Kumar (1):
> perf/sdt: ELF support for SDT
>
> Masami Hiramatsu (15):
> perf probe: Use cache entry if possible
> perf probe: Show all cached probes
> perf probe: Remove caches when --cache is given
> perf probe: Add group name support
> perf buildid-cache: Scan and import user SDT events to probe cache
> perf probe: Accept %sdt and %cached event name
> perf-list: Show SDT and pre-cached events
> perf-list: Skip SDTs placed in invalid binaries
> perf: probe-cache: Add for_each_probe_cache_entry() wrapper
> perf probe: Allow wildcard for cached events
> perf probe: Search SDT/cached event from all probe caches
> perf probe: Support @BUILDID or @FILE suffix for SDT events
> perf probe: Support a special SDT probe format
> perf build: Add sdt feature detection
> perf-test: Add a test case for SDT event
>
>
> tools/perf/Documentation/perf-buildid-cache.txt | 3
> tools/perf/Documentation/perf-probe.txt | 30 +-
> tools/perf/Makefile.perf | 3
> tools/perf/builtin-list.c | 6
> tools/perf/builtin-probe.c | 31 ++
> tools/perf/config/Makefile | 10 +
> tools/perf/tests/Build | 1
> tools/perf/tests/builtin-test.c | 4
> tools/perf/tests/make | 3
> tools/perf/tests/sdt.c | 115 +++++++
> tools/perf/tests/tests.h | 1
> tools/perf/util/build-id.c | 212 +++++++++++++
> tools/perf/util/build-id.h | 4
> tools/perf/util/parse-events.c | 82 +++++
> tools/perf/util/parse-events.h | 2
> tools/perf/util/probe-event.c | 366 +++++++++++++++++++++--
> tools/perf/util/probe-event.h | 1
> tools/perf/util/probe-file.c | 226 +++++++++++++-
> tools/perf/util/probe-file.h | 24 +-
> tools/perf/util/symbol-elf.c | 252 ++++++++++++++++
> tools/perf/util/symbol.h | 22 +
> 21 files changed, 1333 insertions(+), 65 deletions(-)
> create mode 100644 tools/perf/tests/sdt.c
>
> --
> Masami Hiramatsu