From 670a292416599ed20a8b5685b1faba5458344d4f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 23 May 2020 13:08:57 +0200 Subject: [PATCH] Report whether string is available, or if a query was dispatched. --- server/TracyWorker.cpp | 7 ++++--- server/TracyWorker.hpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 3652add3..83ca3230 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -3559,15 +3559,16 @@ void Worker::InsertLockEvent( LockMap& lockmap, LockEvent* lev, uint64_t thread, if( range.end < time ) range.end = time; } -void Worker::CheckString( uint64_t ptr ) +bool Worker::CheckString( uint64_t ptr ) { - if( ptr == 0 ) return; - if( m_data.strings.find( ptr ) != m_data.strings.end() ) return; + if( ptr == 0 ) return true; + if( m_data.strings.find( ptr ) != m_data.strings.end() ) return true; m_data.strings.emplace( ptr, "???" ); m_pendingStrings++; Query( ServerQueryString, ptr ); + return false; } void Worker::CheckThreadString( uint64_t id ) diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 0dce667d..ba97ac23 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -680,7 +680,7 @@ private: void InsertLockEvent( LockMap& lockmap, LockEvent* lev, uint64_t thread, int64_t time ); - void CheckString( uint64_t ptr ); + bool CheckString( uint64_t ptr ); void CheckThreadString( uint64_t id ); void CheckExternalName( uint64_t id );