diff options
| author | Ingo Molnar <[email protected]> | 2011-04-28 06:48:42 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2011-04-28 06:48:42 +0000 |
| commit | ede70290046043b2638204cab55e26ea1d0c6cd9 (patch) | |
| tree | b5de51125db7477b18776614923edea00a20fc31 /tools/perf/util/python.c | |
| parent | perf stat: Add --sync/-S option (diff) | |
| download | kernel-ede70290046043b2638204cab55e26ea1d0c6cd9.tar.gz kernel-ede70290046043b2638204cab55e26ea1d0c6cd9.zip | |
perf stat: Fix compatibility behavior
Instead of failing on an unknown event, when new perf stat is run on
older kernels:
$ ./perf stat true
Error: open_counter returned with 22 (Invalid argument). /bin/dmesg
may provide additional information.
Fatal: Not all events could be opened.
Just ignore EINVAL and ENOSYS, we'll print the results as not counted:
Performance counter stats for 'true':
0.239483 task-clock # 0.493 CPUs utilized
0 context-switches # 0.000 M/sec
0 CPU-migrations # 0.000 M/sec
86 page-faults # 0.359 M/sec
704,766 cycles # 2.943 GHz
<not counted> stalled-cycles
381,961 instructions # 0.54 insns per cycle
69,626 branches # 290.735 M/sec
4,594 branch-misses # 6.60% of all branches
0.000485883 seconds time elapsed
Cc: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/util/python.c')
0 files changed, 0 insertions, 0 deletions
