mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Enhance time distribution zone search.
When the find zone menu is opened from the zone time distribution list, time range limit will be enabled, preventing display of zones outside of the selected zone range. This allows much easier finding of child zones within the selected zone scope. Limiting zone search to a specified thread(s) might also be helpful here, but it can be worked around by looking only at zones in a single thread group.
This commit is contained in:
parent
e083b2773a
commit
46ed2fb802
@ -6397,7 +6397,7 @@ void View::DrawZoneInfoWindow()
|
||||
const auto name = m_worker.GetZoneName( sl );
|
||||
if( ImGui::Selectable( name, false, ImGuiSelectableFlags_SpanAllColumns ) )
|
||||
{
|
||||
m_findZone.ShowZone( v->first, name );
|
||||
m_findZone.ShowZone( v->first, name, ev.Start(), m_worker.GetZoneEnd( ev ) );
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled( "(\xc3\x97%s)", RealToString( v->second.count, true ) );
|
||||
|
||||
@ -497,6 +497,19 @@ private:
|
||||
void ShowZone( int16_t srcloc, const char* name )
|
||||
{
|
||||
show = true;
|
||||
limitRange = false;
|
||||
Reset();
|
||||
match.emplace_back( srcloc );
|
||||
strcpy( pattern, name );
|
||||
}
|
||||
|
||||
void ShowZone( int16_t srcloc, const char* name, int64_t limitMin, int64_t limitMax )
|
||||
{
|
||||
assert( limitMin <= limitMax );
|
||||
show = true;
|
||||
limitRange = true;
|
||||
rangeMin = limitMin;
|
||||
rangeMax = limitMax;
|
||||
Reset();
|
||||
match.emplace_back( srcloc );
|
||||
strcpy( pattern, name );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user