[clang] [llvm] [llvm][support] Implement tracing virtual file system (PR #88326)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 6 14:14:45 PDT 2024
================
@@ -1125,6 +1125,54 @@ class YAMLVFSWriter {
void write(llvm::raw_ostream &OS);
};
+/// File system that tracks the number of calls to the underlying file system.
+/// This is particularly useful when wrapped around \c RealFileSystem to add
+/// lightweight tracking of expensive syscalls.
+class TracingFileSystem
+ : public llvm::RTTIExtends<TracingFileSystem, ProxyFileSystem> {
+public:
+ static const char ID;
+
+ std::size_t NumStatusCalls = 0;
----------------
jansvoboda11 wrote:
I'm going to land this with non-atomic internals and add that feature when/if the need arises.
https://github.com/llvm/llvm-project/pull/88326
More information about the cfe-commits
mailing list