From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: linux-perf-users@vger.kernel.org
Cc: peterz@infradead.org, acme@redhat.com,
linux-kernel@vger.kernel.org, mingo@kernel.org,
vincent.weaver@maine.edu, linux-snps-arc@lists.infradead.org,
Alexey.Brodkin@synopsys.com,
Vineet Gupta <Vineet.Gupta1@synopsys.com>
Subject: [PATCH-REBASED 1/2] tools/perf: Handle EOPNOTSUPP for sampling events
Date: Mon, 30 May 2016 17:01:45 +0530 [thread overview]
Message-ID: <1464607906-16012-2-git-send-email-vgupta@synopsys.com> (raw)
In-Reply-To: <1464607906-16012-1-git-send-email-vgupta@synopsys.com>
This allows (with next change to perf core) for calling out in userspace
the exact reason for perf record failing when PMU doesn't support
overflow interrupts
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
tools/perf/util/evsel.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 5d7037ef7d3b..1578e67c7357 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2372,6 +2372,13 @@ 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:
+ /*
+ * Needs to be tested ahead of precise_ip check as
+ * that seems to be true for this case as well
+ */
+ 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.");
--
2.5.0
WARNING: multiple messages have this Message-ID (diff)
From: Vineet.Gupta1@synopsys.com (Vineet Gupta)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH-REBASED 1/2] tools/perf: Handle EOPNOTSUPP for sampling events
Date: Mon, 30 May 2016 17:01:45 +0530 [thread overview]
Message-ID: <1464607906-16012-2-git-send-email-vgupta@synopsys.com> (raw)
In-Reply-To: <1464607906-16012-1-git-send-email-vgupta@synopsys.com>
This allows (with next change to perf core) for calling out in userspace
the exact reason for perf record failing when PMU doesn't support
overflow interrupts
Signed-off-by: Vineet Gupta <vgupta at synopsys.com>
---
tools/perf/util/evsel.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 5d7037ef7d3b..1578e67c7357 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2372,6 +2372,13 @@ 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:
+ /*
+ * Needs to be tested ahead of precise_ip check as
+ * that seems to be true for this case as well
+ */
+ 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.");
--
2.5.0
WARNING: multiple messages have this Message-ID (diff)
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: <linux-perf-users@vger.kernel.org>
Cc: <peterz@infradead.org>, <acme@redhat.com>,
<linux-kernel@vger.kernel.org>, <mingo@kernel.org>,
<vincent.weaver@maine.edu>, <linux-snps-arc@lists.infradead.org>,
<Alexey.Brodkin@synopsys.com>,
Vineet Gupta <Vineet.Gupta1@synopsys.com>
Subject: [PATCH-REBASED 1/2] tools/perf: Handle EOPNOTSUPP for sampling events
Date: Mon, 30 May 2016 17:01:45 +0530 [thread overview]
Message-ID: <1464607906-16012-2-git-send-email-vgupta@synopsys.com> (raw)
In-Reply-To: <1464607906-16012-1-git-send-email-vgupta@synopsys.com>
This allows (with next change to perf core) for calling out in userspace
the exact reason for perf record failing when PMU doesn't support
overflow interrupts
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
tools/perf/util/evsel.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 5d7037ef7d3b..1578e67c7357 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2372,6 +2372,13 @@ 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:
+ /*
+ * Needs to be tested ahead of precise_ip check as
+ * that seems to be true for this case as well
+ */
+ 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.");
--
2.5.0
next prev parent reply other threads:[~2016-05-30 11:32 UTC|newest]
Thread overview: 48+ 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 ` Vineet Gupta
2016-05-09 9:37 ` Vineet Gupta
2016-05-09 9:37 ` [RFC 1/2] tools/perf: Handle EOPNOTSUPP for sampling events Vineet Gupta
2016-05-09 9:37 ` Vineet Gupta
2016-05-09 9:37 ` Vineet Gupta
2016-06-03 10:52 ` [tip:perf/core] tools/perf: Handle -EOPNOTSUPP " tip-bot for Vineet Gupta
2016-06-03 10:52 ` tip-bot for Vineet Gupta
2016-05-09 9:37 ` [RFC 2/2] perf/core: change errno for sampling event not supported in hardware Vineet Gupta
2016-05-09 9:37 ` Vineet Gupta
2016-05-09 9:37 ` Vineet Gupta
2016-05-09 13:54 ` Vince Weaver
2016-05-09 13:54 ` Vince Weaver
2016-05-09 17:23 ` Vineet Gupta
2016-05-09 17:23 ` Vineet Gupta
2016-05-11 3:33 ` Vince Weaver
2016-05-11 3:33 ` Vince Weaver
2016-05-11 19:36 ` Peter Zijlstra
2016-05-11 19:36 ` Peter Zijlstra
2016-05-11 19:36 ` Peter Zijlstra
2016-05-12 6:28 ` Vineet Gupta
2016-05-12 6:28 ` Vineet Gupta
2016-05-12 6:28 ` Vineet Gupta
2016-05-12 6:42 ` Peter Zijlstra
2016-05-12 6:42 ` Peter Zijlstra
2016-05-12 6:42 ` Peter Zijlstra
2016-05-12 6:54 ` Vineet Gupta
2016-05-12 6:54 ` Vineet Gupta
2016-05-12 6:54 ` Vineet Gupta
2016-05-12 7:25 ` Peter Zijlstra
2016-05-12 7:25 ` Peter Zijlstra
2016-05-12 7:25 ` Peter Zijlstra
2016-05-12 23:04 ` Vince Weaver
2016-05-12 23:04 ` Vince Weaver
2016-05-13 8:36 ` Vineet Gupta
2016-05-13 8:36 ` Vineet Gupta
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 ` Vineet Gupta
2016-05-30 11:31 ` Vineet Gupta
2016-05-30 11:31 ` Vineet Gupta [this message]
2016-05-30 11:31 ` [PATCH-REBASED 1/2] tools/perf: Handle EOPNOTSUPP for sampling events Vineet Gupta
2016-05-30 11:31 ` 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-05-30 11:31 ` Vineet Gupta
2016-05-30 11:31 ` Vineet Gupta
2016-06-03 10:51 ` [tip:perf/core] perf/abi: Change the " tip-bot for Vineet Gupta
2016-06-03 10:51 ` 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=1464607906-16012-2-git-send-email-vgupta@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=Alexey.Brodkin@synopsys.com \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=vincent.weaver@maine.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.