mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Use short ptr for GPU zone data.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "../common/TracySocket.hpp"
|
||||
#include "tracy_flat_hash_map.hpp"
|
||||
#include "TracyEvent.hpp"
|
||||
#include "TracyShortPtr.hpp"
|
||||
#include "TracySlab.hpp"
|
||||
#include "TracyStringDiscovery.hpp"
|
||||
#include "TracyThreadCompress.hpp"
|
||||
@@ -198,7 +199,7 @@ private:
|
||||
ThreadCompress externalThreadCompress;
|
||||
|
||||
Vector<Vector<ZoneEvent*>> zoneChildren;
|
||||
Vector<Vector<GpuEvent*>> gpuChildren;
|
||||
Vector<Vector<short_ptr<GpuEvent>>> gpuChildren;
|
||||
|
||||
Vector<Vector<ZoneEvent*>> zoneVectorCache;
|
||||
|
||||
@@ -364,7 +365,7 @@ public:
|
||||
const char* GetZoneName( const GpuEvent& ev, const SourceLocation& srcloc ) const;
|
||||
|
||||
tracy_force_inline const Vector<ZoneEvent*>& GetZoneChildren( int32_t idx ) const { return m_data.zoneChildren[idx]; }
|
||||
tracy_force_inline const Vector<GpuEvent*>& GetGpuChildren( int32_t idx ) const { return m_data.gpuChildren[idx]; }
|
||||
tracy_force_inline const Vector<short_ptr<GpuEvent>>& GetGpuChildren( int32_t idx ) const { return m_data.gpuChildren[idx]; }
|
||||
|
||||
std::vector<int16_t> GetMatchingSourceLocation( const char* query, bool ignoreCase ) const;
|
||||
|
||||
@@ -563,11 +564,11 @@ private:
|
||||
void ReadTimeline( FileRead& f, Vector<ZoneEvent*>& vec, uint16_t thread, uint64_t size, int64_t& refTime, int32_t& childIdx );
|
||||
void ReadTimelinePre042( FileRead& f, Vector<ZoneEvent*>& vec, uint16_t thread, uint64_t size, int fileVer );
|
||||
void ReadTimelinePre0510( FileRead& f, Vector<ZoneEvent*>& vec, uint16_t thread, uint64_t size, int64_t& refTime, int fileVer );
|
||||
void ReadTimeline( FileRead& f, Vector<GpuEvent*>& vec, uint64_t size, int64_t& refTime, int64_t& refGpuTime, int32_t& childIdx );
|
||||
void ReadTimelinePre0510( FileRead& f, Vector<GpuEvent*>& vec, uint64_t size, int64_t& refTime, int64_t& refGpuTime, int fileVer );
|
||||
void ReadTimeline( FileRead& f, Vector<short_ptr<GpuEvent>>& vec, uint64_t size, int64_t& refTime, int64_t& refGpuTime, int32_t& childIdx );
|
||||
void ReadTimelinePre0510( FileRead& f, Vector<short_ptr<GpuEvent>>& vec, uint64_t size, int64_t& refTime, int64_t& refGpuTime, int fileVer );
|
||||
|
||||
void WriteTimeline( FileWrite& f, const Vector<ZoneEvent*>& vec, int64_t& refTime );
|
||||
void WriteTimeline( FileWrite& f, const Vector<GpuEvent*>& vec, int64_t& refTime, int64_t& refGpuTime );
|
||||
void WriteTimeline( FileWrite& f, const Vector<short_ptr<GpuEvent>>& vec, int64_t& refTime, int64_t& refGpuTime );
|
||||
|
||||
int64_t TscTime( int64_t tsc ) { return int64_t( tsc * m_timerMul ); }
|
||||
int64_t TscTime( uint64_t tsc ) { return int64_t( tsc * m_timerMul ); }
|
||||
|
||||
Reference in New Issue
Block a user