1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Changes logic for only (in)active allocations frame tree:

- Swaps logic to:
    - skip active allocations if only inactive should be
   displayed
   - skip inactive allocations if only active should be displayed
This commit is contained in:
Erik Griese 2024-03-07 17:26:08 +01:00
parent 5461427493
commit da75d9b2f6

View File

@ -70,7 +70,7 @@ unordered_flat_map<uint32_t, View::MemPathData> View::GetCallstackPaths( const M
{
auto& ev = *it++;
if( ev.CsAlloc() == 0 ) continue;
if( ( memRange == MemRange::Inactive ) == ( ev.TimeFree() >= 0 && ev.TimeFree() < m_memInfo.range.max ) ) continue;
if( ( memRange == MemRange::Inactive ) != ( ev.TimeFree() >= 0 && ev.TimeFree() < m_memInfo.range.max ) ) continue;
auto pit = pathSum.find( ev.CsAlloc() );
if( pit == pathSum.end() )
{
@ -110,7 +110,7 @@ unordered_flat_map<uint32_t, View::MemPathData> View::GetCallstackPaths( const M
for( auto& ev : mem.data )
{
if( ev.CsAlloc() == 0 ) continue;
if( ( memRange == MemRange::Inactive ) == ( ev.TimeFree() >= 0 ) ) continue;
if( ( memRange == MemRange::Inactive ) != ( ev.TimeFree() >= 0 ) ) continue;
auto it = pathSum.find( ev.CsAlloc() );
if( it == pathSum.end() )
{