aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2010-03-23 00:08:59 +0100
committerFrederic Weisbecker <fweisbec@gmail.com>2010-04-01 08:26:30 +0200
commiteb1e79611cc9bfe21978230e3521e77ea2d7874a (patch)
tree0d5ebdb4a0b178fcd524d3b725da3e8a3cd6151e /tools
parentb72c40949b0f04728f2993a1434598d3bad094ea (diff)
downloadkernel_samsung_smdk4412-eb1e79611cc9bfe21978230e3521e77ea2d7874a.zip
kernel_samsung_smdk4412-eb1e79611cc9bfe21978230e3521e77ea2d7874a.tar.gz
kernel_samsung_smdk4412-eb1e79611cc9bfe21978230e3521e77ea2d7874a.tar.bz2
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 <davem@davemloft.net> Suggested-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions