summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2026-07-08 13:38:33 +0000
committerNamhyung Kim <namhyung@kernel.org>2026-07-13 13:25:16 -0700
commit757155c142f2bc9793e888ab101a5eea2d53f8f8 (patch)
tree5ceb8cf8d71d82c2601f5535ec6323efd03eef85 /scripts/Makefile.thinlto
parente83fd0f637c46d4abb0b0cb9d057268a018122b0 (diff)
perf record: Return the written size from process_comp_header()
process_comp_header() is called from zstd_compress_stream_to_records() twice per record: once with data_size == 0 to write the record header, and once with the payload size to finalize it. It returns the increment it was passed, and the loop separately decides whether a record still fits by comparing the remaining 'dst_size' against the header size. With the fit check split from the code that writes the record, process_comp_header() cannot reject a record on its own, so any bytes it writes into 'dst' have to be bounds-checked by the caller instead of where they are produced. Pass the space left in 'dst' to process_comp_header(), let it return the number of bytes written or -1 when the header does not fit, and account the compressed payload in the loop. No functional change intended. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions