mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Send source location answer in stream, not as separate packet.
This commit is contained in:
parent
e90a86e06e
commit
e076d1d475
@ -216,7 +216,7 @@ bool Profiler::SendString( uint64_t str, const char* ptr, QueueType type )
|
||||
return SendData( buf, sizeof( hdr ) + sizeof( l16 ) + l16 );
|
||||
}
|
||||
|
||||
bool Profiler::SendSourceLocation( uint64_t ptr )
|
||||
void Profiler::SendSourceLocation( uint64_t ptr )
|
||||
{
|
||||
auto srcloc = (const SourceLocation*)ptr;
|
||||
QueueItem item;
|
||||
@ -226,16 +226,7 @@ bool Profiler::SendSourceLocation( uint64_t ptr )
|
||||
item.srcloc.function = (uint64_t)srcloc->function;
|
||||
item.srcloc.line = srcloc->line;
|
||||
item.srcloc.color = srcloc->color;
|
||||
|
||||
const auto sz = QueueDataSize[item.hdr.idx];
|
||||
|
||||
auto buf = m_buffer + m_bufferOffset;
|
||||
memcpy( buf, &item, sz );
|
||||
|
||||
m_bufferOffset += sz;
|
||||
if( m_bufferOffset > TargetFrameSize * 2 ) m_bufferOffset = 0;
|
||||
|
||||
return SendData( buf, sz );
|
||||
s_queue.enqueue( GetToken(), std::move( item ) );
|
||||
}
|
||||
|
||||
bool Profiler::HandleServerQuery()
|
||||
|
@ -54,7 +54,7 @@ private:
|
||||
|
||||
bool SendData( const char* data, size_t len );
|
||||
bool SendString( uint64_t ptr, const char* str, QueueType type );
|
||||
bool SendSourceLocation( uint64_t ptr );
|
||||
void SendSourceLocation( uint64_t ptr );
|
||||
|
||||
bool HandleServerQuery();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user