|
@@ -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");
|