aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/check-perf-trace.py
diff options
context:
space:
mode:
authorFrederic Weisbecker <[email protected]>2010-03-23 00:08:59 +0100
committerFrederic Weisbecker <[email protected]>2010-04-01 08:26:30 +0200
commiteb1e79611cc9bfe21978230e3521e77ea2d7874a (patch)
tree0d5ebdb4a0b178fcd524d3b725da3e8a3cd6151e /tools/perf/scripts/python/check-perf-trace.py
parentb72c40949b0f04728f2993a1434598d3bad094ea (diff)
perf: Correctly align perf event tracing buffer
The trace event buffer used by perf to record raw sample events is typed as an array of char and may then not be aligned to 8 by alloc_percpu(). But we need it to be aligned to 8 in sparc64 because we cast this buffer into a random structure type built by the TRACE_EVENT() macro to store the traces. So if a random 64 bits field is accessed inside, it may be not under an expected good alignment. Use an array of long instead to force the appropriate alignment, and perform a compile time check to ensure the size in byte of the buffer is a multiple of sizeof(long) so that its actual size doesn't get shrinked under us. This fixes unaligned accesses reported while using perf lock in sparc 64. Suggested-by: David Miller <[email protected]> Suggested-by: Tejun Heo <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: David Miller <[email protected]> Cc: Steven Rostedt <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions