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:
+12
-1
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user