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

Zone text (custom string) transfer.

This commit is contained in:
Bartosz Taudul
2017-09-27 02:18:17 +02:00
parent 3c0ce01954
commit d1bbb731fc
9 changed files with 93 additions and 6 deletions
+2 -1
View File
@@ -20,7 +20,8 @@ enum ServerQuery : uint8_t
{
ServerQueryString,
ServerQueryThreadString,
ServerQuerySourceLocation
ServerQueryCustomString,
ServerQuerySourceLocation,
};
#pragma pack( 1 )
+10
View File
@@ -12,8 +12,10 @@ enum class QueueType : uint8_t
ZoneEnd,
StringData,
ThreadName,
CustomStringData,
FrameMark,
SourceLocation,
ZoneText,
NUM_TYPES
};
@@ -39,6 +41,11 @@ struct QueueSourceLocation
uint32_t color;
};
struct QueueZoneText
{
uint64_t text; // ptr
};
struct QueueHeader
{
union
@@ -57,6 +64,7 @@ struct QueueItem
QueueZoneBegin zoneBegin;
QueueZoneEnd zoneEnd;
QueueSourceLocation srcloc;
QueueZoneText zoneText;
};
};
@@ -70,7 +78,9 @@ static const size_t QueueDataSize[] = {
sizeof( QueueHeader ),
sizeof( QueueHeader ),
sizeof( QueueHeader ),
sizeof( QueueHeader ),
sizeof( QueueHeader ) + sizeof( QueueSourceLocation ),
sizeof( QueueHeader ) + sizeof( QueueZoneText ),
};
static_assert( sizeof( QueueDataSize ) / sizeof( size_t ) == (uint8_t)QueueType::NUM_TYPES, "QueueDataSize mismatch" );