diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index af2cdbfe..a2400fff 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -8974,13 +8974,8 @@ bool Worker::IsFrameExternal( StringIdx filename, StringIdx image ) const return IsFrameExternalImpl( GetString( filename ), image.Active() ? GetString( image ) : nullptr ); } -bool Worker::IsImageExternal( StringIdx image, unordered_flat_map& cache, uint32_t& last ) const +bool Worker::IsImageExternalBody( StringIdx image, uint32_t key, unordered_flat_map& cache, uint32_t& last ) const { - assert( image.Active() ); - const auto key = image.Raw(); - - if( ( last & 0x00FFFFFF ) == key ) return last >> 24; - auto it = cache.find( key ); if( it != cache.end() ) { @@ -8995,12 +8990,8 @@ bool Worker::IsImageExternal( StringIdx image, unordered_flat_map& cache, uint32_t& last ) const +bool Worker::IsSourceExternalBody( StringIdx filename, uint32_t key, unordered_flat_map& cache, uint32_t& last ) const { - const auto key = filename.Raw(); - - if( ( last & 0x00FFFFFF ) == key ) return last >> 24; - auto it = cache.find( key ); if( it != cache.end() ) { diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 111a95ea..7cbd5f7f 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -704,8 +704,21 @@ public: void CacheSourceFiles(); bool IsFrameExternal( StringIdx filename, StringIdx image ) const; - bool IsImageExternal( StringIdx image, unordered_flat_map& cache, uint32_t& last ) const; - bool IsSourceExternal( StringIdx filename, unordered_flat_map& cache, uint32_t& last ) const; + + tracy_force_inline bool IsImageExternal( StringIdx image, unordered_flat_map& cache, uint32_t& last ) const + { + assert( image.Active() ); + const auto key = image.Raw(); + if( ( last & 0x00FFFFFF ) == key ) return last >> 24; + return IsImageExternalBody( image, key, cache, last ); + } + + tracy_force_inline bool IsSourceExternal( StringIdx filename, unordered_flat_map& cache, uint32_t& last ) const + { + const auto key = filename.Raw(); + if( ( last & 0x00FFFFFF ) == key ) return last >> 24; + return IsSourceExternalBody( filename, key, cache, last ); + } StringLocation StoreString( const char* str, size_t sz ); @@ -1001,6 +1014,9 @@ private: int64_t GetZoneEndImpl( const ZoneEvent& ev ) const; int64_t GetZoneEndImpl( const GpuEvent& ev ) const; + bool IsImageExternalBody( StringIdx image, uint32_t key, unordered_flat_map& cache, uint32_t& last ) const; + bool IsSourceExternalBody( StringIdx filename, uint32_t key,unordered_flat_map& cache, uint32_t& last ) const; + void UpdateMbps( int64_t td ); int64_t ReadTimeline( FileRead& f, Vector>& vec, uint32_t size, int64_t refTime, int32_t& childIdx );