summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/perf_pai_ext.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2023-01-17 22:05:54 -0800
committerIngo Molnar <mingo@kernel.org>2023-01-18 11:57:19 +0100
commit0a9081cf0a11770f6b0affd377db8caa3ec4c793 (patch)
tree3a740abf38035bbde0d715718d2eb2c12f15eefe /arch/s390/kernel/perf_pai_ext.c
parent31046500c1864b8ab25d1b9846ad10aa3f7b1821 (diff)
downloadlwn-0a9081cf0a11770f6b0affd377db8caa3ec4c793.tar.gz
lwn-0a9081cf0a11770f6b0affd377db8caa3ec4c793.zip
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/s390/kernel/perf_pai_ext.c')
-rw-r--r--arch/s390/kernel/perf_pai_ext.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/s390/kernel/perf_pai_ext.c b/arch/s390/kernel/perf_pai_ext.c
index 1138f57baae3..555597222bad 100644
--- a/arch/s390/kernel/perf_pai_ext.c
+++ b/arch/s390/kernel/perf_pai_ext.c
@@ -451,9 +451,7 @@ static int paiext_push_sample(void)
if (event->attr.sample_type & PERF_SAMPLE_RAW) {
raw.frag.size = rawsize;
raw.frag.data = cpump->save;
- raw.size = raw.frag.size;
- data.raw = &raw;
- data.sample_flags |= PERF_SAMPLE_RAW;
+ perf_sample_save_raw_data(&data, &raw);
}
overflow = perf_event_overflow(event, &data, &regs);