1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Preemptive sending of custom strings.

This commit is contained in:
Bartosz Taudul
2017-11-11 15:22:55 +01:00
parent c2797a4cc7
commit 76e11174dc
4 changed files with 23 additions and 23 deletions
+14 -5
View File
@@ -263,7 +263,20 @@ Profiler::DequeueStatus Profiler::Dequeue( moodycamel::ConsumerToken& token )
{
for( size_t i=0; i<sz; i++ )
{
if( !AppendData( m_itemBuf+i, QueueDataSize[m_itemBuf[i].hdr.idx] ) ) return ConnectionLost;
const auto item = m_itemBuf + i;
switch( item->hdr.type )
{
case QueueType::ZoneText:
{
const auto ptr = item->zoneText.text;
SendString( ptr, (const char*)ptr, QueueType::CustomStringData );
tracy_free( (void*)ptr );
break;
}
default:
break;
}
if( !AppendData( item, QueueDataSize[m_itemBuf[i].hdr.idx] ) ) return ConnectionLost;
}
}
else
@@ -394,10 +407,6 @@ bool Profiler::HandleServerQuery()
SendString( ptr, GetThreadName( ptr ), QueueType::ThreadName );
}
break;
case ServerQueryCustomString:
SendString( ptr, (const char*)ptr, QueueType::CustomStringData );
tracy_free( (void*)ptr );
break;
case ServerQuerySourceLocation:
SendSourceLocation( ptr );
break;