mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Save and load hardware sample data.
This commit is contained in:
parent
df50eb890f
commit
c6f071a66a
@ -7,7 +7,7 @@ namespace Version
|
||||
{
|
||||
enum { Major = 0 };
|
||||
enum { Minor = 7 };
|
||||
enum { Patch = 8 };
|
||||
enum { Patch = 9 };
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1699,6 +1699,19 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
||||
}
|
||||
}
|
||||
|
||||
if( fileVer >= FileVersion( 0, 7, 9 ) )
|
||||
{
|
||||
f.Read( sz );
|
||||
m_data.hwSamples.reserve( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
{
|
||||
uint64_t addr;
|
||||
HwSampleData data;
|
||||
f.Read2( addr, data );
|
||||
m_data.hwSamples.emplace( addr, data );
|
||||
}
|
||||
}
|
||||
|
||||
if( fileVer >= FileVersion( 0, 6, 13 ) )
|
||||
{
|
||||
f.Read( sz );
|
||||
@ -7523,6 +7536,14 @@ void Worker::Write( FileWrite& f, bool fiDict )
|
||||
}
|
||||
}
|
||||
|
||||
sz = m_data.hwSamples.size();
|
||||
f.Write( &sz, sizeof( sz ) );
|
||||
for( auto& v : m_data.hwSamples )
|
||||
{
|
||||
f.Write( &v.first, sizeof( v.first ) );
|
||||
f.Write( &v.second, sizeof( v.second ) );
|
||||
}
|
||||
|
||||
sz = m_data.sourceFileCache.size();
|
||||
f.Write( &sz, sizeof( sz ) );
|
||||
for( auto& v : m_data.sourceFileCache )
|
||||
|
Loading…
Reference in New Issue
Block a user