mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Disable samples limit range until background job is done.
This commit is contained in:
parent
54651f9f6d
commit
87e7cba289
@ -11869,20 +11869,39 @@ void View::DrawStatistics()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if( ImGui::Checkbox( "Limit range", &m_statRange.active ) )
|
if( m_statMode == 1 && !m_worker.AreSymbolSamplesReady() )
|
||||||
{
|
{
|
||||||
if( m_statRange.active && m_statRange.min == 0 && m_statRange.max == 0 )
|
m_statRange.active = false;
|
||||||
|
bool val = false;
|
||||||
|
ImGui::PushItemFlag( ImGuiItemFlags_Disabled, true );
|
||||||
|
ImGui::PushStyleVar( ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f );
|
||||||
|
ImGui::Checkbox( "Limit range", &val );
|
||||||
|
ImGui::PopItemFlag();
|
||||||
|
ImGui::PopStyleVar();
|
||||||
|
if( ImGui::IsItemHovered() )
|
||||||
{
|
{
|
||||||
m_statRange.min = m_vd.zvStart;
|
ImGui::BeginTooltip();
|
||||||
m_statRange.max = m_vd.zvEnd;
|
ImGui::TextUnformatted( "Waiting for background tasks to finish" );
|
||||||
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( m_statRange.active )
|
else
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
if( ImGui::Checkbox( "Limit range", &m_statRange.active ) )
|
||||||
TextColoredUnformatted( 0xFF00FFFF, ICON_FA_EXCLAMATION_TRIANGLE );
|
{
|
||||||
ImGui::SameLine();
|
if( m_statRange.active && m_statRange.min == 0 && m_statRange.max == 0 )
|
||||||
ToggleButton( ICON_FA_RULER " Limits", m_showRanges );
|
{
|
||||||
|
m_statRange.min = m_vd.zvStart;
|
||||||
|
m_statRange.max = m_vd.zvEnd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( m_statRange.active )
|
||||||
|
{
|
||||||
|
ImGui::SameLine();
|
||||||
|
TextColoredUnformatted( 0xFF00FFFF, ICON_FA_EXCLAMATION_TRIANGLE );
|
||||||
|
ImGui::SameLine();
|
||||||
|
ToggleButton( ICON_FA_RULER " Limits", m_showRanges );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
@ -264,6 +264,7 @@ Worker::Worker( const char* addr, int port )
|
|||||||
m_data.callstackSamplesReady = true;
|
m_data.callstackSamplesReady = true;
|
||||||
m_data.ghostZonesReady = true;
|
m_data.ghostZonesReady = true;
|
||||||
m_data.ctxUsageReady = true;
|
m_data.ctxUsageReady = true;
|
||||||
|
m_data.symbolSamplesReady = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_thread = std::thread( [this] { SetThreadName( "Tracy Worker" ); Exec(); } );
|
m_thread = std::thread( [this] { SetThreadName( "Tracy Worker" ); Exec(); } );
|
||||||
|
@ -292,6 +292,7 @@ private:
|
|||||||
bool callstackSamplesReady = false;
|
bool callstackSamplesReady = false;
|
||||||
bool ghostZonesReady = false;
|
bool ghostZonesReady = false;
|
||||||
bool ghostZonesPostponed = false;
|
bool ghostZonesPostponed = false;
|
||||||
|
bool symbolSamplesReady = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unordered_flat_map<uint32_t, LockMap*> lockMap;
|
unordered_flat_map<uint32_t, LockMap*> lockMap;
|
||||||
@ -552,6 +553,7 @@ public:
|
|||||||
const unordered_flat_map<CallstackFrameId, uint32_t, CallstackFrameIdHash, CallstackFrameIdCompare>* GetSymbolInstructionPointers( uint64_t symAddr ) const;
|
const unordered_flat_map<CallstackFrameId, uint32_t, CallstackFrameIdHash, CallstackFrameIdCompare>* GetSymbolInstructionPointers( uint64_t symAddr ) const;
|
||||||
bool AreCallstackSamplesReady() const { return m_data.callstackSamplesReady; }
|
bool AreCallstackSamplesReady() const { return m_data.callstackSamplesReady; }
|
||||||
bool AreGhostZonesReady() const { return m_data.ghostZonesReady; }
|
bool AreGhostZonesReady() const { return m_data.ghostZonesReady; }
|
||||||
|
bool AreSymbolSamplesReady() const { return m_data.symbolSamplesReady; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tracy_force_inline uint16_t CompressThread( uint64_t thread ) { return m_data.localThreadCompress.CompressThread( thread ); }
|
tracy_force_inline uint16_t CompressThread( uint64_t thread ) { return m_data.localThreadCompress.CompressThread( thread ); }
|
||||||
|
Loading…
Reference in New Issue
Block a user