Commit 3ab8d792 authored by Wu Fengguang's avatar Wu Fengguang Committed by Ingo Molnar

perf_counter tools: fix event_id type

Signed-off-by: default avatarWu Fengguang <fengguang.wu@intel.com>
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 ef45fa9e
...@@ -99,7 +99,7 @@ static int run_perfstat = 0; ...@@ -99,7 +99,7 @@ static int run_perfstat = 0;
static int system_wide = 0; static int system_wide = 0;
static int nr_counters = 0; static int nr_counters = 0;
static long event_id[MAX_COUNTERS] = DEF_PERFSTAT_EVENTS; static __s64 event_id[MAX_COUNTERS] = DEF_PERFSTAT_EVENTS;
static int event_raw[MAX_COUNTERS]; static int event_raw[MAX_COUNTERS];
static int event_count[MAX_COUNTERS]; static int event_count[MAX_COUNTERS];
static int fd[MAX_NR_CPUS][MAX_COUNTERS]; static int fd[MAX_NR_CPUS][MAX_COUNTERS];
...@@ -261,11 +261,11 @@ static int type_valid(int type) ...@@ -261,11 +261,11 @@ static int type_valid(int type)
static char *event_name(int ctr) static char *event_name(int ctr)
{ {
int type = event_id[ctr]; __s64 type = event_id[ctr];
static char buf[32]; static char buf[32];
if (event_raw[ctr]) { if (event_raw[ctr]) {
sprintf(buf, "raw 0x%x", type); sprintf(buf, "raw 0x%llx", (long long)type);
return buf; return buf;
} }
if (!type_valid(type)) if (!type_valid(type))
...@@ -299,7 +299,8 @@ static int match_event_symbols(char *str) ...@@ -299,7 +299,8 @@ static int match_event_symbols(char *str)
static int parse_events(char *str) static int parse_events(char *str)
{ {
int type, raw; __s64 type;
int raw;
again: again:
if (nr_counters == MAX_COUNTERS) if (nr_counters == MAX_COUNTERS)
......
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