]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
perf trace: Don't synthesize mmaps unless callchains are enabled
authorIan Rogers <irogers@google.com>
Sat, 18 Oct 2025 04:59:02 +0000 (21:59 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Sun, 19 Oct 2025 02:32:30 +0000 (11:32 +0900)
Synthesizing mmaps in perf trace is unnecessary unless call chains are
being generated.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Howard Chu <howardchu95@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/builtin-trace.c

index c607f39b8c8bb0a817dab08dc254e226c97248c9..a743bda294bd34009d6039889e230fb4113351ac 100644 (file)
@@ -2005,7 +2005,9 @@ static int trace__symbols_init(struct trace *trace, int argc, const char **argv,
 
        err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target,
                                            evlist->core.threads, trace__tool_process,
-                                           true, false, 1);
+                                           /*needs_mmap=*/callchain_param.enabled,
+                                           /*mmap_data=*/false,
+                                           /*nr_threads_synthesize=*/1);
 out:
        if (err) {
                perf_env__exit(&trace->host_env);