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

String literal message transfer.

This commit is contained in:
Bartosz Taudul
2017-10-15 13:06:49 +02:00
parent 95439a726a
commit 5b9fcddfb3
7 changed files with 29 additions and 4 deletions
+14
View File
@@ -146,6 +146,20 @@ public:
tail.store( magic + 1, std::memory_order_release );
}
static tracy_force_inline void Message( const char* txt )
{
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::MessageLiteral;
item->message.time = GetTime( cpu );
item->message.thread = GetThreadHandle();
item->message.text = (uint64_t)txt;
tail.store( magic + 1, std::memory_order_release );
}
static bool ShouldExit();
private: