Commit e3908612 authored by Wu Fengguang's avatar Wu Fengguang Committed by Ingo Molnar

perf_counter tools: Reuse event_name() in kerneltop

- can handle sw counters now
- the outputs will look slightly different
Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 95bb3be1
...@@ -67,16 +67,6 @@ ...@@ -67,16 +67,6 @@
#include "perfcounters.h" #include "perfcounters.h"
const char *event_types [] = {
"CPU cycles",
"instructions",
"cache-refs",
"cache-misses",
"branches",
"branch-misses",
"bus cycles"
};
const unsigned int default_count[] = { const unsigned int default_count[] = {
1000000, 1000000,
1000000, 1000000,
...@@ -304,10 +294,7 @@ static void print_sym_table(void) ...@@ -304,10 +294,7 @@ static void print_sym_table(void)
if (counter) if (counter)
printf("/"); printf("/");
if (event_id[counter] < PERF_HW_EVENTS_MAX) printf("%s", event_name(counter));
printf( "%s", event_types[event_id[counter]]);
else
printf( "raw:%04lx", event_id[counter]);
} }
printf( "], "); printf( "], ");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment