mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Save threadExpand size to allow vector preallocation.
This commit is contained in:
parent
bff6eb4c34
commit
00d07e39f7
@ -309,6 +309,12 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
|||||||
m_data.threadNames.emplace( id, pointerMap.find( ptr )->second );
|
m_data.threadNames.emplace( id, pointerMap.find( ptr )->second );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( fileVer >= FileVersion( 0, 3, 201 ) )
|
||||||
|
{
|
||||||
|
f.Read( sz );
|
||||||
|
m_data.threadExpand.reserve( sz );
|
||||||
|
}
|
||||||
|
|
||||||
f.Read( sz );
|
f.Read( sz );
|
||||||
for( uint64_t i=0; i<sz; i++ )
|
for( uint64_t i=0; i<sz; i++ )
|
||||||
{
|
{
|
||||||
@ -2792,6 +2798,9 @@ void Worker::Write( FileWrite& f )
|
|||||||
f.Write( &ptr, sizeof( ptr ) );
|
f.Write( &ptr, sizeof( ptr ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sz = m_data.threadExpand.size();
|
||||||
|
f.Write( &sz, sizeof( sz ) );
|
||||||
|
|
||||||
sz = m_data.sourceLocation.size();
|
sz = m_data.sourceLocation.size();
|
||||||
f.Write( &sz, sizeof( sz ) );
|
f.Write( &sz, sizeof( sz ) );
|
||||||
for( auto& v : m_data.sourceLocation )
|
for( auto& v : m_data.sourceLocation )
|
||||||
|
Loading…
Reference in New Issue
Block a user