* [PATCH v2] perf trace: Skip unnecessary synthesis for summary-only mode
@ 2026-04-01 23:05 Namhyung Kim
2026-04-01 23:21 ` Ian Rogers
2026-04-02 21:57 ` Namhyung Kim
0 siblings, 2 replies; 3+ messages in thread
From: Namhyung Kim @ 2026-04-01 23:05 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, James Clark
Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
linux-perf-users
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.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
v2) minimize the diff (Ian)
tools/perf/builtin-trace.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index f487fbaa0ad60028..d121640ace6e1456 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:
--
2.53.0.1213.gd9a14994de-goog
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] perf trace: Skip unnecessary synthesis for summary-only mode
2026-04-01 23:05 [PATCH v2] perf trace: Skip unnecessary synthesis for summary-only mode Namhyung Kim
@ 2026-04-01 23:21 ` Ian Rogers
2026-04-02 21:57 ` Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: Ian Rogers @ 2026-04-01 23:21 UTC (permalink / raw)
To: Namhyung Kim
Cc: Arnaldo Carvalho de Melo, James Clark, Jiri Olsa, Adrian Hunter,
Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users
On Wed, Apr 1, 2026 at 4:05 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> 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.
>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Thanks,
Ian
> ---
> v2) minimize the diff (Ian)
>
> tools/perf/builtin-trace.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> index f487fbaa0ad60028..d121640ace6e1456 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:
> --
> 2.53.0.1213.gd9a14994de-goog
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] perf trace: Skip unnecessary synthesis for summary-only mode
2026-04-01 23:05 [PATCH v2] perf trace: Skip unnecessary synthesis for summary-only mode Namhyung Kim
2026-04-01 23:21 ` Ian Rogers
@ 2026-04-02 21:57 ` Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2026-04-02 21:57 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, James Clark, Namhyung Kim
Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
linux-perf-users
On Wed, 01 Apr 2026 16:05:09 -0700, Namhyung Kim wrote:
> 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.
>
>
Applied to perf-tools-next, thanks!
Best regards,
Namhyung
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-02 21:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-01 23:05 [PATCH v2] perf trace: Skip unnecessary synthesis for summary-only mode Namhyung Kim
2026-04-01 23:21 ` Ian Rogers
2026-04-02 21:57 ` Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®