mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Send callstack payload without iteration, if possible.
This commit is contained in:
parent
a7ace6ef9e
commit
a2c6848433
@ -557,11 +557,18 @@ void Profiler::SendCallstackPayload( uint64_t _ptr )
|
|||||||
AppendData( &item, QueueDataSize[(int)QueueType::CallstackPayload] );
|
AppendData( &item, QueueDataSize[(int)QueueType::CallstackPayload] );
|
||||||
AppendData( &l16, sizeof( l16 ) );
|
AppendData( &l16, sizeof( l16 ) );
|
||||||
|
|
||||||
|
if( sizeof( uintptr_t ) == sizeof( uint64_t ) )
|
||||||
|
{
|
||||||
|
AppendData( ptr, sizeof( uint64_t ) * sz );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
for( uintptr_t i=0; i<sz; i++ )
|
for( uintptr_t i=0; i<sz; i++ )
|
||||||
{
|
{
|
||||||
const auto val = uint64_t( *ptr++ );
|
const auto val = uint64_t( *ptr++ );
|
||||||
AppendData( &val, sizeof( uint64_t ) );
|
AppendData( &val, sizeof( uint64_t ) );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Profiler::SendCallstackFrame( uint64_t ptr )
|
void Profiler::SendCallstackFrame( uint64_t ptr )
|
||||||
|
Loading…
Reference in New Issue
Block a user