64-bit only version of callstack payload sender.

This commit is contained in:
Bartosz Taudul 2020-02-22 14:05:01 +01:00
parent 9e9c7db5b1
commit 23fe3e623d
2 changed files with 20 additions and 0 deletions

View File

@ -2149,6 +2149,25 @@ void Profiler::SendCallstackPayload( uint64_t _ptr )
} }
} }
void Profiler::SendCallstackPayload64( uint64_t _ptr )
{
auto ptr = (uint64_t*)_ptr;
QueueItem item;
MemWrite( &item.hdr.type, QueueType::CallstackPayload );
MemWrite( &item.stringTransfer.ptr, _ptr );
const auto sz = *ptr++;
const auto len = sz * sizeof( uint64_t );
const auto l16 = uint16_t( len );
NeedDataSize( QueueDataSize[(int)QueueType::CallstackPayload] + sizeof( l16 ) + l16 );
AppendDataUnsafe( &item, QueueDataSize[(int)QueueType::CallstackPayload] );
AppendDataUnsafe( &l16, sizeof( l16 ) );
AppendDataUnsafe( ptr, sizeof( uint64_t ) * sz );
}
void Profiler::SendCallstackAlloc( uint64_t _ptr ) void Profiler::SendCallstackAlloc( uint64_t _ptr )
{ {
auto ptr = (const char*)_ptr; auto ptr = (const char*)_ptr;

View File

@ -533,6 +533,7 @@ private:
void SendSourceLocation( uint64_t ptr ); void SendSourceLocation( uint64_t ptr );
void SendSourceLocationPayload( uint64_t ptr ); void SendSourceLocationPayload( uint64_t ptr );
void SendCallstackPayload( uint64_t ptr ); void SendCallstackPayload( uint64_t ptr );
void SendCallstackPayload64( uint64_t ptr );
void SendCallstackAlloc( uint64_t ptr ); void SendCallstackAlloc( uint64_t ptr );
void SendCallstackFrame( uint64_t ptr ); void SendCallstackFrame( uint64_t ptr );