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


Groups > linux.kernel > #1427259 > unrolled thread

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

Started bySukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
First post2016-06-21 06:10 +0200
Last post2016-06-21 06:10 +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

  [PATCH v20 04/20] perf, tools: Support CPU ID matching for Powerpc Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> - 2016-06-21 06:10 +0200

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

FromSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Date2016-06-21 06:10 +0200
Subject[PATCH v20 04/20] perf, tools: Support CPU ID matching for Powerpc
Message-ID<rMlaF-Mm-7@gated-at.bofh.it>
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 <sukadev@linux.vnet.ibm.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
---

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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web