mirror of
https://github.com/wolfpld/tracy.git
synced 2026-11-19 22:25:59 +00:00
Safeguard against zero count entries in statistics list.
There is a legitimate, if rare, way to get nonReentrantCount == 0 with total != 0 — an outer zone that never terminated before the capture ended, whose reentrant inner zone did terminate. The outer never contributes to slz (no end event), but it did increment the stack count, so the inner one is correctly recorded as a reentry.
This commit is contained in:
@@ -245,6 +245,7 @@ void View::DrawStatistics()
|
||||
total = it->second.nonReentrantTotal;
|
||||
break;
|
||||
}
|
||||
if( count == 0 ) continue;
|
||||
if( !filterActive )
|
||||
{
|
||||
srcloc.push_back_no_space_check( SrcLocZonesSlim { it->first, (uint16_t)it->second.threadCnt.size(), count, total } );
|
||||
|
||||
Reference in New Issue
Block a user