mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Display source file cache stats.
This commit is contained in:
parent
ae1155852a
commit
97a5957adc
@ -12562,6 +12562,13 @@ void View::DrawInfo()
|
|||||||
ImGui::TextUnformatted( "Coarse CPU core context switch data" );
|
ImGui::TextUnformatted( "Coarse CPU core context switch data" );
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
|
TextFocused( "Source file cache:", RealToString( m_worker.GetSourceFileCacheCount() ) );
|
||||||
|
if( ImGui::IsItemHovered() )
|
||||||
|
{
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
ImGui::TextUnformatted( MemSizeToString( m_worker.GetSourceFileCacheSize() ) );
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
}
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7324,4 +7324,14 @@ void Worker::CacheSource( const StringRef& str )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t Worker::GetSourceFileCacheSize() const
|
||||||
|
{
|
||||||
|
uint64_t cnt = 0;
|
||||||
|
for( auto& v : m_data.sourceFileCache )
|
||||||
|
{
|
||||||
|
cnt += v.second.len;
|
||||||
|
}
|
||||||
|
return cnt;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -424,6 +424,8 @@ public:
|
|||||||
uint64_t GetPidFromTid( uint64_t tid ) const;
|
uint64_t GetPidFromTid( uint64_t tid ) const;
|
||||||
const unordered_flat_map<uint64_t, CpuThreadData>& GetCpuThreadData() const { return m_data.cpuThreadData; }
|
const unordered_flat_map<uint64_t, CpuThreadData>& GetCpuThreadData() const { return m_data.cpuThreadData; }
|
||||||
void GetCpuUsageAtTime( int64_t time, int& own, int& other ) const;
|
void GetCpuUsageAtTime( int64_t time, int& own, int& other ) const;
|
||||||
|
uint64_t GetSourceFileCacheCount() const { return m_data.sourceFileCache.size(); }
|
||||||
|
uint64_t GetSourceFileCacheSize() const;
|
||||||
|
|
||||||
int64_t GetFrameTime( const FrameData& fd, size_t idx ) const;
|
int64_t GetFrameTime( const FrameData& fd, size_t idx ) const;
|
||||||
int64_t GetFrameBegin( const FrameData& fd, size_t idx ) const;
|
int64_t GetFrameBegin( const FrameData& fd, size_t idx ) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user