diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-10-30 15:50:32 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-11-09 18:12:33 +0100 |
commit | 267fb27352b6fc9fdbad753127a239f75618ecbc (patch) | |
tree | 2f99dd2dedf21e53d329e16cdb615e2c234202bb /arch/powerpc/perf/imc-pmu.c | |
parent | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 (diff) |
perf: Reduce stack usage of perf_output_begin()
__perf_output_begin() has an on-stack struct perf_sample_data in the
unlikely case it needs to generate a LOST record. However, every call
to perf_output_begin() must already have a perf_sample_data on-stack.
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20201030151954.985416146@infradead.org
Diffstat (limited to 'arch/powerpc/perf/imc-pmu.c')
-rw-r--r-- | arch/powerpc/perf/imc-pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c index 9ed4fcccf8a9..7b25548ec42b 100644 --- a/arch/powerpc/perf/imc-pmu.c +++ b/arch/powerpc/perf/imc-pmu.c @@ -1336,7 +1336,7 @@ static void dump_trace_imc_data(struct perf_event *event) /* If this is a valid record, create the sample */ struct perf_output_handle handle; - if (perf_output_begin(&handle, event, header.size)) + if (perf_output_begin(&handle, &data, event, header.size)) return; perf_output_sample(&handle, &header, &data, event); |