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:
Bartosz Taudul
2026-07-28 23:49:01 +02:00
parent 6b2abcb47a
commit ead931ef3c
@@ -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 } );