|
@@ -242,9 +242,13 @@ try_again:
|
|
|
/*
|
|
|
* If it's cycles then fall back to hrtimer
|
|
|
* based cpu-clock-tick sw counter, which
|
|
|
- * is always available even if no PMU support:
|
|
|
+ * is always available even if no PMU support.
|
|
|
+ *
|
|
|
+ * PPC returns ENXIO until 2.6.37 (behavior changed
|
|
|
+ * with commit b0a873e).
|
|
|
*/
|
|
|
- if (err == ENOENT && attr->type == PERF_TYPE_HARDWARE
|
|
|
+ if ((err == ENOENT || err == ENXIO)
|
|
|
+ && attr->type == PERF_TYPE_HARDWARE
|
|
|
&& attr->config == PERF_COUNT_HW_CPU_CYCLES) {
|
|
|
|
|
|
if (verbose)
|