mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Add direct zone end getter.
This commit is contained in:
parent
746df21ad9
commit
e6b3f373c5
@ -308,6 +308,16 @@ int64_t Worker::GetZoneEnd( const GpuEvent& ev ) const
|
||||
}
|
||||
}
|
||||
|
||||
int64_t Worker::GetZoneEndDirect( const ZoneEvent& ev ) const
|
||||
{
|
||||
return ev.end != -1 ? ev.end : ev.start;
|
||||
}
|
||||
|
||||
int64_t Worker::GetZoneEndDirect( const GpuEvent& ev ) const
|
||||
{
|
||||
return ev.gpuEnd != -1 ? ev.gpuEnd : ev.gpuStart;
|
||||
}
|
||||
|
||||
const char* Worker::GetString( uint64_t ptr ) const
|
||||
{
|
||||
const auto it = m_data.strings.find( ptr );
|
||||
|
@ -94,8 +94,15 @@ public:
|
||||
const Vector<PlotData*>& GetPlots() const { return m_data.plots; }
|
||||
const Vector<ThreadData*>& GetThreadData() const { return m_data.threads; }
|
||||
|
||||
// Some zones may have incomplete timing data (only start time is available, end hasn't arrived yet).
|
||||
// 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 ) const;
|
||||
int64_t GetZoneEnd( const GpuEvent& ev ) const;
|
||||
int64_t GetZoneEndDirect( const ZoneEvent& ev ) const;
|
||||
int64_t GetZoneEndDirect( const GpuEvent& ev ) const;
|
||||
|
||||
const char* GetString( uint64_t ptr ) const;
|
||||
const char* GetString( const StringRef& ref ) const;
|
||||
const char* GetString( const StringIdx& idx ) const;
|
||||
|
Loading…
Reference in New Issue
Block a user