* [PATCH] perf record: print event causing perf_event_open() to fail
@ 2012-09-20 16:19 Stephane Eranian
2012-09-27 4:24 ` [tip:perf/core] perf record: Print " tip-bot for Stephane Eranian
0 siblings, 1 reply; 2+ messages in thread
From: Stephane Eranian @ 2012-09-20 16:19 UTC (permalink / raw)
To: linux-kernel; +Cc: acme, peterz, mingo, dsahern
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>
---
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index c643ed6..2cb7434 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -297,8 +297,10 @@ static int perf_record__open(struct perf_record *rec)
}
printf("\n");
- error("sys_perf_event_open() syscall returned with %d (%s). /bin/dmesg may provide additional information.\n",
- err, strerror(err));
+ error("sys_perf_event_open() syscall returned with %d "
+ "(%s) for event %s. /bin/dmesg may provide "
+ "additional information.\n",
+ err, strerror(err), perf_evsel__name(pos));
#if defined(__i386__) || defined(__x86_64__)
if (attr->type == PERF_TYPE_HARDWARE &&
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip:perf/core] perf record: Print event causing perf_event_open() to fail
2012-09-20 16:19 [PATCH] perf record: print event causing perf_event_open() to fail Stephane Eranian
@ 2012-09-27 4:24 ` tip-bot for Stephane Eranian
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Stephane Eranian @ 2012-09-27 4:24 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, eranian, hpa, mingo, peterz, dsahern, tglx, mingo
Commit-ID: 1863fbbb781b1129da0cfdad46ef875370a34117
Gitweb: http://git.kernel.org/tip/1863fbbb781b1129da0cfdad46ef875370a34117
Author: Stephane Eranian <eranian@google.com>
AuthorDate: Thu, 20 Sep 2012 18:19:45 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 20 Sep 2012 14:44:17 -0300
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>
---
tools/perf/builtin-record.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index c643ed6..2cb7434 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -297,8 +297,10 @@ try_again:
}
printf("\n");
- error("sys_perf_event_open() syscall returned with %d (%s). /bin/dmesg may provide additional information.\n",
- err, strerror(err));
+ error("sys_perf_event_open() syscall returned with %d "
+ "(%s) for event %s. /bin/dmesg may provide "
+ "additional information.\n",
+ err, strerror(err), perf_evsel__name(pos));
#if defined(__i386__) || defined(__x86_64__)
if (attr->type == PERF_TYPE_HARDWARE &&
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-27 4:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-20 16:19 [PATCH] perf record: print event causing perf_event_open() to fail Stephane Eranian
2012-09-27 4:24 ` [tip:perf/core] perf record: Print " tip-bot for Stephane Eranian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).