perf: Provide generic perf_sample_data initialization
authorPeter Zijlstra <[email protected]>
Wed, 3 Mar 2010 14:55:04 +0000 (15:55 +0100)
committerIngo Molnar <[email protected]>
Wed, 10 Mar 2010 12:22:23 +0000 (13:22 +0100)
commitdc1d628a67a8f042e711ea5accc0beedc3ef0092
tree728f72a5f9a8368b225890a95ea947c1c8cda301
parent548b84166917d6f5e2296123b85ad24aecd3801d
perf: Provide generic perf_sample_data initialization

This makes it easier to extend perf_sample_data and fixes a bug on arm
and sparc, which failed to set ->raw to NULL, which can cause crashes
when combined with PERF_SAMPLE_RAW.

It also optimizes PowerPC and tracepoint, because the struct
initialization is forced to zero out the whole structure.

Signed-off-by: Peter Zijlstra <[email protected]>
Acked-by: Jean Pihet <[email protected]>
Reviewed-by: Frederic Weisbecker <[email protected]>
Acked-by: David S. Miller <[email protected]>
Cc: Jamie Iles <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: [email protected]
LKML-Reference: <20100304140100.315416040@chello.nl>
Signed-off-by: Ingo Molnar <[email protected]>
arch/arm/kernel/perf_event.c
arch/powerpc/kernel/perf_event.c
arch/sparc/kernel/perf_event.c
arch/x86/kernel/cpu/perf_event.c
arch/x86/kernel/cpu/perf_event_intel.c
include/linux/perf_event.h
kernel/perf_event.c