Commit e786a04b authored by Ian Rogers's avatar Ian Rogers Committed by Arnaldo Carvalho de Melo
Browse files

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: 92ea788d ("perf inject: Add --convert-callchain option")
Signed-off-by: default avatarIan Rogers <irogers@google.com>
Tested-by: default avatarArnaldo 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent dc329efc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
			}