summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2026-04-02 02:05:09 +0300
committerNamhyung Kim <namhyung@kernel.org>2026-04-02 22:51:09 +0300
commit4cbceeca56386256dbb5d1ce657c81ba03275ee0 (patch)
tree17f4e33fe7f2cb076d4d1f08d5af72b064399746
parentb5708a308a5602d4a3caf0720dce452082d443ec (diff)
downloadlinux-4cbceeca56386256dbb5d1ce657c81ba03275ee0.tar.xz
perf trace: Skip unnecessary synthesis for summary-only mode
It needs to synthesize task info for the comm name. The mmap information is only needed for callchain symbolization which is not used by the summary mode. Also total or cgroup summary mode don't require the task info. Let's skip the processing if possible. Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
-rw-r--r--tools/perf/builtin-trace.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index f487fbaa0ad6..d121640ace6e 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2004,9 +2004,13 @@ static int trace__symbols_init(struct trace *trace, int argc, const char **argv,
if (err < 0)
goto out;
+ if (trace->summary_only && trace->summary_mode != SUMMARY__BY_THREAD)
+ goto out;
+
err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target,
evlist->core.threads, trace__tool_process,
- /*needs_mmap=*/callchain_param.enabled,
+ /*needs_mmap=*/callchain_param.enabled &&
+ !trace->summary_only,
/*mmap_data=*/false,
/*nr_threads_synthesize=*/1);
out: