mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Save/load tid to pid mapping.
This commit is contained in:
parent
20e8a5ecc8
commit
1498417a8d
@ -1508,6 +1508,17 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
}
|
||||
}
|
||||
|
||||
if( fileVer >= FileVersion( 0, 5, 5 ) )
|
||||
{
|
||||
f.Read( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
{
|
||||
uint64_t tid, pid;
|
||||
f.Read2( tid, pid );
|
||||
m_data.tidToPid.emplace( tid, pid );
|
||||
}
|
||||
}
|
||||
|
||||
s_loadProgress.total.store( 0, std::memory_order_relaxed );
|
||||
m_loadTime = std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now() - loadStart ).count();
|
||||
|
||||
@ -5039,6 +5050,14 @@ void Worker::Write( FileWrite& f )
|
||||
f.Write( &thread, sizeof( thread ) );
|
||||
}
|
||||
}
|
||||
|
||||
sz = m_data.tidToPid.size();
|
||||
f.Write( &sz, sizeof( sz ) );
|
||||
for( auto& v : m_data.tidToPid )
|
||||
{
|
||||
f.Write( &v.first, sizeof( v.first ) );
|
||||
f.Write( &v.second, sizeof( v.second ) );
|
||||
}
|
||||
}
|
||||
|
||||
void Worker::WriteTimeline( FileWrite& f, const Vector<ZoneEvent*>& vec, int64_t& refTime )
|
||||
|
Loading…
Reference in New Issue
Block a user