Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1396878 > unrolled thread

[RFC 1/2] tools/perf: Handle EOPNOTSUPP for sampling events

Started byVineet Gupta <Vineet.Gupta1@synopsys.com>
First post2016-05-09 11:40 +0200
Last post2016-05-09 11:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC 1/2] tools/perf: Handle EOPNOTSUPP for sampling events Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-05-09 11:40 +0200

#1396878 — [RFC 1/2] tools/perf: Handle EOPNOTSUPP for sampling events

FromVineet Gupta <Vineet.Gupta1@synopsys.com>
Date2016-05-09 11:40 +0200
Subject[RFC 1/2] tools/perf: Handle EOPNOTSUPP for sampling events
Message-ID<rwPPr-2FZ-3@gated-at.bofh.it>
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

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@synopsys.com>
---
 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 738ce226002b..8bd220c63e19 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2403,6 +2403,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?\n");
 		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.");
-- 
2.5.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web