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

Allow remote plot configuration.

This commit is contained in:
Bartosz Taudul
2019-11-05 16:47:41 +01:00
committed by Bartosz Taudul
parent a7a739eea9
commit 907574e637
4 changed files with 36 additions and 1 deletions
+17
View File
@@ -244,6 +244,23 @@ public:
tail.store( magic + 1, std::memory_order_release );
}
static tracy_force_inline void ConfigurePlot( const char* name, PlotFormatType type )
{
Magic magic;
auto token = GetToken();
auto& tail = token->get_tail_index();
auto item = token->enqueue_begin( magic );
MemWrite( &item->hdr.type, QueueType::PlotConfig );
MemWrite( &item->plotConfig.name, (uint64_t)name );
MemWrite( &item->plotConfig.type, (uint8_t)type );
#ifdef TRACY_ON_DEMAND
GetProfiler().DeferItem( *item );
#endif
tail.store( magic + 1, std::memory_order_release );
}
static tracy_force_inline void Message( const char* txt, size_t size )
{
#ifdef TRACY_ON_DEMAND