From: tipbot@zytor.com (tip-bot for Vineet Gupta)
To: linux-snps-arc@lists.infradead.org
Subject: [tip:perf/core] tools/perf: Handle -EOPNOTSUPP for sampling events
Date: Fri, 3 Jun 2016 03:52:18 -0700 [thread overview]
Message-ID: <tip-dc89e75a9412db5b1105a140182ec1e35a8351b4@git.kernel.org> (raw)
In-Reply-To: <1462786660-2900-2-git-send-email-vgupta@synopsys.com>
Commit-ID: dc89e75a9412db5b1105a140182ec1e35a8351b4
Gitweb: http://git.kernel.org/tip/dc89e75a9412db5b1105a140182ec1e35a8351b4
Author: Vineet Gupta <Vineet.Gupta1 at synopsys.com>
AuthorDate: Mon, 9 May 2016 15:07:39 +0530
Committer: Ingo Molnar <mingo at kernel.org>
CommitDate: Fri, 3 Jun 2016 09:41:11 +0200
tools/perf: Handle -EOPNOTSUPP for sampling events
This allows (with a previous change to the perf error return ABI) for
calling out in userspace the exact reason for perf record failing
when PMU doesn't support overflow interrupts.
Note that this needs to be put ahead of existing precise_ip check as
that gets hit otherwise for the sampling fail case as well.
Signed-off-by: Vineet Gupta <vgupta at synopsys.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
Cc: <acme at redhat.com>
Cc: <linux-snps-arc at lists.infradead.org>
Cc: <vincent.weaver at maine.edu>
Cc: Alexander Shishkin <alexander.shishkin at linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme at redhat.com>
Cc: Jiri Olsa <jolsa at redhat.com>
Cc: Linus Torvalds <torvalds at linux-foundation.org>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Stephane Eranian <eranian at google.com>
Cc: Thomas Gleixner <tglx at linutronix.de>
Cc: Vince Weaver <vincent.weaver at maine.edu>
Cc: Vineet Gupta <Vineet.Gupta1 at synopsys.com>
Link: http://lkml.kernel.org/r/1462786660-2900-2-git-send-email-vgupta at synopsys.com
Signed-off-by: Ingo Molnar <mingo at kernel.org>
---
tools/perf/util/evsel.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 245ac50..8d30cbd 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2384,6 +2384,9 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
"No such device - did you specify an out-of-range profile CPU?");
break;
case EOPNOTSUPP:
+ if (evsel->attr.sample_period != 0)
+ return scnprintf(msg, size, "%s",
+ "PMU Hardware doesn't support sampling/overflow-interrupts.");
if (evsel->attr.precise_ip)
return scnprintf(msg, size, "%s",
"\'precise\' request may not be supported. Try removing 'p' modifier.");
next prev parent reply other threads:[~2016-06-03 10:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 9:37 [RFC 0/2] report perf sampling failing due to PMU lacking overflow intr support Vineet Gupta
2016-05-09 9:37 ` [RFC 1/2] tools/perf: Handle EOPNOTSUPP for sampling events Vineet Gupta
2016-06-03 10:52 ` tip-bot for Vineet Gupta [this message]
2016-05-09 9:37 ` [RFC 2/2] perf/core: change errno for sampling event not supported in hardware Vineet Gupta
2016-05-09 13:54 ` Vince Weaver
2016-05-09 17:23 ` Vineet Gupta
2016-05-11 3:33 ` Vince Weaver
2016-05-11 19:36 ` Peter Zijlstra
2016-05-12 6:28 ` Vineet Gupta
2016-05-12 6:42 ` Peter Zijlstra
2016-05-12 6:54 ` Vineet Gupta
2016-05-12 7:25 ` Peter Zijlstra
2016-05-12 23:04 ` Vince Weaver
2016-05-13 8:36 ` Vineet Gupta
2016-05-30 11:31 ` [PATCH-REBASED 0/2] report perf sampling failing due to PMU lacking overflow intr support Vineet Gupta
2016-05-30 11:31 ` [PATCH-REBASED 1/2] tools/perf: Handle EOPNOTSUPP for sampling events Vineet Gupta
2016-05-30 11:31 ` [PATCH-REBASED 2/2] perf/core: change errno for sampling event not supported in hardware Vineet Gupta
2016-06-03 10:51 ` [tip:perf/core] perf/abi: Change the " tip-bot for Vineet Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-dc89e75a9412db5b1105a140182ec1e35a8351b4@git.kernel.org \
--to=tipbot@zytor.com \
--cc=linux-snps-arc@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox