aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/header.h
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2009-07-21 01:54:26 -0400
committerPeter Zijlstra <a.p.zijlstra@chello.nl>2009-07-22 12:05:57 -0400
commitdfe5a50461db90fab901cb697eff0d3d2e9fd229 (patch)
tree1a9a6f4a7fd759fd7a5eeaffe475dca678a2651c /tools/perf/util/header.h
parent966ee4d6b887c14159043ac80b8c3661d2bbe5e2 (diff)
perf: avoid structure size confusion by using a fixed size
for some reason, this structure gets compiled as 36 bytes in some files (the ones that alloacte it) but 40 bytes in others (the ones that use it). The cause is an off_t type that gets a different size in different compilation units for some yet-to-be-explained reason. But the effect is disasterous; the size/offset members of the struct are at different offsets, and result in mostly complete garbage. The parser in perf is so robust that this all gets hidden, and after skipping an certain amount of samples, it recovers.... so this bug is not normally noticed. .... except when you want every sample to be exact. Fix this by just using an explicitly sized type. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <4A655917.9080504@linux.intel.com>
Diffstat (limited to 'tools/perf/util/header.h')
-rw-r--r--tools/perf/util/header.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
index b5ef53ad4c7a..bf280449fcfd 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -16,7 +16,7 @@ struct perf_header {
16 int frozen; 16 int frozen;
17 int attrs, size; 17 int attrs, size;
18 struct perf_header_attr **attr; 18 struct perf_header_attr **attr;
19 off_t attr_offset; 19 s64 attr_offset;
20 u64 data_offset; 20 u64 data_offset;
21 u64 data_size; 21 u64 data_size;
22}; 22};