LLVM 20.0.0git
|
File system that tracks the number of calls to the underlying file system. More...
#include "llvm/Support/VirtualFileSystem.h"
Public Member Functions | |
TracingFileSystem (llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS) | |
ErrorOr< Status > | status (const Twine &Path) override |
ErrorOr< std::unique_ptr< File > > | openFileForRead (const Twine &Path) override |
directory_iterator | dir_begin (const Twine &Dir, std::error_code &EC) override |
std::error_code | getRealPath (const Twine &Path, SmallVectorImpl< char > &Output) override |
bool | exists (const Twine &Path) override |
std::error_code | isLocal (const Twine &Path, bool &Result) override |
Public Member Functions inherited from llvm::RTTIExtends< TracingFileSystem, ProxyFileSystem > | |
const void * | dynamicClassID () const override |
bool | isA () const |
Check whether this instance is a subclass of QueryT. | |
bool | isA (const void *const ClassID) const override |
Public Attributes | |
std::size_t | NumStatusCalls = 0 |
std::size_t | NumOpenFileForReadCalls = 0 |
std::size_t | NumDirBeginCalls = 0 |
std::size_t | NumGetRealPathCalls = 0 |
std::size_t | NumExistsCalls = 0 |
std::size_t | NumIsLocalCalls = 0 |
Static Public Attributes | |
static const char | ID = 0 |
Protected Member Functions | |
void | printImpl (raw_ostream &OS, PrintType Type, unsigned IndentLevel) const override |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::RTTIExtends< TracingFileSystem, ProxyFileSystem > | |
static const void * | classID () |
static bool | classof (const T *R) |
File system that tracks the number of calls to the underlying file system.
This is particularly useful when wrapped around RealFileSystem
to add lightweight tracking of expensive syscalls.
Definition at line 1151 of file VirtualFileSystem.h.
|
inline |
Definition at line 1163 of file VirtualFileSystem.h.
|
inlineoverride |
Definition at line 1176 of file VirtualFileSystem.h.
References llvm::vfs::ProxyFileSystem::dir_begin(), and NumDirBeginCalls.
Definition at line 1187 of file VirtualFileSystem.h.
References llvm::vfs::ProxyFileSystem::exists(), and NumExistsCalls.
|
inlineoverride |
Definition at line 1181 of file VirtualFileSystem.h.
References llvm::vfs::ProxyFileSystem::getRealPath(), and NumGetRealPathCalls.
|
inlineoverride |
Definition at line 1192 of file VirtualFileSystem.h.
References llvm::vfs::ProxyFileSystem::isLocal(), and NumIsLocalCalls.
|
inlineoverride |
Definition at line 1171 of file VirtualFileSystem.h.
References NumOpenFileForReadCalls, and llvm::vfs::ProxyFileSystem::openFileForRead().
|
overrideprotected |
Definition at line 2960 of file VirtualFileSystem.cpp.
References NumDirBeginCalls, NumExistsCalls, NumGetRealPathCalls, NumIsLocalCalls, NumOpenFileForReadCalls, NumStatusCalls, OS, and llvm::Type::print().
Definition at line 1166 of file VirtualFileSystem.h.
References NumStatusCalls, and llvm::vfs::ProxyFileSystem::status().
Definition at line 1154 of file VirtualFileSystem.h.
std::size_t llvm::vfs::TracingFileSystem::NumDirBeginCalls = 0 |
Definition at line 1158 of file VirtualFileSystem.h.
Referenced by dir_begin(), and printImpl().
std::size_t llvm::vfs::TracingFileSystem::NumExistsCalls = 0 |
Definition at line 1160 of file VirtualFileSystem.h.
Referenced by exists(), and printImpl().
std::size_t llvm::vfs::TracingFileSystem::NumGetRealPathCalls = 0 |
Definition at line 1159 of file VirtualFileSystem.h.
Referenced by getRealPath(), and printImpl().
std::size_t llvm::vfs::TracingFileSystem::NumIsLocalCalls = 0 |
Definition at line 1161 of file VirtualFileSystem.h.
Referenced by isLocal(), and printImpl().
std::size_t llvm::vfs::TracingFileSystem::NumOpenFileForReadCalls = 0 |
Definition at line 1157 of file VirtualFileSystem.h.
Referenced by openFileForRead(), and printImpl().
std::size_t llvm::vfs::TracingFileSystem::NumStatusCalls = 0 |
Definition at line 1156 of file VirtualFileSystem.h.
Referenced by printImpl(), and status().