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
+14
View File
@@ -82,6 +82,20 @@ public:
tail.store( magic + 1, std::memory_order_release );
}
static tracy_force_inline void PlotData( const char* name, double val )
{
uint32_t cpu;
Magic magic;
auto& token = s_token.ptr;
auto& tail = token->get_tail_index();
auto item = token->enqueue_begin<moodycamel::CanAlloc>( magic );
item->hdr.type = QueueType::PlotData;
item->plotData.name = (uint64_t)name;
item->plotData.time = GetTime( cpu );
item->plotData.val = val;
tail.store( magic + 1, std::memory_order_release );
}
static bool ShouldExit();
private: