diff options
| author | David Ahern <[email protected]> | 2012-05-08 15:29:16 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2012-05-09 17:14:41 +0000 |
| commit | 20d23aaa31da295378abff4272716e3dfc72baf0 (patch) | |
| tree | e7d5a8be4425eb97ac1a396c7b0f08079259d861 /tools/perf/util/scripting-engines/trace-event-perl.c | |
| parent | perf: Turn off compiler warnings for flex and bison generated files (diff) | |
| download | kernel-20d23aaa31da295378abff4272716e3dfc72baf0.tar.gz kernel-20d23aaa31da295378abff4272716e3dfc72baf0.zip | |
perf stat: handle ENXIO error for perf_event_open
perf stat on PPC currently fails to run:
$ perf stat -- sleep 1
Error: open_counter returned with 6 (No such device or address). /bin/dmesg may provide additional information.
Fatal: Not all events could be opened.
The problem is that until 2.6.37 (behavior changed with commit b0a873e)
perf on PPC returns ENXIO when hw_perf_event_init() fails. With this
patch we get the expected behavior:
$ perf stat -v -- sleep 1
cycles event is not supported by the kernel.
stalled-cycles-frontend event is not supported by the kernel.
stalled-cycles-backend event is not supported by the kernel.
instructions event is not supported by the kernel.
branches event is not supported by the kernel.
branch-misses event is not supported by the kernel.
...
Signed-off-by: David Ahern <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions
