mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
perf top: Error handling for counter creation should parallel perf-record
5a7ed29 fixed up perf-record but not perf-top. Similar argument holds
for it -- fallback to PMU only if it does not exist and handle invalid
attributes separately.
Signed-off-by: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Robert Richter <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
7405ed10f6
commit
1a31fc904f
1 changed files with 4 additions and 2 deletions
|
|
@ -943,8 +943,10 @@ try_again:
|
|||
* based cpu-clock-tick sw counter, which
|
||||
* is always available even if no PMU support:
|
||||
*/
|
||||
if (attr->type == PERF_TYPE_HARDWARE &&
|
||||
attr->config == PERF_COUNT_HW_CPU_CYCLES) {
|
||||
if ((err == ENOENT || err == ENXIO) &&
|
||||
(attr->type == PERF_TYPE_HARDWARE) &&
|
||||
(attr->config == PERF_COUNT_HW_CPU_CYCLES)) {
|
||||
|
||||
if (verbose)
|
||||
ui__warning("Cycles event not supported,\n"
|
||||
"trying to fall back to cpu-clock-ticks\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue