From: Ian Rogers Date: Thu, 22 Jan 2026 17:58:46 +0000 (-0800) Subject: perf inject: With --convert-callchain ignore the dummy event for dwarf stacks X-Git-Tag: v7.0-rc1~16^2~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e786a04b4a5461dd7e2829422314a5a6d5a664d9;p=thirdparty%2Flinux.git perf inject: With --convert-callchain ignore the dummy event for dwarf stacks 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 Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 2c9456614cde..5b29f4296861 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c @@ -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; }