Add fiber failures.

This commit is contained in:
Bartosz Taudul 2021-11-02 01:47:31 +01:00
parent 93b6d88c4c
commit bb72bf10e9
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 16 additions and 0 deletions

View File

@ -4958,6 +4958,16 @@ void Worker::FrameImageTwiceFailure()
m_failure = Failure::FrameImageTwice; m_failure = Failure::FrameImageTwice;
} }
void Worker::FiberEnterFailure()
{
m_failure = Failure::FiberEnter;
}
void Worker::FiberLeaveFailure()
{
m_failure = Failure::FiberLeave;
}
void Worker::ProcessZoneValidation( const QueueZoneValidation& ev ) void Worker::ProcessZoneValidation( const QueueZoneValidation& ev )
{ {
auto td = m_threadCtxData; auto td = m_threadCtxData;
@ -8006,6 +8016,8 @@ static const char* s_failureReasons[] = {
"Discontinuous frame begin/end mismatch.", "Discontinuous frame begin/end mismatch.",
"Frame image offset is invalid.", "Frame image offset is invalid.",
"Multiple frame images were sent for a single frame.", "Multiple frame images were sent for a single frame.",
"Fiber execution started on a thread which is already executing a fiber.",
"Fiber execution stopped on a thread which is not executing a fiber.",
}; };
static_assert( sizeof( s_failureReasons ) / sizeof( *s_failureReasons ) == (int)Worker::Failure::NUM_FAILURES, "Missing failure reason description." ); static_assert( sizeof( s_failureReasons ) / sizeof( *s_failureReasons ) == (int)Worker::Failure::NUM_FAILURES, "Missing failure reason description." );

View File

@ -405,6 +405,8 @@ public:
FrameEnd, FrameEnd,
FrameImageIndex, FrameImageIndex,
FrameImageTwice, FrameImageTwice,
FiberEnter,
FiberLeave,
NUM_FAILURES NUM_FAILURES
}; };
@ -725,6 +727,8 @@ private:
void FrameEndFailure(); void FrameEndFailure();
void FrameImageIndexFailure(); void FrameImageIndexFailure();
void FrameImageTwiceFailure(); void FrameImageTwiceFailure();
void FiberEnterFailure();
void FiberLeaveFailure();
tracy_force_inline void CheckSourceLocation( uint64_t ptr ); tracy_force_inline void CheckSourceLocation( uint64_t ptr );
void NewSourceLocation( uint64_t ptr ); void NewSourceLocation( uint64_t ptr );