Thread (28 messages) 28 messages, 5 authors, 2016-09-14
STALE3584d REVIEWED: 1 (0M)
Revisions (9)
  1. v13 [diff vs current]
  2. v14 [diff vs current]
  3. v15 [diff vs current]
  4. v16 [diff vs current]
  5. v17 [diff vs current]
  6. v17 [diff vs current]
  7. v19 [diff vs current]
  8. v20 current
  9. v21 [diff vs current]

[PATCH v20 04/20] perf, tools: Support CPU ID matching for Powerpc

From: Sukadev Bhattiprolu <hidden>
Date: 2016-06-21 04:04:58
Also in: lkml
Subsystem: performance events subsystem, the rest · Maintainers: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Linus Torvalds

Implement code that returns the generic CPU ID string for Powerpc.
This will be used to identify the specific table of PMU events to
parse/compare user specified events against.

Signed-off-by: Sukadev Bhattiprolu <redacted>
Acked-by: Jiri Olsa <redacted>
---

Changelog[v14]
	- [Jiri Olsa] Move this independent code off into a separate patch.
---
 tools/perf/arch/powerpc/util/header.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
index f8ccee1..9aaa6f5 100644
--- a/tools/perf/arch/powerpc/util/header.c
+++ b/tools/perf/arch/powerpc/util/header.c
@@ -32,3 +32,14 @@ get_cpuid(char *buffer, size_t sz)
 	}
 	return -1;
 }
+
+char *
+get_cpuid_str(void)
+{
+	char *bufp;
+
+	if (asprintf(&bufp, "%.8lx", mfspr(SPRN_PVR)) < 0)
+		bufp = NULL;
+
+	return bufp;
+}
-- 
2.5.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help