From 337662091940b2e06b8815d367e201f89971ed2a Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 3 Feb 2021 22:32:31 +0100 Subject: [PATCH] Move server query acknowledgement to a separate function. --- client/TracyProfiler.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 0a96ab0b..683ccc8a 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -569,6 +569,12 @@ static uint64_t GetPid() #endif } +static void AckServerQuery() +{ + TracyLfqPrepare( QueueType::AckServerQueryNoop ); + TracyLfqCommit; +} + static BroadcastMessage& GetBroadcastMessage( const char* procname, size_t pnsz, int& len, int port ) { static BroadcastMessage msg; @@ -3009,8 +3015,7 @@ void Profiler::HandleParameter( uint64_t payload ) const auto idx = uint32_t( payload >> 32 ); const auto val = int32_t( payload & 0xFFFFFFFF ); m_paramCallback( idx, val ); - TracyLfqPrepare( QueueType::AckServerQueryNoop ); - TracyLfqCommit; + AckServerQuery(); } #ifdef __ANDROID__