linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 00/13] perf inject improvements
@ 2024-08-17  6:44 Ian Rogers
  2024-08-17  6:44 ` [PATCH v1 01/13] perf synthetic-events: Avoid unnecessary memset Ian Rogers
                   ` (13 more replies)
  0 siblings, 14 replies; 20+ messages in thread
From: Ian Rogers @ 2024-08-17  6:44 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, Masahiro Yamada,
	Arnd Bergmann, Jann Horn, Colin Ian King, Casey Chen,
	Athira Rajeev, Chaitanya S Prakash, James Clark, Ze Gao,
	Yang Jihong, Yunseong Kim, Weilin Wang, Dominique Martinet,
	Anne Macedo, Sun Haiyong, linux-perf-users, linux-kernel

Fix the existing build id injection by adding sample IDs on to the
synthesized events. This correctly orders the events and addresses
issues such as a profiled executable being replaced during its
execution.

Add a new --mmap2-buildid-all option that rewrites all mmap events as
mmap2 events containing build IDs. This removes the need for build_id
events.

Add a new -B option that like --mmap2-buildid-all synthesizes mmap2
with build id events. With -B the behavior is to do it lazily, so only
when a sample references the particular map. With system wide
profiling that synthesizes mmap events for all running processes the
perf.data file savings can be greater than 50%.

Reduce the memory footprint of perf inject by avoiding creating
symbols in the callchain, the symbols aren't used during perf inject
and necessitate the loading of dsos.

Ian Rogers (13):
  perf synthetic-events: Avoid unnecessary memset
  perf map: API clean up
  perf jit: Constify filename argument
  perf dso: Constify dso_id
  perf evsel: Constify evsel__id_hdr_size argument
  perf test: Expand pipe/inject test
  perf inject: Combine build_ids and build_id_all into enum
  perf inject: Combine different mmap and mmap2 functions
  perf inject: Combine mmap and mmap2 handling
  perf inject: Fix build ID injection
  perf inject: Add new mmap2-buildid-all option
  perf inject: Lazy build-id mmap2 event insertion
  perf callchain: Allow symbols to be optional when resolving a
    callchain

 tools/perf/builtin-inject.c         | 532 ++++++++++++++++++----------
 tools/perf/builtin-top.c            |   2 +-
 tools/perf/tests/shell/pipe_test.sh | 103 ++++--
 tools/perf/tests/vmlinux-kallsyms.c |   4 +-
 tools/perf/util/build-id.c          |   6 +-
 tools/perf/util/callchain.c         |   8 +-
 tools/perf/util/callchain.h         |   2 +-
 tools/perf/util/dso.c               |   4 +-
 tools/perf/util/dso.h               |   4 +-
 tools/perf/util/dsos.c              |  12 +-
 tools/perf/util/dsos.h              |   2 +-
 tools/perf/util/evsel.c             |   2 +-
 tools/perf/util/evsel.h             |   2 +-
 tools/perf/util/jit.h               |   3 +-
 tools/perf/util/jitdump.c           |   6 +-
 tools/perf/util/machine.c           |  95 ++---
 tools/perf/util/machine.h           |  36 +-
 tools/perf/util/map.c               |  25 +-
 tools/perf/util/map.h               |  22 +-
 tools/perf/util/synthetic-events.c  | 103 +++++-
 tools/perf/util/synthetic-events.h  |  21 +-
 21 files changed, 682 insertions(+), 312 deletions(-)

-- 
2.46.0.184.g6999bdac58-goog


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

end of thread, other threads:[~2024-09-03 18:34 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-17  6:44 [PATCH v1 00/13] perf inject improvements Ian Rogers
2024-08-17  6:44 ` [PATCH v1 01/13] perf synthetic-events: Avoid unnecessary memset Ian Rogers
2024-08-17  6:44 ` [PATCH v1 02/13] perf map: API clean up Ian Rogers
2024-08-17  6:44 ` [PATCH v1 03/13] perf jit: Constify filename argument Ian Rogers
2024-08-17  6:44 ` [PATCH v1 04/13] perf dso: Constify dso_id Ian Rogers
2024-08-17  6:44 ` [PATCH v1 05/13] perf evsel: Constify evsel__id_hdr_size argument Ian Rogers
2024-08-17  6:44 ` [PATCH v1 06/13] perf test: Expand pipe/inject test Ian Rogers
2024-08-17  6:44 ` [PATCH v1 07/13] perf inject: Combine build_ids and build_id_all into enum Ian Rogers
2024-08-17  6:44 ` [PATCH v1 08/13] perf inject: Combine different mmap and mmap2 functions Ian Rogers
2024-08-17  6:44 ` [PATCH v1 09/13] perf inject: Combine mmap and mmap2 handling Ian Rogers
2024-08-17  6:44 ` [PATCH v1 10/13] perf inject: Fix build ID injection Ian Rogers
2024-08-19 18:01   ` Arnaldo Carvalho de Melo
2024-08-19 19:54     ` Ian Rogers
2024-08-28 15:15       ` Ian Rogers
2024-09-02 18:26         ` Namhyung Kim
2024-09-03 18:34           ` Arnaldo Carvalho de Melo
2024-08-17  6:44 ` [PATCH v1 11/13] perf inject: Add new mmap2-buildid-all option Ian Rogers
2024-08-17  6:44 ` [PATCH v1 12/13] perf inject: Lazy build-id mmap2 event insertion Ian Rogers
2024-08-17  6:44 ` [PATCH v1 13/13] perf callchain: Allow symbols to be optional when resolving a callchain Ian Rogers
2024-09-02 18:27 ` [PATCH v1 00/13] perf inject improvements Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).