Send native callstack before allocated one.

This commit is contained in:
Bartosz Taudul 2019-03-05 19:18:43 +01:00
parent 4509412efb
commit afe2fad1a7

View File

@ -1329,10 +1329,10 @@ 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.ptr );
tracy_free( (void*)ptr );
ptr = MemRead<uint64_t>( &item.callstackAlloc.nativePtr ); ptr = MemRead<uint64_t>( &item.callstackAlloc.nativePtr );
tracy_free( (void*)ptr ); tracy_free( (void*)ptr );
ptr = MemRead<uint64_t>( &item.callstackAlloc.ptr );
tracy_free( (void*)ptr );
break; break;
default: default:
assert( false ); assert( false );
@ -1409,13 +1409,13 @@ 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.ptr );
SendCallstackAlloc( ptr );
tracy_free( (void*)ptr );
ptr = MemRead<uint64_t>( &item->callstackAlloc.nativePtr ); ptr = MemRead<uint64_t>( &item->callstackAlloc.nativePtr );
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 );
SendCallstackAlloc( ptr );
tracy_free( (void*)ptr );
break; break;
default: default:
assert( false ); assert( false );