mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Fast version of zone child time getter.
This one can only be used when all child zones are properly ended.
This commit is contained in:
parent
3d2cc2d54d
commit
118fab1561
@ -8730,4 +8730,18 @@ int64_t View::GetZoneChildTime( const ZoneEvent& zone )
|
|||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int64_t View::GetZoneChildTimeFast( const ZoneEvent& zone )
|
||||||
|
{
|
||||||
|
int64_t time = 0;
|
||||||
|
if( zone.child >= 0 )
|
||||||
|
{
|
||||||
|
for( auto& v : m_worker.GetZoneChildren( zone.child ) )
|
||||||
|
{
|
||||||
|
assert( v->end >= 0 );
|
||||||
|
time += v->end - v->start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -162,6 +162,7 @@ private:
|
|||||||
void SmallCallstackButton( const char* name, uint32_t callstack, int& idx );
|
void SmallCallstackButton( const char* name, uint32_t callstack, int& idx );
|
||||||
void SetViewToLastFrames();
|
void SetViewToLastFrames();
|
||||||
int64_t GetZoneChildTime( const ZoneEvent& zone );
|
int64_t GetZoneChildTime( const ZoneEvent& zone );
|
||||||
|
int64_t GetZoneChildTimeFast( const ZoneEvent& zone );
|
||||||
|
|
||||||
flat_hash_map<const void*, bool, nohash<const void*>> m_visible;
|
flat_hash_map<const void*, bool, nohash<const void*>> m_visible;
|
||||||
flat_hash_map<uint64_t, bool, nohash<uint64_t>> m_visibleMsgThread;
|
flat_hash_map<uint64_t, bool, nohash<uint64_t>> m_visibleMsgThread;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user