aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2012-09-20 12:19:45 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-09-20 13:44:17 -0400
commit1863fbbb781b1129da0cfdad46ef875370a34117 (patch)
tree5ba7b070ff5a21f8d4c2f0cea4c021a09c252ef8 /tools/perf/builtin-record.c
parent8f28f19a87cb48d13570ba774a3e85776eb36bb4 (diff)
perf record: Print event causing perf_event_open() to fail
Got tired of not getting the event that caused the perf_event_open() syscall to fail. So I fixed the error message. This is very useful when monitoring lots of events in a single run. Signed-off-by: Stephane Eranian <eranian@google.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20120920161945.GA7064@quad Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index c643ed669ef..2cb74343de3 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -297,8 +297,10 @@ try_again:
297 } 297 }
298 298
299 printf("\n"); 299 printf("\n");
300 error("sys_perf_event_open() syscall returned with %d (%s). /bin/dmesg may provide additional information.\n", 300 error("sys_perf_event_open() syscall returned with %d "
301 err, strerror(err)); 301 "(%s) for event %s. /bin/dmesg may provide "
302 "additional information.\n",
303 err, strerror(err), perf_evsel__name(pos));
302 304
303#if defined(__i386__) || defined(__x86_64__) 305#if defined(__i386__) || defined(__x86_64__)
304 if (attr->type == PERF_TYPE_HARDWARE && 306 if (attr->type == PERF_TYPE_HARDWARE &&