aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/types.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2012-05-16 08:59:04 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-05-22 12:50:25 -0300
commit6a11f92ef449bfb87f93e7cc14cb2a717afc7aa3 (patch)
tree1be870956fc0f32e4eb45ded9667cf565fc9e695 /tools/perf/util/types.h
parentperf tools: Carry perf_event_attr bitfield throught different endians (diff)
downloadlinux-dev-6a11f92ef449bfb87f93e7cc14cb2a717afc7aa3.tar.xz
linux-dev-6a11f92ef449bfb87f93e7cc14cb2a717afc7aa3.zip
perf tools: Add union u64_swap type for swapping u64 data
The following union: union { u64 val64; u32 val32[2]; } u; is used on more than one place in perf code and will be used more in upcomming patches. Adding union u64_swap to have it defined globaly so we dont need to redefine it all the time. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Reviewed-by: David Ahern <dsahern@gmail.com> Tested-by: David Ahern <dsahern@gmail.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1337151548-2396-4-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r--tools/perf/util/types.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/types.h b/tools/perf/util/types.h
index 5f3689a3d085..c51fa6b70a28 100644
--- a/tools/perf/util/types.h
+++ b/tools/perf/util/types.h
@@ -16,4 +16,9 @@ typedef signed short s16;
typedef unsigned char u8;
typedef signed char s8;
+union u64_swap {
+ u64 val64;
+ u32 val32[2];
+};
+
#endif /* __PERF_TYPES_H */