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

Allow sending custom zone names.

This commit is contained in:
Bartosz Taudul
2017-09-28 19:28:24 +02:00
parent 362a37a705
commit 8c1c395cec
8 changed files with 38 additions and 0 deletions
+8
View File
@@ -16,6 +16,7 @@ enum class QueueType : uint8_t
FrameMark,
SourceLocation,
ZoneText,
ZoneName,
NUM_TYPES
};
@@ -46,6 +47,11 @@ struct QueueZoneText
uint64_t text; // ptr
};
struct QueueZoneName
{
uint64_t name; // ptr
};
struct QueueHeader
{
union
@@ -65,6 +71,7 @@ struct QueueItem
QueueZoneEnd zoneEnd;
QueueSourceLocation srcloc;
QueueZoneText zoneText;
QueueZoneName zoneName;
};
};
@@ -81,6 +88,7 @@ static const size_t QueueDataSize[] = {
sizeof( QueueHeader ), // frame mark
sizeof( QueueHeader ) + sizeof( QueueSourceLocation ),
sizeof( QueueHeader ) + sizeof( QueueZoneText ),
sizeof( QueueHeader ) + sizeof( QueueZoneName ),
};
static_assert( sizeof( QueueDataSize ) / sizeof( size_t ) == (uint8_t)QueueType::NUM_TYPES, "QueueDataSize mismatch" );