Skip to content

perf tools: Fix MMAP2 build-ID synthesis in namespaces (v1)

Namhyung Kim linux-perf-users lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4perf tools: Move dsos functions to util/dsos.ctools/perf/util/dsos.c tools/perf/util/dsos.h tools/perf/util/machine.c+32 -292 replies
2/4perf tools: Add perf_event__synthesize_{start,stop}()tools/perf/builtin-inject.c tools/perf/builtin-record.c tools/perf/builtin-stat.c +4 more+25 -02 replies
3/4perf record: Save DSO build-ID for synthesizingtools/perf/util/synthetic-events.c+42 -74 replies
4/4perf tools: Honor namespace when synthesizing build-idtools/perf/util/synthetic-events.c+8 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] perf tools: Fix MMAP2 build-ID synthesis in namespaces (v1)

Hello,

The perf record --buildid-mmap enables PERF_RECORD_MISC_MMAP_BUILD_ID which includes a build-ID of the DSO. It requires to read the info from the file when synthesizing. But I found some issues in the current code that it didn't check duplicate files and didn't handle namespaces.

I think chroot is not a concern since perf will see it from the outside so that it can see the full path.

The code is available at 'perf/mmap2-buildid-fix-v1' branch on

git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Thanks,
Namhyung

Namhyung Kim (4):
perf tools: Move dsos functions to util/dsos.c perf tools: Add perf_event__synthesize_{start,stop}() perf record: Save DSO build-ID for synthesizing perf tools: Honor namespace when synthesizing build-id

 tools/perf/builtin-inject.c        |  3 ++
 tools/perf/builtin-record.c        |  3 ++
 tools/perf/builtin-stat.c          |  2 +
 tools/perf/builtin-top.c           |  4 ++
 tools/perf/util/auxtrace.c         |  2 +
 tools/perf/util/dsos.c             | 29 +++++++++++++
 tools/perf/util/dsos.h             |  3 ++
 tools/perf/util/machine.c          | 29 -------------
 tools/perf/util/synthetic-events.c | 65 ++++++++++++++++++++++++++----
 tools/perf/util/synthetic-events.h |  3 ++
 10 files changed, 107 insertions(+), 36 deletions(-)

base-commit: 62e64c9d2fd12839c02f1b3e8b873e7cb34e8720

Signature · 1 line
2.37.3.968.ga6b4b080e4-goog