mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
perf evsel: Ensure reserved member of PERF_SAMPLE_CPU is zero in perf_event__synthesize_sample()
PERF_SAMPLE_CPU contains the cpu number in the first 4 bytes and the second 4 bytes are reserved. Ensure the reserved bytes are zero in perf_event__synthesize_sample(). Signed-off-by: Adrian Hunter <[email protected]> Acked-by: Jiri Olsa <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
a10eb530ae
commit
59a87fdad1
1 changed files with 1 additions and 0 deletions
|
|
@ -2533,6 +2533,7 @@ int perf_event__synthesize_sample(union perf_event *event, u64 type,
|
|||
|
||||
if (type & PERF_SAMPLE_CPU) {
|
||||
u.val32[0] = sample->cpu;
|
||||
u.val32[1] = 0;
|
||||
if (swapped) {
|
||||
/*
|
||||
* Inverse of what is done in perf_evsel__parse_sample
|
||||
|
|
|
|||
Loading…
Reference in a new issue