mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
No need for lean callstack sample message.
This commit is contained in:
parent
4252cac654
commit
062bb3044f
@ -1743,7 +1743,7 @@ static void FreeAssociatedMemory( const QueueItem& item )
|
||||
tracy_free( (void*)ptr );
|
||||
break;
|
||||
case QueueType::CallstackSample:
|
||||
ptr = MemRead<uint64_t>( &item.callstackSample.ptr );
|
||||
ptr = MemRead<uint64_t>( &item.callstackSampleFat.ptr );
|
||||
tracy_free( (void*)ptr );
|
||||
break;
|
||||
case QueueType::FrameImage:
|
||||
@ -1893,15 +1893,13 @@ Profiler::DequeueStatus Profiler::Dequeue( moodycamel::ConsumerToken& token )
|
||||
break;
|
||||
case QueueType::CallstackSample:
|
||||
{
|
||||
ptr = MemRead<uint64_t>( &item->callstackSample.ptr );
|
||||
ptr = MemRead<uint64_t>( &item->callstackSampleFat.ptr );
|
||||
SendCallstackPayload64( ptr );
|
||||
tracy_free( (void*)ptr );
|
||||
int64_t t = MemRead<int64_t>( &item->callstackSample.time );
|
||||
int64_t t = MemRead<int64_t>( &item->callstackSampleFat.time );
|
||||
int64_t dt = t - refCtx;
|
||||
refCtx = t;
|
||||
MemWrite( &item->callstackSample.time, dt );
|
||||
idx++;
|
||||
MemWrite( &item->hdr.idx, idx );
|
||||
MemWrite( &item->callstackSampleFat.time, dt );
|
||||
break;
|
||||
}
|
||||
case QueueType::FrameImage:
|
||||
|
@ -186,9 +186,9 @@ void WINAPI EventRecordCallback( PEVENT_RECORD record )
|
||||
memcpy( trace, &sz, sizeof( uint64_t ) );
|
||||
memcpy( trace+1, sw->stack, sizeof( uint64_t ) * sz );
|
||||
TracyLfqPrepare( QueueType::CallstackSample );
|
||||
MemWrite( &item->callstackSample.time, sw->eventTimeStamp );
|
||||
MemWrite( &item->callstackSample.thread, (uint64_t)sw->stackThread );
|
||||
MemWrite( &item->callstackSample.ptr, (uint64_t)trace );
|
||||
MemWrite( &item->callstackSampleFat.time, sw->eventTimeStamp );
|
||||
MemWrite( &item->callstackSampleFat.thread, (uint64_t)sw->stackThread );
|
||||
MemWrite( &item->callstackSampleFat.ptr, (uint64_t)trace );
|
||||
TracyLfqCommit;
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ enum class QueueType : uint8_t
|
||||
Callstack,
|
||||
CallstackAlloc,
|
||||
CallstackSample,
|
||||
CallstackSampleLean,
|
||||
FrameImage,
|
||||
ZoneBegin,
|
||||
ZoneBeginCallstack,
|
||||
@ -365,13 +364,13 @@ struct QueueCallstackAllocFat
|
||||
uint64_t nativePtr;
|
||||
};
|
||||
|
||||
struct QueueCallstackSampleLean
|
||||
struct QueueCallstackSample
|
||||
{
|
||||
int64_t time;
|
||||
uint64_t thread;
|
||||
};
|
||||
|
||||
struct QueueCallstackSample : public QueueCallstackSampleLean
|
||||
struct QueueCallstackSampleFat : public QueueCallstackSample
|
||||
{
|
||||
uint64_t ptr;
|
||||
};
|
||||
@ -514,7 +513,7 @@ struct QueueItem
|
||||
QueueCallstackFat callstackFat;
|
||||
QueueCallstackAllocFat callstackAllocFat;
|
||||
QueueCallstackSample callstackSample;
|
||||
QueueCallstackSampleLean callstackSampleLean;
|
||||
QueueCallstackSampleFat callstackSampleFat;
|
||||
QueueCallstackFrameSize callstackFrameSize;
|
||||
QueueCallstackFrame callstackFrame;
|
||||
QueueSymbolInformation symbolInformation;
|
||||
@ -549,8 +548,7 @@ static constexpr size_t QueueDataSize[] = {
|
||||
sizeof( QueueHeader ), // callstack memory
|
||||
sizeof( QueueHeader ), // callstack
|
||||
sizeof( QueueHeader ), // callstack alloc
|
||||
sizeof( QueueHeader ) + sizeof( QueueCallstackSample ), // not for network transfer
|
||||
sizeof( QueueHeader ) + sizeof( QueueCallstackSampleLean ),
|
||||
sizeof( QueueHeader ) + sizeof( QueueCallstackSample ),
|
||||
sizeof( QueueHeader ) + sizeof( QueueFrameImage ),
|
||||
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ),
|
||||
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ), // callstack
|
||||
|
@ -4032,8 +4032,8 @@ bool Worker::Process( const QueueItem& ev )
|
||||
case QueueType::CallstackAlloc:
|
||||
ProcessCallstackAlloc();
|
||||
break;
|
||||
case QueueType::CallstackSampleLean:
|
||||
ProcessCallstackSample( ev.callstackSampleLean );
|
||||
case QueueType::CallstackSample:
|
||||
ProcessCallstackSample( ev.callstackSample );
|
||||
break;
|
||||
case QueueType::CallstackFrameSize:
|
||||
ProcessCallstackFrameSize( ev.callstackFrameSize );
|
||||
@ -5288,7 +5288,7 @@ void Worker::ProcessCallstackAlloc()
|
||||
}
|
||||
}
|
||||
|
||||
void Worker::ProcessCallstackSample( const QueueCallstackSampleLean& ev )
|
||||
void Worker::ProcessCallstackSample( const QueueCallstackSample& ev )
|
||||
{
|
||||
assert( m_pendingCallstackPtr != 0 );
|
||||
m_pendingCallstackPtr = 0;
|
||||
|
@ -651,7 +651,7 @@ private:
|
||||
tracy_force_inline void ProcessCallstackMemory();
|
||||
tracy_force_inline void ProcessCallstack();
|
||||
tracy_force_inline void ProcessCallstackAlloc();
|
||||
tracy_force_inline void ProcessCallstackSample( const QueueCallstackSampleLean& ev );
|
||||
tracy_force_inline void ProcessCallstackSample( const QueueCallstackSample& ev );
|
||||
tracy_force_inline void ProcessCallstackFrameSize( const QueueCallstackFrameSize& ev );
|
||||
tracy_force_inline void ProcessCallstackFrame( const QueueCallstackFrame& ev );
|
||||
tracy_force_inline void ProcessSymbolInformation( const QueueSymbolInformation& ev );
|
||||
|
Loading…
Reference in New Issue
Block a user