mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Save source location data counts.
This commit is contained in:
parent
2ca4b0058a
commit
6d55f79109
@ -7,7 +7,7 @@ namespace Version
|
||||
{
|
||||
enum { Major = 0 };
|
||||
enum { Minor = 7 };
|
||||
enum { Patch = 14 };
|
||||
enum { Patch = 15 };
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -781,6 +781,20 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
||||
assert( status.second );
|
||||
status.first->second.zones.reserve( cnt );
|
||||
}
|
||||
|
||||
if( fileVer >= FileVersion( 0, 7, 15 ) )
|
||||
{
|
||||
f.Read( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
{
|
||||
int16_t id;
|
||||
uint64_t cnt;
|
||||
f.Read2( id, cnt );
|
||||
auto status = m_data.gpuSourceLocationZones.emplace( id, GpuSourceLocationZones() );
|
||||
assert( status.second );
|
||||
status.first->second.zones.reserve( cnt );
|
||||
}
|
||||
}
|
||||
#else
|
||||
f.Read( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
@ -790,6 +804,18 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
||||
f.Skip( sizeof( uint64_t ) );
|
||||
m_data.sourceLocationZonesCnt.emplace( id, 0 );
|
||||
}
|
||||
|
||||
if( fileVer >= FileVersion( 0, 7, 15 ) )
|
||||
{
|
||||
f.Read( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
{
|
||||
int16_t id;
|
||||
f.Read( id );
|
||||
f.Skip( sizeof( uint64_t ) );
|
||||
m_data.gpuSourceLocationZonesCnt.emplace( id, 0 );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
s_loadProgress.progress.store( LoadProgress::Locks, std::memory_order_relaxed );
|
||||
@ -8058,6 +8084,16 @@ void Worker::Write( FileWrite& f, bool fiDict )
|
||||
f.Write( &id, sizeof( id ) );
|
||||
f.Write( &cnt, sizeof( cnt ) );
|
||||
}
|
||||
|
||||
sz = m_data.gpuSourceLocationZones.size();
|
||||
f.Write( &sz, sizeof( sz ) );
|
||||
for( auto& v : m_data.gpuSourceLocationZones )
|
||||
{
|
||||
int16_t id = v.first;
|
||||
uint64_t cnt = v.second.zones.size();
|
||||
f.Write( &id, sizeof( id ) );
|
||||
f.Write( &cnt, sizeof( cnt ) );
|
||||
}
|
||||
#else
|
||||
sz = m_data.sourceLocationZonesCnt.size();
|
||||
f.Write( &sz, sizeof( sz ) );
|
||||
@ -8068,6 +8104,16 @@ void Worker::Write( FileWrite& f, bool fiDict )
|
||||
f.Write( &id, sizeof( id ) );
|
||||
f.Write( &cnt, sizeof( cnt ) );
|
||||
}
|
||||
|
||||
sz = m_data.gpuSourceLocationZonesCnt.size();
|
||||
f.Write( &sz, sizeof( sz ) );
|
||||
for( auto& v : m_data.gpuSourceLocationZonesCnt )
|
||||
{
|
||||
int16_t id = v.first;
|
||||
uint64_t cnt = v.second;
|
||||
f.Write( &id, sizeof( id ) );
|
||||
f.Write( &cnt, sizeof( cnt ) );
|
||||
}
|
||||
#endif
|
||||
|
||||
sz = m_data.lockMap.size();
|
||||
|
Loading…
Reference in New Issue
Block a user