mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
Use cached thread retriever.
This commit is contained in:
parent
5873561b54
commit
c9da5f1474
@ -3442,14 +3442,13 @@ void Worker::ProcessZoneBeginAllocSrcLocCallstack( const QueueZoneBegin& ev )
|
|||||||
|
|
||||||
void Worker::ProcessZoneEnd( const QueueZoneEnd& ev )
|
void Worker::ProcessZoneEnd( const QueueZoneEnd& ev )
|
||||||
{
|
{
|
||||||
auto tit = m_threadMap.find( m_threadCtx );
|
auto td = RetrieveThread( m_threadCtx );
|
||||||
if( tit == m_threadMap.end() || tit->second->zoneIdStack.empty() )
|
if( !td )
|
||||||
{
|
{
|
||||||
ZoneEndFailure( m_threadCtx );
|
ZoneEndFailure( m_threadCtx );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto td = tit->second;
|
|
||||||
auto zoneId = td->zoneIdStack.back_and_pop();
|
auto zoneId = td->zoneIdStack.back_and_pop();
|
||||||
if( zoneId != td->nextZoneId )
|
if( zoneId != td->nextZoneId )
|
||||||
{
|
{
|
||||||
@ -3710,14 +3709,13 @@ void Worker::ProcessFrameImage( const QueueFrameImage& ev )
|
|||||||
|
|
||||||
void Worker::ProcessZoneText( const QueueZoneText& ev )
|
void Worker::ProcessZoneText( const QueueZoneText& ev )
|
||||||
{
|
{
|
||||||
auto tit = m_threadMap.find( m_threadCtx );
|
auto td = RetrieveThread( m_threadCtx );
|
||||||
if( tit == m_threadMap.end() || tit->second->stack.empty() || tit->second->nextZoneId != tit->second->zoneIdStack.back() )
|
if( !td || td->stack.empty() || td->nextZoneId != td->zoneIdStack.back() )
|
||||||
{
|
{
|
||||||
ZoneTextFailure( m_threadCtx );
|
ZoneTextFailure( m_threadCtx );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto td = tit->second;
|
|
||||||
td->nextZoneId = 0;
|
td->nextZoneId = 0;
|
||||||
auto& stack = td->stack;
|
auto& stack = td->stack;
|
||||||
auto zone = stack.back();
|
auto zone = stack.back();
|
||||||
@ -3729,14 +3727,13 @@ void Worker::ProcessZoneText( const QueueZoneText& ev )
|
|||||||
|
|
||||||
void Worker::ProcessZoneName( const QueueZoneText& ev )
|
void Worker::ProcessZoneName( const QueueZoneText& ev )
|
||||||
{
|
{
|
||||||
auto tit = m_threadMap.find( m_threadCtx );
|
auto td = RetrieveThread( m_threadCtx );
|
||||||
if( tit == m_threadMap.end() || tit->second->stack.empty() || tit->second->nextZoneId != tit->second->zoneIdStack.back() )
|
if( !td || td->stack.empty() || td->nextZoneId != td->zoneIdStack.back() )
|
||||||
{
|
{
|
||||||
ZoneNameFailure( m_threadCtx );
|
ZoneNameFailure( m_threadCtx );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto td = tit->second;
|
|
||||||
td->nextZoneId = 0;
|
td->nextZoneId = 0;
|
||||||
auto& stack = td->stack;
|
auto& stack = td->stack;
|
||||||
auto zone = stack.back();
|
auto zone = stack.back();
|
||||||
|
Loading…
Reference in New Issue
Block a user