mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Disable samples limit range until background job is done.
This commit is contained in:
parent
54651f9f6d
commit
87e7cba289
@ -11869,6 +11869,24 @@ void View::DrawStatistics()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
if( m_statMode == 1 && !m_worker.AreSymbolSamplesReady() )
|
||||||
|
{
|
||||||
|
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() )
|
||||||
|
{
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
ImGui::TextUnformatted( "Waiting for background tasks to finish" );
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if( ImGui::Checkbox( "Limit range", &m_statRange.active ) )
|
if( ImGui::Checkbox( "Limit range", &m_statRange.active ) )
|
||||||
{
|
{
|
||||||
if( m_statRange.active && m_statRange.min == 0 && m_statRange.max == 0 )
|
if( m_statRange.active && m_statRange.min == 0 && m_statRange.max == 0 )
|
||||||
@ -11884,6 +11902,7 @@ void View::DrawStatistics()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ToggleButton( ICON_FA_RULER " Limits", m_showRanges );
|
ToggleButton( ICON_FA_RULER " Limits", m_showRanges );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
|
@ -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