mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-06 00:45:21 +00:00
Force inline fast check.
This commit is contained in:
@@ -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<uint32_t, bool>& cache, uint32_t& last ) const
|
||||
bool Worker::IsImageExternalBody( StringIdx image, uint32_t key, unordered_flat_map<uint32_t, bool>& 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<uint32_t, bool
|
||||
return res;
|
||||
}
|
||||
|
||||
bool Worker::IsSourceExternal( StringIdx filename, unordered_flat_map<uint32_t, bool>& cache, uint32_t& last ) const
|
||||
bool Worker::IsSourceExternalBody( StringIdx filename, uint32_t key, unordered_flat_map<uint32_t, bool>& 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() )
|
||||
{
|
||||
|
||||
@@ -704,8 +704,21 @@ public:
|
||||
|
||||
void CacheSourceFiles();
|
||||
bool IsFrameExternal( StringIdx filename, StringIdx image ) const;
|
||||
bool IsImageExternal( StringIdx image, unordered_flat_map<uint32_t, bool>& cache, uint32_t& last ) const;
|
||||
bool IsSourceExternal( StringIdx filename, unordered_flat_map<uint32_t, bool>& cache, uint32_t& last ) const;
|
||||
|
||||
tracy_force_inline bool IsImageExternal( StringIdx image, unordered_flat_map<uint32_t, bool>& 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<uint32_t, bool>& 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<uint32_t, bool>& cache, uint32_t& last ) const;
|
||||
bool IsSourceExternalBody( StringIdx filename, uint32_t key,unordered_flat_map<uint32_t, bool>& cache, uint32_t& last ) const;
|
||||
|
||||
void UpdateMbps( int64_t td );
|
||||
|
||||
int64_t ReadTimeline( FileRead& f, Vector<short_ptr<ZoneEvent>>& vec, uint32_t size, int64_t refTime, int32_t& childIdx );
|
||||
|
||||
Reference in New Issue
Block a user