diff options
author | Namhyung Kim <namhyung@kernel.org> | 2023-01-18 09:05:54 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2023-01-18 13:57:19 +0300 |
commit | 0a9081cf0a11770f6b0affd377db8caa3ec4c793 (patch) | |
tree | 3a740abf38035bbde0d715718d2eb2c12f15eefe /arch/x86/events | |
parent | 31046500c1864b8ab25d1b9846ad10aa3f7b1821 (diff) | |
download | linux-0a9081cf0a11770f6b0affd377db8caa3ec4c793.tar.xz |
perf/core: Add perf_sample_save_raw_data() helper
When we save the raw_data to the perf sample data, we need to update
the sample flags and the dynamic size. To make sure this is done
consistently, add the perf_sample_save_raw_data() helper and convert
all call sites.
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230118060559.615653-4-namhyung@kernel.org
Diffstat (limited to 'arch/x86/events')
-rw-r--r-- | arch/x86/events/amd/ibs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c index 417c80bd3274..64582954b5f6 100644 --- a/arch/x86/events/amd/ibs.c +++ b/arch/x86/events/amd/ibs.c @@ -1110,8 +1110,7 @@ fail: .data = ibs_data.data, }, }; - data.raw = &raw; - data.sample_flags |= PERF_SAMPLE_RAW; + perf_sample_save_raw_data(&data, &raw); } if (perf_ibs == &perf_ibs_op) |