1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Force inline GetZoneEnd's fast exit path.

This commit is contained in:
Bartosz Taudul
2023-05-01 01:28:32 +02:00
parent 2e9d8f8215
commit 5019f7d2b4
2 changed files with 11 additions and 6 deletions
+5 -2
View File
@@ -562,8 +562,8 @@ public:
// GetZoneEnd() will try to infer the end time by looking at child zones (parent zone can't end
// before its children have ended).
// GetZoneEndDirect() will only return zone's direct timing data, without looking at children.
int64_t GetZoneEnd( const ZoneEvent& ev );
int64_t GetZoneEnd( const GpuEvent& ev );
tracy_force_inline int64_t GetZoneEnd( const ZoneEvent& ev ) { return ev.IsEndValid() ? ev.End() : GetZoneEndImpl( ev ); }
tracy_force_inline int64_t GetZoneEnd( const GpuEvent& ev ) { return ev.GpuEnd() >= 0 ? ev.GpuEnd() : GetZoneEndImpl( ev ); }
static tracy_force_inline int64_t GetZoneEndDirect( const ZoneEvent& ev ) { return ev.IsEndValid() ? ev.End() : ev.Start(); }
static tracy_force_inline int64_t GetZoneEndDirect( const GpuEvent& ev ) { return ev.GpuEnd() >= 0 ? ev.GpuEnd() : ev.GpuStart(); }
@@ -929,6 +929,9 @@ private:
tracy_force_inline ZoneExtra& AllocZoneExtra( ZoneEvent& ev );
tracy_force_inline ZoneExtra& RequestZoneExtra( ZoneEvent& ev );
int64_t GetZoneEndImpl( const ZoneEvent& ev );
int64_t GetZoneEndImpl( const GpuEvent& ev );
void UpdateMbps( int64_t td );
int64_t ReadTimeline( FileRead& f, Vector<short_ptr<ZoneEvent>>& vec, uint32_t size, int64_t refTime, int32_t& childIdx );