mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Save another 2 bytes per ZoneEvent.
ZoneEvent is not 28 bytes. Memory usage reduction on selected traces (sizes in MB): big 9527 -> 9224 (96%) chicken 2107 -> 2044 (97%) drl-l-b 1479 -> 1443 (97%) long 5412 -> 5327 (98%) q3bsp-mt 5592 -> 5400 (96%) selfprofile 1443 -> 1403 (97%)
This commit is contained in:
@@ -338,7 +338,7 @@ public:
|
||||
// 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 );
|
||||
static tracy_force_inline int64_t GetZoneEndDirect( const ZoneEvent& ev ) { return ev.end >= 0 ? ev.end : ev.Start(); }
|
||||
static tracy_force_inline int64_t GetZoneEndDirect( const ZoneEvent& ev ) { return ev.End() >= 0 ? ev.End() : ev.Start(); }
|
||||
static tracy_force_inline int64_t GetZoneEndDirect( const GpuEvent& ev ) { return ev.gpuEnd >= 0 ? ev.gpuEnd : ev.gpuStart; }
|
||||
|
||||
const char* GetString( uint64_t ptr ) const;
|
||||
|
||||
Reference in New Issue
Block a user