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

Plot data transfer.

This commit is contained in:
Bartosz Taudul
2017-10-13 02:07:03 +02:00
parent d9feeb3486
commit f0484b50ca
3 changed files with 28 additions and 0 deletions
+10
View File
@@ -21,6 +21,7 @@ enum class QueueType : uint8_t
LockObtain,
LockRelease,
LockMark,
PlotData,
NUM_TYPES
};
@@ -101,6 +102,13 @@ struct QueueLockMark
uint64_t srcloc; // ptr
};
struct QueuePlotData
{
uint64_t name; // ptr
int64_t time;
double val;
};
struct QueueHeader
{
union
@@ -126,6 +134,7 @@ struct QueueItem
QueueLockObtain lockObtain;
QueueLockRelease lockRelease;
QueueLockMark lockMark;
QueuePlotData plotData;
};
};
@@ -147,6 +156,7 @@ static const size_t QueueDataSize[] = {
sizeof( QueueHeader ) + sizeof( QueueLockObtain ),
sizeof( QueueHeader ) + sizeof( QueueLockRelease ),
sizeof( QueueHeader ) + sizeof( QueueLockMark ),
sizeof( QueueHeader ) + sizeof( QueuePlotData ),
};
static_assert( sizeof( QueueDataSize ) / sizeof( size_t ) == (uint8_t)QueueType::NUM_TYPES, "QueueDataSize mismatch" );