mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Add zone value failure context.
This commit is contained in:
parent
9300934fa5
commit
930ef77ea9
@ -480,6 +480,10 @@ bool View::Draw()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::TextDisabled( "(%s)", RealToString( data.thread ) );
|
ImGui::TextDisabled( "(%s)", RealToString( data.thread ) );
|
||||||
}
|
}
|
||||||
|
if( !data.message.empty() )
|
||||||
|
{
|
||||||
|
TextFocused( "Context:", data.message.c_str() );
|
||||||
|
}
|
||||||
if( data.callstack != 0 )
|
if( data.callstack != 0 )
|
||||||
{
|
{
|
||||||
if( ImGui::TreeNode( "Call stack" ) )
|
if( ImGui::TreeNode( "Call stack" ) )
|
||||||
|
@ -4844,10 +4844,21 @@ void Worker::ZoneTextFailure( uint64_t thread )
|
|||||||
m_failureData.thread = thread;
|
m_failureData.thread = thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::ZoneValueFailure( uint64_t thread )
|
void Worker::ZoneValueFailure( uint64_t thread, uint64_t value )
|
||||||
{
|
{
|
||||||
|
char buf[128];
|
||||||
|
if( (int64_t)value < 0 )
|
||||||
|
{
|
||||||
|
sprintf( buf, "Zone value was: %" PRIu64 " (unsigned), %" PRIi64 " (signed)", value, (int64_t)value );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( buf, "Zone value was: %" PRIu64, value );
|
||||||
|
}
|
||||||
|
|
||||||
m_failure = Failure::ZoneValue;
|
m_failure = Failure::ZoneValue;
|
||||||
m_failureData.thread = thread;
|
m_failureData.thread = thread;
|
||||||
|
m_failureData.message = buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::ZoneColorFailure( uint64_t thread )
|
void Worker::ZoneColorFailure( uint64_t thread )
|
||||||
@ -5120,7 +5131,7 @@ void Worker::ProcessZoneValue( const QueueZoneValue& ev )
|
|||||||
auto td = RetrieveThread( m_threadCtx );
|
auto td = RetrieveThread( m_threadCtx );
|
||||||
if( !td || td->stack.empty() || td->nextZoneId != td->zoneIdStack.back() )
|
if( !td || td->stack.empty() || td->nextZoneId != td->zoneIdStack.back() )
|
||||||
{
|
{
|
||||||
ZoneValueFailure( m_threadCtx );
|
ZoneValueFailure( m_threadCtx, ev.value );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,6 +381,7 @@ private:
|
|||||||
uint64_t thread;
|
uint64_t thread;
|
||||||
int16_t srcloc;
|
int16_t srcloc;
|
||||||
uint32_t callstack;
|
uint32_t callstack;
|
||||||
|
std::string message;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FrameImagePending
|
struct FrameImagePending
|
||||||
@ -715,7 +716,7 @@ private:
|
|||||||
void ZoneStackFailure( uint64_t thread, const ZoneEvent* ev );
|
void ZoneStackFailure( uint64_t thread, const ZoneEvent* ev );
|
||||||
void ZoneDoubleEndFailure( uint64_t thread, const ZoneEvent* ev );
|
void ZoneDoubleEndFailure( uint64_t thread, const ZoneEvent* ev );
|
||||||
void ZoneTextFailure( uint64_t thread );
|
void ZoneTextFailure( uint64_t thread );
|
||||||
void ZoneValueFailure( uint64_t thread );
|
void ZoneValueFailure( uint64_t thread, uint64_t value );
|
||||||
void ZoneColorFailure( uint64_t thread );
|
void ZoneColorFailure( uint64_t thread );
|
||||||
void ZoneNameFailure( uint64_t thread );
|
void ZoneNameFailure( uint64_t thread );
|
||||||
void MemFreeFailure( uint64_t thread );
|
void MemFreeFailure( uint64_t thread );
|
||||||
|
Loading…
Reference in New Issue
Block a user