mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
Separate processing for allocated callstacks.
Only native callstack is used for the moment.
This commit is contained in:
parent
d229c1bc1b
commit
3e81e44d75
@ -2410,9 +2410,11 @@ bool Worker::Process( const QueueItem& ev )
|
||||
ProcessCallstackMemory( ev.callstackMemory );
|
||||
break;
|
||||
case QueueType::Callstack:
|
||||
case QueueType::CallstackAlloc:
|
||||
ProcessCallstack( ev.callstack );
|
||||
break;
|
||||
case QueueType::CallstackAlloc:
|
||||
ProcessCallstackAlloc( ev.callstackAlloc );
|
||||
break;
|
||||
case QueueType::CallstackFrameSize:
|
||||
ProcessCallstackFrameSize( ev.callstackFrameSize );
|
||||
break;
|
||||
@ -3209,6 +3211,37 @@ void Worker::ProcessCallstack( const QueueCallstack& ev )
|
||||
m_pendingCallstacks.erase( it );
|
||||
}
|
||||
|
||||
void Worker::ProcessCallstackAlloc( const QueueCallstackAlloc& ev )
|
||||
{
|
||||
auto it = m_pendingCallstacks.find( ev.nativePtr );
|
||||
assert( it != m_pendingCallstacks.end() );
|
||||
auto itAlloc = m_pendingCallstacks.find( ev.ptr );
|
||||
assert( itAlloc != m_pendingCallstacks.end() );
|
||||
|
||||
auto nit = m_nextCallstack.find( ev.thread );
|
||||
assert( nit != m_nextCallstack.end() );
|
||||
auto& next = nit->second;
|
||||
|
||||
switch( next.type )
|
||||
{
|
||||
case NextCallstackType::Zone:
|
||||
next.zone->callstack = it->second;
|
||||
break;
|
||||
case NextCallstackType::Gpu:
|
||||
next.gpu->callstack = it->second;
|
||||
break;
|
||||
case NextCallstackType::Crash:
|
||||
m_data.m_crashEvent.callstack = it->second;
|
||||
break;
|
||||
default:
|
||||
assert( false );
|
||||
break;
|
||||
}
|
||||
|
||||
m_pendingCallstacks.erase( it );
|
||||
m_pendingCallstacks.erase( itAlloc );
|
||||
}
|
||||
|
||||
void Worker::ProcessCallstackFrameSize( const QueueCallstackFrameSize& ev )
|
||||
{
|
||||
assert( !m_callstackFrameStaging );
|
||||
|
@ -382,6 +382,7 @@ private:
|
||||
tracy_force_inline void ProcessMemFreeCallstack( const QueueMemFree& ev );
|
||||
tracy_force_inline void ProcessCallstackMemory( const QueueCallstackMemory& ev );
|
||||
tracy_force_inline void ProcessCallstack( const QueueCallstack& ev );
|
||||
tracy_force_inline void ProcessCallstackAlloc( const QueueCallstackAlloc& ev );
|
||||
tracy_force_inline void ProcessCallstackFrameSize( const QueueCallstackFrameSize& ev );
|
||||
tracy_force_inline void ProcessCallstackFrame( const QueueCallstackFrame& ev );
|
||||
tracy_force_inline void ProcessCrashReport( const QueueCrashReport& ev );
|
||||
|
Loading…
Reference in New Issue
Block a user