aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r--tools/perf/util/parse-events.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 7bdad8df22a6..f77407b5832e 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -223,9 +223,15 @@ char *event_name(int counter)
223{ 223{
224 u64 config = attrs[counter].config; 224 u64 config = attrs[counter].config;
225 int type = attrs[counter].type; 225 int type = attrs[counter].type;
226
227 return __event_name(type, config);
228}
229
230char *__event_name(int type, u64 config)
231{
226 static char buf[32]; 232 static char buf[32];
227 233
228 if (attrs[counter].type == PERF_TYPE_RAW) { 234 if (type == PERF_TYPE_RAW) {
229 sprintf(buf, "raw 0x%llx", config); 235 sprintf(buf, "raw 0x%llx", config);
230 return buf; 236 return buf;
231 } 237 }