mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
No need for lean callstack alloc message.
This commit is contained in:
parent
18713de70c
commit
4252cac654
@ -183,8 +183,8 @@ static tracy_force_inline void SendLuaCallstack( lua_State* L, uint32_t depth )
|
|||||||
assert( dst - ptr == spaceNeeded + 2 );
|
assert( dst - ptr == spaceNeeded + 2 );
|
||||||
|
|
||||||
TracyLfqPrepare( QueueType::CallstackAlloc );
|
TracyLfqPrepare( QueueType::CallstackAlloc );
|
||||||
MemWrite( &item->callstackAlloc.ptr, (uint64_t)ptr );
|
MemWrite( &item->callstackAllocFat.ptr, (uint64_t)ptr );
|
||||||
MemWrite( &item->callstackAlloc.nativePtr, (uint64_t)Callstack( depth ) );
|
MemWrite( &item->callstackAllocFat.nativePtr, (uint64_t)Callstack( depth ) );
|
||||||
TracyLfqCommit;
|
TracyLfqCommit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1737,9 +1737,9 @@ static void FreeAssociatedMemory( const QueueItem& item )
|
|||||||
tracy_free( (void*)ptr );
|
tracy_free( (void*)ptr );
|
||||||
break;
|
break;
|
||||||
case QueueType::CallstackAlloc:
|
case QueueType::CallstackAlloc:
|
||||||
ptr = MemRead<uint64_t>( &item.callstackAlloc.nativePtr );
|
ptr = MemRead<uint64_t>( &item.callstackAllocFat.nativePtr );
|
||||||
tracy_free( (void*)ptr );
|
tracy_free( (void*)ptr );
|
||||||
ptr = MemRead<uint64_t>( &item.callstackAlloc.ptr );
|
ptr = MemRead<uint64_t>( &item.callstackAllocFat.ptr );
|
||||||
tracy_free( (void*)ptr );
|
tracy_free( (void*)ptr );
|
||||||
break;
|
break;
|
||||||
case QueueType::CallstackSample:
|
case QueueType::CallstackSample:
|
||||||
@ -1880,18 +1880,16 @@ Profiler::DequeueStatus Profiler::Dequeue( moodycamel::ConsumerToken& token )
|
|||||||
tracy_free( (void*)ptr );
|
tracy_free( (void*)ptr );
|
||||||
break;
|
break;
|
||||||
case QueueType::CallstackAlloc:
|
case QueueType::CallstackAlloc:
|
||||||
ptr = MemRead<uint64_t>( &item->callstackAlloc.nativePtr );
|
ptr = MemRead<uint64_t>( &item->callstackAllocFat.nativePtr );
|
||||||
if( ptr != 0 )
|
if( ptr != 0 )
|
||||||
{
|
{
|
||||||
CutCallstack( (void*)ptr, "lua_pcall" );
|
CutCallstack( (void*)ptr, "lua_pcall" );
|
||||||
SendCallstackPayload( ptr );
|
SendCallstackPayload( ptr );
|
||||||
tracy_free( (void*)ptr );
|
tracy_free( (void*)ptr );
|
||||||
}
|
}
|
||||||
ptr = MemRead<uint64_t>( &item->callstackAlloc.ptr );
|
ptr = MemRead<uint64_t>( &item->callstackAllocFat.ptr );
|
||||||
SendCallstackAlloc( ptr );
|
SendCallstackAlloc( ptr );
|
||||||
tracy_free( (void*)ptr );
|
tracy_free( (void*)ptr );
|
||||||
idx++;
|
|
||||||
MemWrite( &item->hdr.idx, idx );
|
|
||||||
break;
|
break;
|
||||||
case QueueType::CallstackSample:
|
case QueueType::CallstackSample:
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,6 @@ enum class QueueType : uint8_t
|
|||||||
CallstackMemory,
|
CallstackMemory,
|
||||||
Callstack,
|
Callstack,
|
||||||
CallstackAlloc,
|
CallstackAlloc,
|
||||||
CallstackAllocLean,
|
|
||||||
CallstackSample,
|
CallstackSample,
|
||||||
CallstackSampleLean,
|
CallstackSampleLean,
|
||||||
FrameImage,
|
FrameImage,
|
||||||
@ -360,7 +359,7 @@ struct QueueCallstackFat
|
|||||||
uint64_t ptr;
|
uint64_t ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QueueCallstackAlloc
|
struct QueueCallstackAllocFat
|
||||||
{
|
{
|
||||||
uint64_t ptr;
|
uint64_t ptr;
|
||||||
uint64_t nativePtr;
|
uint64_t nativePtr;
|
||||||
@ -513,7 +512,7 @@ struct QueueItem
|
|||||||
QueueMemAlloc memAlloc;
|
QueueMemAlloc memAlloc;
|
||||||
QueueMemFree memFree;
|
QueueMemFree memFree;
|
||||||
QueueCallstackFat callstackFat;
|
QueueCallstackFat callstackFat;
|
||||||
QueueCallstackAlloc callstackAlloc;
|
QueueCallstackAllocFat callstackAllocFat;
|
||||||
QueueCallstackSample callstackSample;
|
QueueCallstackSample callstackSample;
|
||||||
QueueCallstackSampleLean callstackSampleLean;
|
QueueCallstackSampleLean callstackSampleLean;
|
||||||
QueueCallstackFrameSize callstackFrameSize;
|
QueueCallstackFrameSize callstackFrameSize;
|
||||||
@ -549,8 +548,7 @@ 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 ), // callstack memory
|
sizeof( QueueHeader ), // callstack memory
|
||||||
sizeof( QueueHeader ), // callstack
|
sizeof( QueueHeader ), // callstack
|
||||||
sizeof( QueueHeader ) + sizeof( QueueCallstackAlloc ), // not for network transfer
|
sizeof( QueueHeader ), // callstack alloc
|
||||||
sizeof( QueueHeader ), // lean callstack alloc
|
|
||||||
sizeof( QueueHeader ) + sizeof( QueueCallstackSample ), // not for network transfer
|
sizeof( QueueHeader ) + sizeof( QueueCallstackSample ), // not for network transfer
|
||||||
sizeof( QueueHeader ) + sizeof( QueueCallstackSampleLean ),
|
sizeof( QueueHeader ) + sizeof( QueueCallstackSampleLean ),
|
||||||
sizeof( QueueHeader ) + sizeof( QueueFrameImage ),
|
sizeof( QueueHeader ) + sizeof( QueueFrameImage ),
|
||||||
|
@ -4029,7 +4029,7 @@ bool Worker::Process( const QueueItem& ev )
|
|||||||
case QueueType::Callstack:
|
case QueueType::Callstack:
|
||||||
ProcessCallstack();
|
ProcessCallstack();
|
||||||
break;
|
break;
|
||||||
case QueueType::CallstackAllocLean:
|
case QueueType::CallstackAlloc:
|
||||||
ProcessCallstackAlloc();
|
ProcessCallstackAlloc();
|
||||||
break;
|
break;
|
||||||
case QueueType::CallstackSampleLean:
|
case QueueType::CallstackSampleLean:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user