]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf inject: With --convert-callchain ignore the dummy event for dwarf stacks
authorIan Rogers <irogers@google.com>
Thu, 22 Jan 2026 17:58:46 +0000 (09:58 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 23 Jan 2026 19:58:39 +0000 (16:58 -0300)
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: 92ea788d2af4e65a ("perf inject: Add --convert-callchain option")
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-inject.c

index 2c9456614cde21d1e357073281e0ec96ee4acf4f..5b29f4296861148cc1cc03683cd4e52e538a69af 100644 (file)
@@ -2729,7 +2729,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;
                        }