All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET v2 0/7] perf inject: Speed build-id injection
@ 2020-09-23  8:05 Namhyung Kim
  2020-09-23  8:05 ` [PATCH 1/7] perf bench: Add build-id injection benchmark Namhyung Kim
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Namhyung Kim @ 2020-09-23  8:05 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: Ingo Molnar, Peter Zijlstra, Mark Rutland, Alexander Shishkin,
	LKML, Stephane Eranian, Ian Rogers

Hello,

This is my second attempt to speed up build-id injection.  As this is
to improve performance, I've added a benchmark for it.  Please look at
the usage in the first commit.

By default, it measures average processing time of 100 MMAP2 events
and 10000 SAMPLE events.  Below is the current result on my laptop.

  $ perf bench internals inject-build-id
  # Running 'internals/inject-build-id' benchmark:
    Average build-id injection took: 22.997 msec (+- 0.067 msec)
    Average time per event: 2.255 usec (+- 0.007 usec)

With this patchset applied, it got this:

  $ perf bench internals inject-build-id
  # Running 'internals/inject-build-id' benchmark:
    Average build-id injection took: 18.441 msec (+- 0.106 msec)
    Average time per event: 1.808 usec (+- 0.010 usec)
    Average build-id-all injection took: 13.451 msec (+- 0.132 msec)
    Average time per event: 1.319 usec (+- 0.013 usec)

Real usecases might be different as it depends on the number of
mmap/sample events as well as how many DSOs are actually hit.

Also please take a look at the last patch which I removed the old
build-id inject logic which seems not used anymore.

This code is available at 'perf/inject-speedup-v2' branch on

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


Thanks
Namhyung


Namhyung Kim (7):
  perf bench: Add build-id injection benchmark
  perf inject: Add missing callbacks in perf_tool
  perf inject: Enter namespace when reading build-id
  perf inject: Do not load map/dso when injecting build-id
  perf inject: Add --buildid-all option
  perf bench: Run inject-build-id with --buildid-all option too
  perf inject: Remove stale build-id processing

 tools/perf/Documentation/perf-inject.txt |   6 +-
 tools/perf/bench/Build                   |   1 +
 tools/perf/bench/bench.h                 |   1 +
 tools/perf/bench/inject-buildid.c        | 432 +++++++++++++++++++++++
 tools/perf/builtin-bench.c               |   1 +
 tools/perf/builtin-inject.c              | 207 ++++++++---
 tools/perf/util/build-id.h               |   4 +
 tools/perf/util/map.c                    |  17 +-
 tools/perf/util/map.h                    |  14 +
 9 files changed, 617 insertions(+), 66 deletions(-)
 create mode 100644 tools/perf/bench/inject-buildid.c

-- 
2.28.0.681.g6f77f65b4e-goog


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2020-09-28 12:31 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23  8:05 [PATCHSET v2 0/7] perf inject: Speed build-id injection Namhyung Kim
2020-09-23  8:05 ` [PATCH 1/7] perf bench: Add build-id injection benchmark Namhyung Kim
2020-09-23 22:13   ` Ian Rogers
2020-09-24  6:23     ` Namhyung Kim
2020-09-23  8:05 ` [PATCH 2/7] perf inject: Add missing callbacks in perf_tool Namhyung Kim
2020-09-23  8:05 ` [PATCH 3/7] perf inject: Enter namespace when reading build-id Namhyung Kim
2020-09-23  8:05 ` [PATCH 4/7] perf inject: Do not load map/dso when injecting build-id Namhyung Kim
2020-09-24 13:09   ` Jiri Olsa
2020-09-24 13:20     ` Namhyung Kim
2020-09-24 13:44       ` Jiri Olsa
2020-09-24 14:46         ` Namhyung Kim
2020-09-25 14:26           ` Jiri Olsa
2020-09-28 12:31             ` Arnaldo Carvalho de Melo
2020-09-23  8:05 ` [PATCH 5/7] perf inject: Add --buildid-all option Namhyung Kim
2020-09-23 22:16   ` Ian Rogers
2020-09-23  8:05 ` [PATCH 6/7] perf bench: Run inject-build-id with --buildid-all option too Namhyung Kim
2020-09-23 22:17   ` Ian Rogers
2020-09-23  8:05 ` [PATCH 7/7] perf inject: Remove stale build-id processing Namhyung Kim
2020-09-23 14:36   ` Adrian Hunter
2020-09-24  3:51     ` Namhyung Kim
2020-09-24 13:33   ` Jiri Olsa
2020-09-24 14:23     ` Namhyung Kim
2020-09-24 13:35 ` [PATCHSET v2 0/7] perf inject: Speed build-id injection Jiri Olsa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.