diff options
Diffstat (limited to 'tools/perf/util/trace-event.h')
-rw-r--r-- | tools/perf/util/trace-event.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h index 406d452956db..b3e86b1e4444 100644 --- a/tools/perf/util/trace-event.h +++ b/tools/perf/util/trace-event.h | |||
@@ -233,7 +233,12 @@ static inline unsigned long long __data2host8(unsigned long long data) | |||
233 | 233 | ||
234 | #define data2host2(ptr) __data2host2(*(unsigned short *)ptr) | 234 | #define data2host2(ptr) __data2host2(*(unsigned short *)ptr) |
235 | #define data2host4(ptr) __data2host4(*(unsigned int *)ptr) | 235 | #define data2host4(ptr) __data2host4(*(unsigned int *)ptr) |
236 | #define data2host8(ptr) __data2host8(*(unsigned long long *)ptr) | 236 | #define data2host8(ptr) ({ \ |
237 | unsigned long long __val; \ | ||
238 | \ | ||
239 | memcpy(&__val, (ptr), sizeof(unsigned long long)); \ | ||
240 | __data2host8(__val); \ | ||
241 | }) | ||
237 | 242 | ||
238 | extern int header_page_ts_offset; | 243 | extern int header_page_ts_offset; |
239 | extern int header_page_ts_size; | 244 | extern int header_page_ts_size; |