zfs/cmd/zdb
Rich Ercolani 6138af86b3
Stop wasting time on malloc in snprintf_zstd_header
Profiling zdb -vvvvv on datasets with a lot of zstd blocks, we find
ourselves spending quite a lot of time on malloc/free, because we
allocate a 16M abd each call, and never free it, so we're leaking
16M per call as well.

This seems sub-optimal. So let's just keep the buffer around and
reuse it.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #15721
2024-01-12 12:17:26 -08:00
..
Makefile.am zdb: add decryption support 2023-03-02 13:39:09 -08:00
zdb.c Stop wasting time on malloc in snprintf_zstd_header 2024-01-12 12:17:26 -08:00
zdb.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zdb_il.c zdb: Dump encrypted write and clone ZIL records 2023-12-06 12:39:12 -08:00