[tip:perfcounters/core-v2] perf_counter tools: fix event_id type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  3ab8d792b1348eaabfe550ba60902d781d160dd4
Gitweb:     http://git.kernel.org/tip/3ab8d792b1348eaabfe550ba60902d781d160dd4
Author:     Wu Fengguang <fengguang.wu@xxxxxxxxx>
AuthorDate: Fri, 20 Mar 2009 10:08:08 +0800
Committer:  Ingo Molnar <mingo@xxxxxxx>
CommitDate: Mon, 6 Apr 2009 09:30:23 +0200

perf_counter tools: fix event_id type

Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>
Acked-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
 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 7bf2a51..7bfb0f0 100644
--- a/Documentation/perf_counter/kerneltop.c
+++ b/Documentation/perf_counter/kerneltop.c
@@ -99,7 +99,7 @@ static int			run_perfstat			=  0;
 static int			system_wide			=  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_count[MAX_COUNTERS];
 static int			fd[MAX_NR_CPUS][MAX_COUNTERS];
@@ -261,11 +261,11 @@ static int type_valid(int type)
 
 static char *event_name(int ctr)
 {
-	int type = event_id[ctr];
+	__s64 type = event_id[ctr];
 	static char buf[32];
 
 	if (event_raw[ctr]) {
-		sprintf(buf, "raw 0x%x", type);
+		sprintf(buf, "raw 0x%llx", (long long)type);
 		return buf;
 	}
 	if (!type_valid(type))
@@ -299,7 +299,8 @@ static int match_event_symbols(char *str)
 
 static int parse_events(char *str)
 {
-	int type, raw;
+	__s64 type;
+	int raw;
 
 again:
 	if (nr_counters == MAX_COUNTERS)
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux