Cached source files accessor.

This commit is contained in:
Bartosz Taudul 2020-05-23 15:08:26 +02:00
parent 964d65fd3b
commit d470202bca
2 changed files with 8 additions and 0 deletions

View File

@ -7371,4 +7371,11 @@ uint64_t Worker::GetSourceFileCacheSize() const
return cnt;
}
Worker::MemoryBlock Worker::GetSourceFileFromCache( const char* file ) const
{
auto it = m_data.sourceFileCache.find( file );
if( it == m_data.sourceFileCache.end() ) return MemoryBlock {};
return it->second;
}
}

View File

@ -426,6 +426,7 @@ public:
void GetCpuUsageAtTime( int64_t time, int& own, int& other ) const;
uint64_t GetSourceFileCacheCount() const { return m_data.sourceFileCache.size(); }
uint64_t GetSourceFileCacheSize() const;
MemoryBlock GetSourceFileFromCache( const char* file ) const;
int64_t GetFrameTime( const FrameData& fd, size_t idx ) const;
int64_t GetFrameBegin( const FrameData& fd, size_t idx ) const;