kernel_optimize_test/tools/perf
David Ahern 20d23aaa31 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 <dsahern@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1336490956-57145-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-05-09 14:14:41 -03:00
..
arch perf tools: Use scnprintf where applicable 2012-03-14 12:36:19 -03:00
bench
config perf report: Add a simple GTK2-based 'perf report' browser 2012-03-19 15:13:29 -03:00
Documentation perf report: Add a simple GTK2-based 'perf report' browser 2012-03-19 15:13:29 -03:00
python
scripts
util perf build-id: Fix filename size calculation 2012-05-01 14:13:00 -03:00
.gitignore perf tools: Ignore auto-generated bison/flex files 2012-04-14 13:50:39 -03:00
builtin-annotate.c
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-diff.c perf diff: Fix to work with new hists design 2012-03-22 15:12:09 -03:00
builtin-evlist.c
builtin-help.c
builtin-inject.c
builtin-kmem.c
builtin-kvm.c
builtin-list.c
builtin-lock.c
builtin-probe.c
builtin-record.c perf record: Add HEADER_BRANCH_STACK tag 2012-03-09 08:26:08 +01:00
builtin-report.c perf report: Fix crash showing warning related to kernel maps 2012-04-16 11:18:22 -03:00
builtin-sched.c perf tools: Fix getrusage() related build failure on glibc trunk 2012-04-04 11:59:00 +02:00
builtin-script.c
builtin-stat.c perf stat: handle ENXIO error for perf_event_open 2012-05-09 14:14:41 -03:00
builtin-test.c perf tools: Add 'G' and 'H' modifiers to event parsing 2012-04-17 11:20:23 -03:00
builtin-timechart.c
builtin-top.c perf annotate: Validate addr in symbol__inc_addr_samples 2012-04-05 19:51:14 -03:00
builtin.h
command-list.txt
CREDITS
design.txt
Makefile perf: Turn off compiler warnings for flex and bison generated files 2012-05-07 10:03:01 +02:00
MANIFEST
perf-archive.sh perf archive: Correct cutting of symbolic link 2012-04-14 13:52:15 -03:00
perf.c
perf.h Merge branch 'perf/urgent' into perf/core 2012-03-22 15:09:08 -03:00