mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Force inline compress/decompress thread id.
This commit is contained in:
parent
c0577fd5b2
commit
6a4e58b545
@ -435,19 +435,18 @@ uint16_t Worker::CompressThread( uint64_t thread )
|
||||
return it->second;
|
||||
}
|
||||
else
|
||||
{
|
||||
return CompressThreadNew( thread );
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t Worker::CompressThreadNew( uint64_t thread )
|
||||
{
|
||||
auto sz = m_data.threadExpand.size();
|
||||
m_data.threadExpand.push_back( thread );
|
||||
m_data.threadMap.emplace( thread, sz );
|
||||
return sz;
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t Worker::DecompressThread( uint16_t thread ) const
|
||||
{
|
||||
assert( thread < m_data.threadExpand.size() );
|
||||
return m_data.threadExpand[thread];
|
||||
}
|
||||
|
||||
void Worker::Exec()
|
||||
{
|
||||
|
@ -129,8 +129,8 @@ public:
|
||||
const SourceLocationZones& GetZonesForSourceLocation( int32_t srcloc ) const;
|
||||
#endif
|
||||
|
||||
uint16_t CompressThread( uint64_t thread );
|
||||
uint64_t DecompressThread( uint16_t thread ) const;
|
||||
tracy_force_inline uint16_t CompressThread( uint64_t thread );
|
||||
tracy_force_inline uint64_t DecompressThread( uint16_t thread ) const { assert( thread < m_data.threadExpand.size() ); return m_data.threadExpand[thread]; }
|
||||
|
||||
NonRecursiveBenaphore& GetMbpsDataLock() { return m_mbpsData.lock; }
|
||||
const std::vector<float>& GetMbpsData() const { return m_mbpsData.mbps; }
|
||||
@ -199,6 +199,7 @@ private:
|
||||
void HandlePostponedPlots();
|
||||
|
||||
StringLocation StoreString( char* str, size_t sz );
|
||||
uint16_t CompressThreadNew( uint64_t thread );
|
||||
|
||||
tracy_force_inline void ReadTimeline( FileRead& f, Vector<ZoneEvent*>& vec, uint16_t thread );
|
||||
tracy_force_inline void ReadTimeline( FileRead& f, Vector<GpuEvent*>& vec );
|
||||
|
Loading…
Reference in New Issue
Block a user