[PATCH 0/3] perf record: fix multi-record Zstd compression
From: Dmitry Ilvokhin
Date: Thu Jun 18 2026 - 12:14:18 EST
Patch 1 fixes a 'perf record -z' regression that aborts recording with
"Bad address" and produces an undecompressable perf.data.
While fixing it I found two more latent bugs in the same compressor,
zstd_compress_stream_to_records(): an output-buffer overrun and a broken
zstd-error fallback. Addressed in patches 2 and 3.
Dmitry Ilvokhin (3):
perf record: Fix multiple PERF_RECORD_COMPRESSED2 records per push
perf record: Avoid overrunning the zstd output buffer
perf record: Don't store raw data on zstd compression failure
tools/perf/builtin-record.c | 40 ++++++------
.../record+zstd_comp_decomp_multi_record.sh | 64 +++++++++++++++++++
tools/perf/util/zstd.c | 15 +++--
3 files changed, 94 insertions(+), 25 deletions(-)
create mode 100755 tools/perf/tests/shell/record+zstd_comp_decomp_multi_record.sh
--
2.53.0-Meta