public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] perf inject: With --convert-callchain ignore the dummy event for dwarf stacks
@ 2026-01-22 17:58 Ian Rogers
  2026-01-23 16:49 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Rogers @ 2026-01-22 17:58 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, James Clark, linux-perf-users, linux-kernel

On hybrid systems there is generally >1 event and a dummy event. The
perf inject --convert-callchain option is failing to convert perf.data
files on such systems reporting "--convert-callchain requires DWARF
call graph." The failing event is the dummy event that doesn't need to
be set up for samples. As such ignore this event when checking the
evsels.

Fixes: 92ea788d2af4 ("perf inject: Add --convert-callchain option")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/builtin-inject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index c89ac85ec112..ea3ac35256ce 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -2727,7 +2727,7 @@ int cmd_inject(int argc, const char **argv)
 		}
 
 		evlist__for_each_entry(inject.session->evlist, evsel) {
-			if (!evsel__has_dwarf_callchain(evsel)) {
+			if (!evsel__has_dwarf_callchain(evsel) && !evsel__is_dummy_event(evsel)) {
 				pr_err("--convert-callchain requires DWARF call graph.\n");
 				goto out_delete;
 			}
-- 
2.52.0.457.g6b5491de43-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] perf inject: With --convert-callchain ignore the dummy event for dwarf stacks
  2026-01-22 17:58 [PATCH v1] perf inject: With --convert-callchain ignore the dummy event for dwarf stacks Ian Rogers
@ 2026-01-23 16:49 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2026-01-23 16:49 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Peter Zijlstra, Ingo Molnar, Namhyung Kim, Alexander Shishkin,
	Jiri Olsa, Adrian Hunter, James Clark, linux-perf-users,
	linux-kernel

On Thu, Jan 22, 2026 at 09:58:46AM -0800, Ian Rogers wrote:
> On hybrid systems there is generally >1 event and a dummy event. The
> perf inject --convert-callchain option is failing to convert perf.data
> files on such systems reporting "--convert-callchain requires DWARF
> call graph." The failing event is the dummy event that doesn't need to
> be set up for samples. As such ignore this event when checking the
> evsels.
> 
> Fixes: 92ea788d2af4 ("perf inject: Add --convert-callchain option")



Thanks, applied to perf-tools-next,

- Arnaldo

> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/builtin-inject.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
> index c89ac85ec112..ea3ac35256ce 100644
> --- a/tools/perf/builtin-inject.c
> +++ b/tools/perf/builtin-inject.c
> @@ -2727,7 +2727,7 @@ int cmd_inject(int argc, const char **argv)
>  		}
>  
>  		evlist__for_each_entry(inject.session->evlist, evsel) {
> -			if (!evsel__has_dwarf_callchain(evsel)) {
> +			if (!evsel__has_dwarf_callchain(evsel) && !evsel__is_dummy_event(evsel)) {
>  				pr_err("--convert-callchain requires DWARF call graph.\n");
>  				goto out_delete;
>  			}
> -- 
> 2.52.0.457.g6b5491de43-goog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-23 16:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22 17:58 [PATCH v1] perf inject: With --convert-callchain ignore the dummy event for dwarf stacks Ian Rogers
2026-01-23 16:49 ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox