]> git.ipfire.org Git - thirdparty/zstd.git/commit
[trace] Keep track of a uint64_t tracing context 2490/head
authorNick Terrell <terrelln@fb.com>
Tue, 9 Feb 2021 19:37:05 +0000 (11:37 -0800)
committerNick Terrell <terrelln@fb.com>
Tue, 9 Feb 2021 19:37:05 +0000 (11:37 -0800)
commite59c9459a57c68e9b478bf6f0a3c4e5f3052b4f7
treea9c877904340ac57b37e324cb5c0c2fe29b4c040
parent856f38e6c538b835cd3328f2d1263ed74b6a66a3
[trace] Keep track of a uint64_t tracing context

The most common information that you want to track between begin() and
end() is the timestamp of the begin function, so you can measure the
duration of the (de)compression call. Allow the tracing library to put
this information inside the `ZSTD_TraceCtx`, so it doesn't need to keep
a global map in this case. If a single uint64_t is not enough, the
tracing library can return a unique identifier (like the context
pointer) instead, and use it as a key in a map.

This keeps the simple case simple.
lib/common/zstd_trace.c
lib/common/zstd_trace.h
lib/compress/zstd_compress.c
lib/compress/zstd_compress_internal.h
lib/compress/zstdmt_compress.c
lib/decompress/zstd_decompress.c
lib/decompress/zstd_decompress_internal.h
programs/zstdcli_trace.c