mirror of
https://github.com/wolfpld/tracy.git
synced 2026-11-18 05:35:58 +00:00
Save and load sections data.
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
#ifndef __TRACYVERSION_HPP__
|
||||
#define __TRACYVERSION_HPP__
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
namespace Version
|
||||
namespace tracy::Version
|
||||
{
|
||||
constexpr int Major = 0;
|
||||
constexpr int Minor = 13;
|
||||
constexpr int Patch = 3;
|
||||
}
|
||||
constexpr int Patch = 4;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -726,6 +726,13 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks, bool allow
|
||||
m_data.framesBase = m_data.frames.Data()[0];
|
||||
assert( m_data.framesBase->name == 0 );
|
||||
|
||||
if( fileVer >= FileVersion( 0, 13, 4 ) )
|
||||
{
|
||||
f.Read( sz );
|
||||
m_data.sections.reserve_exact( sz, m_slab );
|
||||
f.Read( m_data.sections.data(), sz * sizeof( SectionItem ) );
|
||||
}
|
||||
|
||||
unordered_flat_map<uint64_t, const char*> pointerMap;
|
||||
|
||||
f.Read( sz );
|
||||
@@ -8226,6 +8233,10 @@ void Worker::Write( FileWrite& f, bool fiDict )
|
||||
}
|
||||
}
|
||||
|
||||
sz = m_data.sections.size();
|
||||
f.Write( &sz, sizeof( sz ) );
|
||||
f.Write( m_data.sections.data(), sz * sizeof( SectionItem ) );
|
||||
|
||||
sz = m_data.stringData.size();
|
||||
f.Write( &sz, sizeof( sz ) );
|
||||
for( auto& v : m_data.stringData )
|
||||
|
||||
Reference in New Issue
Block a user