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

Thread name queries.

This commit is contained in:
Bartosz Taudul
2017-09-22 01:55:02 +02:00
parent 70ad3407c0
commit 6525e1b3c1
2 changed files with 27 additions and 6 deletions
+5 -1
View File
@@ -14,6 +14,7 @@
#include "../common/TracySystem.hpp"
#include "concurrentqueue.h"
#include "TracyProfiler.hpp"
#include "TracyThread.hpp"
#ifdef _DEBUG
# define DISABLE_LZ4
@@ -189,7 +190,7 @@ bool Profiler::SendData( const char* data, size_t len )
bool Profiler::SendString( uint64_t str, const char* ptr, QueueType type )
{
assert( type == QueueType::StringData );
assert( type == QueueType::StringData || type == QueueType::ThreadName );
QueueHeader hdr;
hdr.type = type;
@@ -228,6 +229,9 @@ bool Profiler::HandleServerQuery()
case ServerQueryString:
SendString( ptr, (const char*)ptr, QueueType::StringData );
break;
case ServerQueryThreadString:
SendString( ptr, GetThreadName( ptr ), QueueType::ThreadName );
break;
default:
assert( false );
break;