mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Send lean callstacks.
This commit is contained in:
parent
f0ade07be8
commit
5a774c82cc
@ -1817,6 +1817,8 @@ Profiler::DequeueStatus Profiler::Dequeue( moodycamel::ConsumerToken& token )
|
|||||||
ptr = MemRead<uint64_t>( &item->callstack.ptr );
|
ptr = MemRead<uint64_t>( &item->callstack.ptr );
|
||||||
SendCallstackPayload( ptr );
|
SendCallstackPayload( ptr );
|
||||||
tracy_free( (void*)ptr );
|
tracy_free( (void*)ptr );
|
||||||
|
idx++;
|
||||||
|
MemWrite( &item->hdr.idx, idx );
|
||||||
break;
|
break;
|
||||||
case QueueType::CallstackAlloc:
|
case QueueType::CallstackAlloc:
|
||||||
ptr = MemRead<uint64_t>( &item->callstackAlloc.nativePtr );
|
ptr = MemRead<uint64_t>( &item->callstackAlloc.nativePtr );
|
||||||
|
@ -22,6 +22,7 @@ enum class QueueType : uint8_t
|
|||||||
CallstackMemory,
|
CallstackMemory,
|
||||||
CallstackMemoryLean,
|
CallstackMemoryLean,
|
||||||
Callstack,
|
Callstack,
|
||||||
|
CallstackLean,
|
||||||
CallstackAlloc,
|
CallstackAlloc,
|
||||||
CallstackSample,
|
CallstackSample,
|
||||||
FrameImage,
|
FrameImage,
|
||||||
@ -485,7 +486,8 @@ static constexpr size_t QueueDataSize[] = {
|
|||||||
sizeof( QueueHeader ) + sizeof( QueueZoneBeginLean ), // lean allocated source location, callstack
|
sizeof( QueueHeader ) + sizeof( QueueZoneBeginLean ), // lean allocated source location, callstack
|
||||||
sizeof( QueueHeader ) + sizeof( QueueCallstackMemory ), // not for network transfer
|
sizeof( QueueHeader ) + sizeof( QueueCallstackMemory ), // not for network transfer
|
||||||
sizeof( QueueHeader ), // lean callstack memory
|
sizeof( QueueHeader ), // lean callstack memory
|
||||||
sizeof( QueueHeader ) + sizeof( QueueCallstack ),
|
sizeof( QueueHeader ) + sizeof( QueueCallstack ), // not for network transfer
|
||||||
|
sizeof( QueueHeader ), // lean callstack
|
||||||
sizeof( QueueHeader ) + sizeof( QueueCallstackAlloc ),
|
sizeof( QueueHeader ) + sizeof( QueueCallstackAlloc ),
|
||||||
sizeof( QueueHeader ) + sizeof( QueueCallstackSample ),
|
sizeof( QueueHeader ) + sizeof( QueueCallstackSample ),
|
||||||
sizeof( QueueHeader ) + sizeof( QueueFrameImage ),
|
sizeof( QueueHeader ) + sizeof( QueueFrameImage ),
|
||||||
|
@ -4185,8 +4185,8 @@ bool Worker::Process( const QueueItem& ev )
|
|||||||
case QueueType::CallstackMemoryLean:
|
case QueueType::CallstackMemoryLean:
|
||||||
ProcessCallstackMemory();
|
ProcessCallstackMemory();
|
||||||
break;
|
break;
|
||||||
case QueueType::Callstack:
|
case QueueType::CallstackLean:
|
||||||
ProcessCallstack( ev.callstack );
|
ProcessCallstack();
|
||||||
break;
|
break;
|
||||||
case QueueType::CallstackAlloc:
|
case QueueType::CallstackAlloc:
|
||||||
ProcessCallstackAlloc( ev.callstackAlloc );
|
ProcessCallstackAlloc( ev.callstackAlloc );
|
||||||
@ -5334,9 +5334,9 @@ void Worker::ProcessCallstackMemory()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::ProcessCallstack( const QueueCallstack& ev )
|
void Worker::ProcessCallstack()
|
||||||
{
|
{
|
||||||
assert( m_pendingCallstackPtr == ev.ptr );
|
assert( m_pendingCallstackPtr != 0 );
|
||||||
m_pendingCallstackPtr = 0;
|
m_pendingCallstackPtr = 0;
|
||||||
|
|
||||||
auto nit = m_nextCallstack.find( m_threadCtx );
|
auto nit = m_nextCallstack.find( m_threadCtx );
|
||||||
|
@ -600,7 +600,7 @@ private:
|
|||||||
tracy_force_inline void ProcessMemAllocCallstack( const QueueMemAlloc& ev );
|
tracy_force_inline void ProcessMemAllocCallstack( const QueueMemAlloc& ev );
|
||||||
tracy_force_inline void ProcessMemFreeCallstack( const QueueMemFree& ev );
|
tracy_force_inline void ProcessMemFreeCallstack( const QueueMemFree& ev );
|
||||||
tracy_force_inline void ProcessCallstackMemory();
|
tracy_force_inline void ProcessCallstackMemory();
|
||||||
tracy_force_inline void ProcessCallstack( const QueueCallstack& ev );
|
tracy_force_inline void ProcessCallstack();
|
||||||
tracy_force_inline void ProcessCallstackAlloc( const QueueCallstackAlloc& ev );
|
tracy_force_inline void ProcessCallstackAlloc( const QueueCallstackAlloc& ev );
|
||||||
tracy_force_inline void ProcessCallstackSample( const QueueCallstackSample& ev );
|
tracy_force_inline void ProcessCallstackSample( const QueueCallstackSample& ev );
|
||||||
tracy_force_inline void ProcessCallstackFrameSize( const QueueCallstackFrameSize& ev );
|
tracy_force_inline void ProcessCallstackFrameSize( const QueueCallstackFrameSize& ev );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user