[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:19:34 -08:00
parent 7607b96ed9
commit b6e8112261
3 changed files with 137 additions and 34 deletions
+1
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