diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index eedc9bb7..40465f9f 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -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; +} + } diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 84a2559e..e3059aec 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -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;