From: tip-bot for Vineet Gupta <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, Vineet.Gupta1@synopsys.com, vgupta@synopsys.com,
mingo@kernel.org, hpa@zytor.com, torvalds@linux-foundation.org,
eranian@google.com, tglx@linutronix.de,
linux-snps-arc@lists.infradead.org, peterz@infradead.org,
alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org,
jolsa@redhat.com, vincent.weaver@maine.edu
Subject: [tip:perf/core] perf/abi: Change the errno for sampling event not supported in hardware
Date: Fri, 3 Jun 2016 03:51:53 -0700 [thread overview]
Message-ID: <tip-a1396555abff9ff9b74c2e4da13e27e81fd094b2@git.kernel.org> (raw)
In-Reply-To: <1462786660-2900-3-git-send-email-vgupta@synopsys.com>
Commit-ID: a1396555abff9ff9b74c2e4da13e27e81fd094b2
Gitweb: http://git.kernel.org/tip/a1396555abff9ff9b74c2e4da13e27e81fd094b2
Author: Vineet Gupta <Vineet.Gupta1@synopsys.com>
AuthorDate: Mon, 9 May 2016 15:07:40 +0530
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 3 Jun 2016 09:40:42 +0200
perf/abi: Change the errno for sampling event not supported in hardware
Change the return code for sampling event not supported from -ENOTSUPP
to -EOPNOTSUPP.
This allows userspace to identify this case specifically, instead of
printing the catch-all error message it did previously.
Technically this is an ABI change, but we think we can get away
with it.
Old behavior:
-------
| # perf record ls
| Error:
| The sys_perf_event_open() syscall returned with 524 (Unknown error 524)
| for event (cycles:ppp).
| /bin/dmesg may provide additional information.
| No CONFIG_PERF_EVENTS=y kernel support configured?
New behavior:
-------
| # perf record ls
| Error:
| PMU Hardware doesn't support sampling/overflow-interrupts.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <acme@redhat.com>
Cc: <linux-snps-arc@lists.infradead.org>
Cc: <vincent.weaver@maine.edu>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Link: http://lkml.kernel.org/r/1462786660-2900-3-git-send-email-vgupta@synopsys.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f94f164..5d48306 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9309,7 +9309,7 @@ SYSCALL_DEFINE5(perf_event_open,
if (is_sampling_event(event)) {
if (event->pmu->capabilities & PERF_PMU_CAP_NO_INTERRUPT) {
- err = -ENOTSUPP;
+ err = -EOPNOTSUPP;
goto err_alloc;
}
}
prev parent reply other threads:[~2016-06-03 11:15 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:perf/core] tools/perf: Handle -EOPNOTSUPP " 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 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-bot for Vineet Gupta [this message]
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-a1396555abff9ff9b74c2e4da13e27e81fd094b2@git.kernel.org \
--to=tipbot@zytor.com \
--cc=Vineet.Gupta1@synopsys.com \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vgupta@synopsys.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox