[PATCH v1] perf trace: Don't synthesize mmaps unless callchains are enabled

Ian Rogers posted 1 patch 3 months, 3 weeks ago
tools/perf/builtin-trace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[PATCH v1] perf trace: Don't synthesize mmaps unless callchains are enabled
Posted by Ian Rogers 3 months, 3 weeks ago
Synthesizing mmaps in perf trace is unnecessary unless call chains are
being generated.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/builtin-trace.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index c607f39b8c8b..a743bda294bd 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -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
Re: [PATCH v1] perf trace: Don't synthesize mmaps unless callchains are enabled
Posted by Namhyung Kim 3 months, 2 weeks ago
On Fri, 17 Oct 2025 21:59:02 -0700, Ian Rogers wrote:

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

Applied to perf-tools-next, thanks!

Best regards,
Namhyung
Re: [PATCH v1] perf trace: Don't synthesize mmaps unless callchains are enabled
Posted by Howard Chu 3 months, 3 weeks ago
Hi Ian,

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

On Fri, Oct 17, 2025 at 9:59 PM Ian Rogers <irogers@google.com> wrote:
>
> 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>

Thanks,
Howard

> ---
>  tools/perf/builtin-trace.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> index c607f39b8c8b..a743bda294bd 100644
> --- a/tools/perf/builtin-trace.c
> +++ b/tools/perf/builtin-trace.c
> @@ -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
>
>