perf record: fix multi-record Zstd compression
Status from this message: Applied to perf-tools-next, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 1 replyApplied
- v23 patches 2 repliesSuperseded
- v13 patches 1 replySuperseded
Changes in v3 from the cover letter
- Dropped "perf record: Avoid overrunning the zstd output buffer" and "perf
record: Don't store raw data on zstd compression failure": both are now fixed in perf-tools-next.
- Added "perf record: Return the written size from process_comp_header()", a no-functional-change prep patch, so the fix's per-record padding can't overrun 'dst'
- Removed blank line from record+zstd_comp_decomp_multi_record.sh between test description and license (Namhyung Kim).
- Added missing <string.h> include (Sashiko).
- Rebased onto perf-tools-next (Namhyung Kim).
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | perf record: Return the written size from process_comp_header()tools/ tools/ tools/ | +31 | 0 replies | |
| 2/2 | perf record: Fix multiple PERF_RECORD_COMPRESSED2 records per pushtools/ tools/ | +83 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/2] perf record: fix multi-record Zstd compression
Fix a 'perf record -z' regression that aborts recording and writes a perf.data that cannot be decompressed (see full analysis in patch 2).
v2 -> v3:
- Dropped "perf record: Avoid overrunning the zstd output buffer" and "perf
record: Don't store raw data on zstd compression failure": both are now fixed in perf-tools-next.
- Added "perf record: Return the written size from process_comp_header()", a no-functional-change prep patch, so the fix's per-record padding can't overrun 'dst'
- Removed blank line from record+zstd_comp_decomp_multi_record.sh between test description and license (Namhyung Kim).
- Added missing <string.h> include (Sashiko).
- Rebased onto perf-tools-next (Namhyung Kim).
v1 -> v2:
- Patch 2 ("perf record: Avoid overrunning the zstd output buffer"):
rework the overly strict output buffer check to pass the remaining dst size to process_comp_header() and bail only when a record won't fit (Sashiko).
v1: https://lore.kernel.org/all/[email protected]/
v2: https://lore.kernel.org/all/[email protected]/
Dmitry Ilvokhin (2):
perf record: Return the written size from process_comp_header() perf record: Fix multiple PERF_RECORD_COMPRESSED2 records per push
tools/perf/builtin-record.c | 49 +++++++++------ .../record+zstd_comp_decomp_multi_record.sh | 63 +++++++++++++++++++ tools/perf/util/compress.h | 6 +- tools/perf/util/zstd.c | 25 ++++---- 4 files changed, 111 insertions(+), 32 deletions(-) create mode 100755 tools/perf/tests/shell/record+zstd_comp_decomp_multi_record.sh
Signature · 1 line
2.53.0-Meta