From 64eed019f3fce1248cd29443c8a8635d317cb70f Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Mon, 9 Sep 2024 13:37:39 -0700 Subject: perf inject: Lazy build-id mmap2 event insertion Add -B option that lazily inserts mmap2 events thereby dropping all mmap events without samples. This is similar to the behavior of -b where only build_id events are inserted when a dso is accessed in a sample. File size savings can be significant in system-wide mode, consider: $ perf record -g -a -o perf.data sleep 1 $ perf inject -B -i perf.data -o perf.new.data $ ls -al perf.data perf.new.data 5147049 perf.data 2248493 perf.new.data Give test coverage of the new option in pipe test. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anne Macedo Cc: Casey Chen Cc: Colin Ian King Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Sun Haiyong Link: https://lore.kernel.org/r/20240909203740.143492-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/shell/pipe_test.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/perf/tests') diff --git a/tools/perf/tests/shell/pipe_test.sh b/tools/perf/tests/shell/pipe_test.sh index 250574cd68b6..d4c8005ce9b9 100755 --- a/tools/perf/tests/shell/pipe_test.sh +++ b/tools/perf/tests/shell/pipe_test.sh @@ -116,6 +116,7 @@ test_inject_bids() { } test_record_report +test_inject_bids -B test_inject_bids -b test_inject_bids --buildid-all test_inject_bids --mmap2-buildid-all -- cgit v1.2.3