mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
make the histogram take into account filtered zones
This commit is contained in:
parent
6c5029af78
commit
73c83906b6
@ -458,6 +458,7 @@ private:
|
|||||||
ImGuiTextFilter m_statisticsFilter;
|
ImGuiTextFilter m_statisticsFilter;
|
||||||
ImGuiTextFilter m_statisticsImageFilter;
|
ImGuiTextFilter m_statisticsImageFilter;
|
||||||
ImGuiTextFilter m_userTextFilter;
|
ImGuiTextFilter m_userTextFilter;
|
||||||
|
unordered_flat_set<Worker::ZoneThreadData*> m_filteredZones;
|
||||||
|
|
||||||
Region m_highlight;
|
Region m_highlight;
|
||||||
Region m_highlightZoom;
|
Region m_highlightZoom;
|
||||||
|
@ -543,6 +543,7 @@ void View::DrawFindZone()
|
|||||||
{
|
{
|
||||||
auto& ev = zones[i];
|
auto& ev = zones[i];
|
||||||
if( ev.Zone()->End() > rangeMax || ev.Zone()->Start() < rangeMin ) continue;
|
if( ev.Zone()->End() > rangeMax || ev.Zone()->Start() < rangeMin ) continue;
|
||||||
|
if( m_filteredZones.contains(&ev) ) continue;
|
||||||
if( selGroup == GetSelectionTarget( ev, groupBy ) )
|
if( selGroup == GetSelectionTarget( ev, groupBy ) )
|
||||||
{
|
{
|
||||||
const auto ctx = m_worker.GetContextSwitchData( m_worker.DecompressThread( zones[i].Thread() ) );
|
const auto ctx = m_worker.GetContextSwitchData( m_worker.DecompressThread( zones[i].Thread() ) );
|
||||||
@ -560,6 +561,7 @@ void View::DrawFindZone()
|
|||||||
for( size_t i=m_findZone.selSortNum; i<m_findZone.sortedNum; i++ )
|
for( size_t i=m_findZone.selSortNum; i<m_findZone.sortedNum; i++ )
|
||||||
{
|
{
|
||||||
auto& ev = zones[i];
|
auto& ev = zones[i];
|
||||||
|
if( m_filteredZones.contains(&ev) ) continue;
|
||||||
if( selGroup == GetSelectionTarget( ev, groupBy ) )
|
if( selGroup == GetSelectionTarget( ev, groupBy ) )
|
||||||
{
|
{
|
||||||
const auto ctx = m_worker.GetContextSwitchData( m_worker.DecompressThread( zones[i].Thread() ) );
|
const auto ctx = m_worker.GetContextSwitchData( m_worker.DecompressThread( zones[i].Thread() ) );
|
||||||
@ -581,6 +583,7 @@ void View::DrawFindZone()
|
|||||||
{
|
{
|
||||||
auto& ev = zones[i];
|
auto& ev = zones[i];
|
||||||
if( ev.Zone()->End() > rangeMax || ev.Zone()->Start() < rangeMin ) continue;
|
if( ev.Zone()->End() > rangeMax || ev.Zone()->Start() < rangeMin ) continue;
|
||||||
|
if( m_filteredZones.contains(&ev) ) continue;
|
||||||
if( selGroup == GetSelectionTarget( ev, groupBy ) )
|
if( selGroup == GetSelectionTarget( ev, groupBy ) )
|
||||||
{
|
{
|
||||||
const auto t = ev.Zone()->End() - ev.Zone()->Start() - GetZoneChildTimeFast( *ev.Zone() );
|
const auto t = ev.Zone()->End() - ev.Zone()->Start() - GetZoneChildTimeFast( *ev.Zone() );
|
||||||
@ -595,6 +598,7 @@ void View::DrawFindZone()
|
|||||||
for( size_t i=m_findZone.selSortNum; i<m_findZone.sortedNum; i++ )
|
for( size_t i=m_findZone.selSortNum; i<m_findZone.sortedNum; i++ )
|
||||||
{
|
{
|
||||||
auto& ev = zones[i];
|
auto& ev = zones[i];
|
||||||
|
if( m_filteredZones.contains(&ev) ) continue;
|
||||||
if( selGroup == GetSelectionTarget( ev, groupBy ) )
|
if( selGroup == GetSelectionTarget( ev, groupBy ) )
|
||||||
{
|
{
|
||||||
const auto t = ev.Zone()->End() - ev.Zone()->Start() - GetZoneChildTimeFast( *ev.Zone() );
|
const auto t = ev.Zone()->End() - ev.Zone()->Start() - GetZoneChildTimeFast( *ev.Zone() );
|
||||||
@ -613,6 +617,7 @@ void View::DrawFindZone()
|
|||||||
{
|
{
|
||||||
auto& ev = zones[i];
|
auto& ev = zones[i];
|
||||||
if( ev.Zone()->End() > rangeMax || ev.Zone()->Start() < rangeMin ) continue;
|
if( ev.Zone()->End() > rangeMax || ev.Zone()->Start() < rangeMin ) continue;
|
||||||
|
if( m_filteredZones.contains(&ev) ) continue;
|
||||||
if( selGroup == GetSelectionTarget( ev, groupBy ) )
|
if( selGroup == GetSelectionTarget( ev, groupBy ) )
|
||||||
{
|
{
|
||||||
const auto t = ev.Zone()->End() - ev.Zone()->Start();
|
const auto t = ev.Zone()->End() - ev.Zone()->Start();
|
||||||
@ -627,6 +632,7 @@ void View::DrawFindZone()
|
|||||||
for( size_t i=m_findZone.selSortNum; i<m_findZone.sortedNum; i++ )
|
for( size_t i=m_findZone.selSortNum; i<m_findZone.sortedNum; i++ )
|
||||||
{
|
{
|
||||||
auto& ev = zones[i];
|
auto& ev = zones[i];
|
||||||
|
if( m_filteredZones.contains(&ev) ) continue;
|
||||||
if( selGroup == GetSelectionTarget( ev, groupBy ) )
|
if( selGroup == GetSelectionTarget( ev, groupBy ) )
|
||||||
{
|
{
|
||||||
const auto t = ev.Zone()->End() - ev.Zone()->Start();
|
const auto t = ev.Zone()->End() - ev.Zone()->Start();
|
||||||
@ -1376,6 +1382,7 @@ void View::DrawFindZone()
|
|||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
if( filterChanged )
|
if( filterChanged )
|
||||||
{
|
{
|
||||||
|
m_filteredZones.clear();
|
||||||
m_findZone.ResetGroups();
|
m_findZone.ResetGroups();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1460,6 +1467,7 @@ void View::DrawFindZone()
|
|||||||
}
|
}
|
||||||
if( !keep )
|
if( !keep )
|
||||||
{
|
{
|
||||||
|
m_filteredZones.insert(&ev);
|
||||||
zptr++;
|
zptr++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user