No need for lean callstack alloc message.

This commit is contained in:
Bartosz Taudul 2020-07-26 14:25:32 +02:00
parent 18713de70c
commit 4252cac654
4 changed files with 10 additions and 14 deletions

View File

@ -183,8 +183,8 @@ static tracy_force_inline void SendLuaCallstack( lua_State* L, uint32_t depth )
assert( dst - ptr == spaceNeeded + 2 );
TracyLfqPrepare( QueueType::CallstackAlloc );
MemWrite( &item->callstackAlloc.ptr, (uint64_t)ptr );
MemWrite( &item->callstackAlloc.nativePtr, (uint64_t)Callstack( depth ) );
MemWrite( &item->callstackAllocFat.ptr, (uint64_t)ptr );
MemWrite( &item->callstackAllocFat.nativePtr, (uint64_t)Callstack( depth ) );
TracyLfqCommit;
}

View File

@ -1737,9 +1737,9 @@ static void FreeAssociatedMemory( const QueueItem& item )
tracy_free( (void*)ptr );
break;
case QueueType::CallstackAlloc:
ptr = MemRead<uint64_t>( &item.callstackAlloc.nativePtr );
ptr = MemRead<uint64_t>( &item.callstackAllocFat.nativePtr );
tracy_free( (void*)ptr );
ptr = MemRead<uint64_t>( &item.callstackAlloc.ptr );
ptr = MemRead<uint64_t>( &item.callstackAllocFat.ptr );
tracy_free( (void*)ptr );
break;
case QueueType::CallstackSample:
@ -1880,18 +1880,16 @@ Profiler::DequeueStatus Profiler::Dequeue( moodycamel::ConsumerToken& token )
tracy_free( (void*)ptr );
break;
case QueueType::CallstackAlloc:
ptr = MemRead<uint64_t>( &item->callstackAlloc.nativePtr );
ptr = MemRead<uint64_t>( &item->callstackAllocFat.nativePtr );
if( ptr != 0 )
{
CutCallstack( (void*)ptr, "lua_pcall" );
SendCallstackPayload( ptr );
tracy_free( (void*)ptr );
}
ptr = MemRead<uint64_t>( &item->callstackAlloc.ptr );
ptr = MemRead<uint64_t>( &item->callstackAllocFat.ptr );
SendCallstackAlloc( ptr );
tracy_free( (void*)ptr );
idx++;
MemWrite( &item->hdr.idx, idx );
break;
case QueueType::CallstackSample:
{

View File

@ -22,7 +22,6 @@ enum class QueueType : uint8_t
CallstackMemory,
Callstack,
CallstackAlloc,
CallstackAllocLean,
CallstackSample,
CallstackSampleLean,
FrameImage,
@ -360,7 +359,7 @@ struct QueueCallstackFat
uint64_t ptr;
};
struct QueueCallstackAlloc
struct QueueCallstackAllocFat
{
uint64_t ptr;
uint64_t nativePtr;
@ -513,7 +512,7 @@ struct QueueItem
QueueMemAlloc memAlloc;
QueueMemFree memFree;
QueueCallstackFat callstackFat;
QueueCallstackAlloc callstackAlloc;
QueueCallstackAllocFat callstackAllocFat;
QueueCallstackSample callstackSample;
QueueCallstackSampleLean callstackSampleLean;
QueueCallstackFrameSize callstackFrameSize;
@ -549,8 +548,7 @@ static constexpr size_t QueueDataSize[] = {
sizeof( QueueHeader ) + sizeof( QueueZoneBeginLean ), // lean allocated source location, callstack
sizeof( QueueHeader ), // callstack memory
sizeof( QueueHeader ), // callstack
sizeof( QueueHeader ) + sizeof( QueueCallstackAlloc ), // not for network transfer
sizeof( QueueHeader ), // lean callstack alloc
sizeof( QueueHeader ), // callstack alloc
sizeof( QueueHeader ) + sizeof( QueueCallstackSample ), // not for network transfer
sizeof( QueueHeader ) + sizeof( QueueCallstackSampleLean ),
sizeof( QueueHeader ) + sizeof( QueueFrameImage ),

View File

@ -4029,7 +4029,7 @@ bool Worker::Process( const QueueItem& ev )
case QueueType::Callstack:
ProcessCallstack();
break;
case QueueType::CallstackAllocLean:
case QueueType::CallstackAlloc:
ProcessCallstackAlloc();
break;
case QueueType::CallstackSampleLean: