1
0
mirror of https://github.com/facebook/zstd.git synced 2025-08-08 17:22:10 +03:00

[util] Add traces enabled by --trace-file-stat

Print traces to stderr when --trace-file-stat is passed.
We trace all functions that read and write file metadata.
This commit is contained in:
Nick Terrell
2022-12-21 17:00:44 -08:00
parent 7607b96ed9
commit b6e8112261
3 changed files with 137 additions and 34 deletions

View File

@@ -1004,6 +1004,7 @@ int main(int argCount, const char* argv[])
if (!strcmp(argument, "--fake-stdin-is-console")) { UTIL_fakeStdinIsConsole(); continue; }
if (!strcmp(argument, "--fake-stdout-is-console")) { UTIL_fakeStdoutIsConsole(); continue; }
if (!strcmp(argument, "--fake-stderr-is-console")) { UTIL_fakeStderrIsConsole(); continue; }
if (!strcmp(argument, "--trace-file-stat")) { UTIL_traceFileStat(); continue; }
/* long commands with arguments */
#ifndef ZSTD_NODICT