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

Gracefully store failure states.

This commit is contained in:
Bartosz Taudul
2019-01-14 23:22:31 +01:00
parent 4dc339c933
commit c3246ca3b5
2 changed files with 33 additions and 1 deletions
+12 -1
View File
@@ -2282,7 +2282,11 @@ bool Worker::ProcessZoneEnd( const QueueZoneEnd& ev )
auto td = tit->second;
assert( !td->zoneIdStack.empty() );
auto zoneId = td->zoneIdStack.back_and_pop();
if( zoneId != td->nextZoneId ) return false;
if( zoneId != td->nextZoneId )
{
ZoneStackFailure( ev.thread, td->stack.back() );
return false;
}
td->nextZoneId = 0;
auto& stack = td->stack;
@@ -2320,6 +2324,13 @@ bool Worker::ProcessZoneEnd( const QueueZoneEnd& ev )
return true;
}
void Worker::ZoneStackFailure( uint64_t thread, const ZoneEvent* ev )
{
m_failure = Failure::ZoneStack;
m_failureData.thread = thread;
m_failureData.srcloc = ev->srcloc;
}
void Worker::ProcessZoneValidation( const QueueZoneValidation& ev )
{
auto td = NoticeThread( ev.thread );