mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Simplify failure detection code.
This commit is contained in:
parent
3e3ee0ec2f
commit
76ab70a948
@ -2105,7 +2105,7 @@ bool Worker::Process( const QueueItem& ev )
|
|||||||
ProcessZoneBeginAllocSrcLoc( ev.zoneBegin );
|
ProcessZoneBeginAllocSrcLoc( ev.zoneBegin );
|
||||||
break;
|
break;
|
||||||
case QueueType::ZoneEnd:
|
case QueueType::ZoneEnd:
|
||||||
if( !ProcessZoneEnd( ev.zoneEnd ) ) return false;
|
ProcessZoneEnd( ev.zoneEnd );
|
||||||
break;
|
break;
|
||||||
case QueueType::ZoneValidation:
|
case QueueType::ZoneValidation:
|
||||||
ProcessZoneValidation( ev.zoneValidation );
|
ProcessZoneValidation( ev.zoneValidation );
|
||||||
@ -2216,7 +2216,7 @@ bool Worker::Process( const QueueItem& ev )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return m_failure == Failure::None;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::ProcessZoneBeginImpl( ZoneEvent* zone, const QueueZoneBegin& ev )
|
void Worker::ProcessZoneBeginImpl( ZoneEvent* zone, const QueueZoneBegin& ev )
|
||||||
@ -2274,7 +2274,7 @@ void Worker::ProcessZoneBeginAllocSrcLoc( const QueueZoneBegin& ev )
|
|||||||
m_pendingSourceLocationPayload.erase( it );
|
m_pendingSourceLocationPayload.erase( it );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Worker::ProcessZoneEnd( const QueueZoneEnd& ev )
|
void Worker::ProcessZoneEnd( const QueueZoneEnd& ev )
|
||||||
{
|
{
|
||||||
auto tit = m_threadMap.find( ev.thread );
|
auto tit = m_threadMap.find( ev.thread );
|
||||||
assert( tit != m_threadMap.end() );
|
assert( tit != m_threadMap.end() );
|
||||||
@ -2285,7 +2285,7 @@ bool Worker::ProcessZoneEnd( const QueueZoneEnd& ev )
|
|||||||
if( zoneId != td->nextZoneId )
|
if( zoneId != td->nextZoneId )
|
||||||
{
|
{
|
||||||
ZoneStackFailure( ev.thread, td->stack.back() );
|
ZoneStackFailure( ev.thread, td->stack.back() );
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
td->nextZoneId = 0;
|
td->nextZoneId = 0;
|
||||||
|
|
||||||
@ -2320,8 +2320,6 @@ bool Worker::ProcessZoneEnd( const QueueZoneEnd& ev )
|
|||||||
it->second.selfTotal += timeSpan;
|
it->second.selfTotal += timeSpan;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::ZoneStackFailure( uint64_t thread, const ZoneEvent* ev )
|
void Worker::ZoneStackFailure( uint64_t thread, const ZoneEvent* ev )
|
||||||
|
@ -297,7 +297,7 @@ private:
|
|||||||
tracy_force_inline void ProcessZoneBegin( const QueueZoneBegin& ev );
|
tracy_force_inline void ProcessZoneBegin( const QueueZoneBegin& ev );
|
||||||
tracy_force_inline void ProcessZoneBeginCallstack( const QueueZoneBegin& ev );
|
tracy_force_inline void ProcessZoneBeginCallstack( const QueueZoneBegin& ev );
|
||||||
tracy_force_inline void ProcessZoneBeginAllocSrcLoc( const QueueZoneBegin& ev );
|
tracy_force_inline void ProcessZoneBeginAllocSrcLoc( const QueueZoneBegin& ev );
|
||||||
tracy_force_inline bool ProcessZoneEnd( const QueueZoneEnd& ev );
|
tracy_force_inline void ProcessZoneEnd( const QueueZoneEnd& ev );
|
||||||
tracy_force_inline void ProcessZoneValidation( const QueueZoneValidation& ev );
|
tracy_force_inline void ProcessZoneValidation( const QueueZoneValidation& ev );
|
||||||
tracy_force_inline void ProcessFrameMark( const QueueFrameMark& ev );
|
tracy_force_inline void ProcessFrameMark( const QueueFrameMark& ev );
|
||||||
tracy_force_inline void ProcessFrameMarkStart( const QueueFrameMark& ev );
|
tracy_force_inline void ProcessFrameMarkStart( const QueueFrameMark& ev );
|
||||||
|
Loading…
Reference in New Issue
Block a user