diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-03-19 22:08:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-06 03:30:23 -0400 |
commit | 3ab8d792b1348eaabfe550ba60902d781d160dd4 (patch) | |
tree | c828ea166e1ddce112ee9cc02cf991320bf89feb | |
parent | ef45fa9e6c1694d3e8063f39749097a6e496b12c (diff) |
perf_counter tools: fix event_id type
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | Documentation/perf_counter/kerneltop.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Documentation/perf_counter/kerneltop.c b/Documentation/perf_counter/kerneltop.c index 7bf2a516f18b..7bfb0f0d8005 100644 --- a/Documentation/perf_counter/kerneltop.c +++ b/Documentation/perf_counter/kerneltop.c | |||
@@ -99,7 +99,7 @@ static int run_perfstat = 0; | |||
99 | static int system_wide = 0; | 99 | static int system_wide = 0; |
100 | 100 | ||
101 | static int nr_counters = 0; | 101 | static int nr_counters = 0; |
102 | static long event_id[MAX_COUNTERS] = DEF_PERFSTAT_EVENTS; | 102 | static __s64 event_id[MAX_COUNTERS] = DEF_PERFSTAT_EVENTS; |
103 | static int event_raw[MAX_COUNTERS]; | 103 | static int event_raw[MAX_COUNTERS]; |
104 | static int event_count[MAX_COUNTERS]; | 104 | static int event_count[MAX_COUNTERS]; |
105 | static int fd[MAX_NR_CPUS][MAX_COUNTERS]; | 105 | static int fd[MAX_NR_CPUS][MAX_COUNTERS]; |
@@ -261,11 +261,11 @@ static int type_valid(int type) | |||
261 | 261 | ||
262 | static char *event_name(int ctr) | 262 | static char *event_name(int ctr) |
263 | { | 263 | { |
264 | int type = event_id[ctr]; | 264 | __s64 type = event_id[ctr]; |
265 | static char buf[32]; | 265 | static char buf[32]; |
266 | 266 | ||
267 | if (event_raw[ctr]) { | 267 | if (event_raw[ctr]) { |
268 | sprintf(buf, "raw 0x%x", type); | 268 | sprintf(buf, "raw 0x%llx", (long long)type); |
269 | return buf; | 269 | return buf; |
270 | } | 270 | } |
271 | if (!type_valid(type)) | 271 | if (!type_valid(type)) |
@@ -299,7 +299,8 @@ static int match_event_symbols(char *str) | |||
299 | 299 | ||
300 | static int parse_events(char *str) | 300 | static int parse_events(char *str) |
301 | { | 301 | { |
302 | int type, raw; | 302 | __s64 type; |
303 | int raw; | ||
303 | 304 | ||
304 | again: | 305 | again: |
305 | if (nr_counters == MAX_COUNTERS) | 306 | if (nr_counters == MAX_COUNTERS) |