Add no-statistics guards.

This commit is contained in:
Bartosz Taudul 2021-04-18 22:59:10 +02:00
parent cbf8550a45
commit e189f596ac
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
3 changed files with 6 additions and 0 deletions

View File

@ -13801,6 +13801,7 @@ void View::DrawInfo()
}
TextFocused( "Call stack samples:", RealToString( m_worker.GetCallstackSampleCount() ) );
TextFocused( "Ghost zones:", RealToString( m_worker.GetGhostZonesCount() ) );
#ifndef TRACY_NO_STATISTICS
TextFocused( "Child sample symbols:", RealToString( m_worker.GetChildSamplesCountSyms() ) );
if( ImGui::IsItemHovered() )
{
@ -13808,6 +13809,7 @@ void View::DrawInfo()
TextFocused( "Child samples:", RealToString( m_worker.GetChildSamplesCountFull() ) );
ImGui::EndTooltip();
}
#endif
TextFocused( "Frame images:", RealToString( ficnt ) );
if( ficnt != 0 && ImGui::IsItemHovered() )
{

View File

@ -2000,6 +2000,7 @@ uint64_t Worker::GetContextSwitchPerCpuCount() const
return cnt;
}
#ifndef TRACY_NO_STATISTICS
uint64_t Worker::GetChildSamplesCountFull() const
{
uint64_t cnt = 0;
@ -2009,6 +2010,7 @@ uint64_t Worker::GetChildSamplesCountFull() const
}
return cnt;
}
#endif
uint64_t Worker::GetPidFromTid( uint64_t tid ) const
{

View File

@ -445,8 +445,10 @@ public:
uint64_t GetGhostZonesCount() const { return m_data.ghostCnt; }
uint32_t GetFrameImageCount() const { return (uint32_t)m_data.frameImage.size(); }
uint64_t GetStringsCount() const { return m_data.strings.size() + m_data.stringData.size(); }
#ifndef TRACY_NO_STATISTICS
uint64_t GetChildSamplesCountSyms() const { return m_data.childSamples.size(); }
uint64_t GetChildSamplesCountFull() const;
#endif
uint64_t GetFrameOffset() const { return m_data.frameOffset; }
const FrameData* GetFramesBase() const { return m_data.framesBase; }
const Vector<FrameData*>& GetFrames() const { return m_data.frames.Data(); }