Reorder StringTransfer to enable easier dispatch.

This commit is contained in:
Bartosz Taudul 2017-11-19 02:42:04 +01:00
parent b3e0d2660d
commit 18f7d8c261

View File

@ -12,25 +12,25 @@ enum class QueueType : uint8_t
ZoneBegin, ZoneBegin,
ZoneBeginAllocSrcLoc, ZoneBeginAllocSrcLoc,
ZoneEnd, ZoneEnd,
StringData,
ThreadName,
CustomStringData,
FrameMarkMsg, FrameMarkMsg,
SourceLocation, SourceLocation,
SourceLocationPayload,
ZoneText, ZoneText,
LockWait, LockWait,
LockObtain, LockObtain,
LockRelease, LockRelease,
LockMark, LockMark,
PlotData, PlotData,
PlotName,
Message, Message,
MessageLiteral, MessageLiteral,
GpuNewContext, GpuNewContext,
GpuZoneBegin, GpuZoneBegin,
GpuZoneEnd, GpuZoneEnd,
GpuTime, GpuTime,
StringData,
ThreadName,
CustomStringData,
PlotName,
SourceLocationPayload,
NUM_TYPES NUM_TYPES
}; };
@ -204,25 +204,26 @@ static const size_t QueueDataSize[] = {
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ), sizeof( QueueHeader ) + sizeof( QueueZoneBegin ),
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ), // allocated source location sizeof( QueueHeader ) + sizeof( QueueZoneBegin ), // allocated source location
sizeof( QueueHeader ) + sizeof( QueueZoneEnd ), sizeof( QueueHeader ) + sizeof( QueueZoneEnd ),
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // string data
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // thread name
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // custom string data
sizeof( QueueHeader ) + sizeof( QueueFrameMark ), sizeof( QueueHeader ) + sizeof( QueueFrameMark ),
sizeof( QueueHeader ) + sizeof( QueueSourceLocation ), sizeof( QueueHeader ) + sizeof( QueueSourceLocation ),
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // allocated source location payload
sizeof( QueueHeader ) + sizeof( QueueZoneText ), sizeof( QueueHeader ) + sizeof( QueueZoneText ),
sizeof( QueueHeader ) + sizeof( QueueLockWait ), sizeof( QueueHeader ) + sizeof( QueueLockWait ),
sizeof( QueueHeader ) + sizeof( QueueLockObtain ), sizeof( QueueHeader ) + sizeof( QueueLockObtain ),
sizeof( QueueHeader ) + sizeof( QueueLockRelease ), sizeof( QueueHeader ) + sizeof( QueueLockRelease ),
sizeof( QueueHeader ) + sizeof( QueueLockMark ), sizeof( QueueHeader ) + sizeof( QueueLockMark ),
sizeof( QueueHeader ) + sizeof( QueuePlotData ), sizeof( QueueHeader ) + sizeof( QueuePlotData ),
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // plot name
sizeof( QueueHeader ) + sizeof( QueueMessage ), sizeof( QueueHeader ) + sizeof( QueueMessage ),
sizeof( QueueHeader ) + sizeof( QueueMessage ), // literal sizeof( QueueHeader ) + sizeof( QueueMessage ), // literal
sizeof( QueueHeader ) + sizeof( QueueGpuNewContext ), sizeof( QueueHeader ) + sizeof( QueueGpuNewContext ),
sizeof( QueueHeader ) + sizeof( QueueGpuZoneBegin ), sizeof( QueueHeader ) + sizeof( QueueGpuZoneBegin ),
sizeof( QueueHeader ) + sizeof( QueueGpuZoneEnd ), sizeof( QueueHeader ) + sizeof( QueueGpuZoneEnd ),
sizeof( QueueHeader ) + sizeof( QueueGpuTime ), sizeof( QueueHeader ) + sizeof( QueueGpuTime ),
// keep all QueueStringTransfer below
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // string data
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // thread name
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // custom string data
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // plot name
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // allocated source location payload
}; };
static_assert( QueueItemSize == 32, "Queue item size not 32 bytes" ); static_assert( QueueItemSize == 32, "Queue item size not 32 bytes" );