================
@@ -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:

@aganea Any thoughts? I'm asking because of 
https://github.com/llvm/llvm-project/pull/88427. I that making the counters 
atomic in this PR is not that problematic, since you can still choose how you 
use the VFS (i.e. how many per core you share), unlike the originally global 
counters in `FileManager` in your PR.

https://github.com/llvm/llvm-project/pull/88326
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to