Skip to contentSkip to conversation

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

PATCH Applied Ian Rogers 3 participants 3 messages Oct 18, 2025 – Oct 20, 2025 perf events

lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

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

Synthesizing mmaps in perf trace is unnecessary unless call chains are being generated.

---
 tools/perf/builtin-trace.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/perf/builtin-trace.c +3 -1
index c607f39b8c8b..a743bda294bd 100644
@@ -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);
Signature · 1 line
2.51.0.858.gf9c4a03a3a-goog
Acked-by on v1 1/1
#1 lore raw

Hi Ian,

(It's been a while, forgot to switch on plain text mode)

Quoted 5 lines · Ian Rogers

Synthesizing mmaps in perf trace is unnecessary unless call chains are being generated.

Thanks,
Howard

Quoted 23 lines
---
 tools/perf/builtin-trace.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/perf/builtin-trace.c +3 -2
index c607f39b8c8b..a743bda294bd 100644
@@ -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);
--

2.51.0.858.gf9c4a03a3a-goog

maintainer Applied
#2 lore raw
In reply to Ian Rogers
Quoted 4 lines · Ian Rogers

Synthesizing mmaps in perf trace is unnecessary unless call chains are being generated.

Applied to perf-tools-next, thanks!

Best regards,
Namhyung