perf trace: Don't synthesize mmaps unless callchains are enabled

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>
This commit is contained in:
Ian Rogers 2025-10-17 21:59:02 -07:00 committed by Namhyung Kim
parent b4a63b0e73
commit ad1a008bf0

View 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);