提交 114bc191 编写于 作者: K Kim Phillips 提交者: Arnaldo Carvalho de Melo

perf evsel: Say which PMU Hardware event doesn't support sampling/overflow-interrupts

Help identify to the user the event with the unsupported sampling error.
Also suggest a corrective action.

BEFORE:

$ sudo ./oldperf record -e armv8_pmuv3/mem_access/,ccn/cycles/,armv8_pmuv3/l2d_cache/ true
Error:
PMU Hardware doesn't support sampling/overflow-interrupts.

AFTER:

$ sudo ./newperf record -e armv8_pmuv3/mem_access/,ccn/cycles/,armv8_pmuv3/l2d_cache/ true
Error:
ccn/cycles/: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'
Signed-off-by: NKim Phillips <kim.phillips@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20171114150452.e846f2e23684c7d7d8ee706f@arm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 239fb4fe
...@@ -2745,8 +2745,9 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target, ...@@ -2745,8 +2745,9 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
break; break;
case EOPNOTSUPP: case EOPNOTSUPP:
if (evsel->attr.sample_period != 0) if (evsel->attr.sample_period != 0)
return scnprintf(msg, size, "%s", return scnprintf(msg, size,
"PMU Hardware doesn't support sampling/overflow-interrupts."); "%s: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'",
perf_evsel__name(evsel));
if (evsel->attr.precise_ip) if (evsel->attr.precise_ip)
return scnprintf(msg, size, "%s", return scnprintf(msg, size, "%s",
"\'precise\' request may not be supported. Try removing 'p' modifier."); "\'precise\' request may not be supported. Try removing 'p' modifier.");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册