aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/perf.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2009-06-19 08:21:42 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-19 12:25:47 -0400
commit9cffa8d53335d891cc0ecb3824a67118b3ee4b2f (patch)
tree420e0f96198f0e78aedd006280826b8cf0839820 /tools/perf/perf.h
parentb49a9e7e72103ea91946453c19703a4dfa1994fe (diff)
perf_counter tools: Define and use our own u64, s64 etc. definitions
On 64-bit powerpc, __u64 is defined to be unsigned long rather than unsigned long long. This causes compiler warnings every time we print a __u64 value with %Lx. Rather than changing __u64, we define our own u64 to be unsigned long long on all architectures, and similarly s64 as signed long long. For consistency we also define u32, s32, u16, s16, u8 and s8. These definitions are put in a new header, types.h, because these definitions are needed in util/string.h and util/symbol.h. The main change here is the mechanical change of __[us]{64,32,16,8} to remove the "__". The other changes are: * Create types.h * Include types.h in perf.h, util/string.h and util/symbol.h * Add types.h to the LIB_H definition in Makefile * Added (u64) casts in process_overflow_event() and print_sym_table() to kill two remaining warnings. Signed-off-by: Paul Mackerras <paulus@samba.org> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: benh@kernel.crashing.org LKML-Reference: <19003.33494.495844.956580@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/perf.h')
-rw-r--r--tools/perf/perf.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 55c62f4b990b..bccb529dac08 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -19,6 +19,7 @@
19#include <sys/syscall.h> 19#include <sys/syscall.h>
20 20
21#include "../../include/linux/perf_counter.h" 21#include "../../include/linux/perf_counter.h"
22#include "types.h"
22 23
23/* 24/*
24 * prctl(PR_TASK_PERF_COUNTERS_DISABLE) will (cheaply) disable all 25 * prctl(PR_TASK_PERF_COUNTERS_DISABLE) will (cheaply) disable all
@@ -66,9 +67,9 @@ sys_perf_counter_open(struct perf_counter_attr *attr,
66#define MAX_NR_CPUS 256 67#define MAX_NR_CPUS 256
67 68
68struct perf_file_header { 69struct perf_file_header {
69 __u64 version; 70 u64 version;
70 __u64 sample_type; 71 u64 sample_type;
71 __u64 data_size; 72 u64 data_size;
72}; 73};
73 74
74#endif 75#endif