Load memory event callstack index.

This commit is contained in:
Bartosz Taudul 2018-06-19 21:51:06 +02:00
parent 7c1333ce2f
commit b6e71dd909

View File

@ -547,8 +547,17 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
m_data.memory.data.reserve_and_use( sz ); m_data.memory.data.reserve_and_use( sz );
auto mem = m_data.memory.data.data(); auto mem = m_data.memory.data.data();
for( uint64_t i=0; i<sz; i++ ) for( uint64_t i=0; i<sz; i++ )
{
if( fileVer <= FileVersion( 0, 3, 1 ) )
{ {
f.Read( mem, sizeof( MemEvent::ptr ) + sizeof( MemEvent::size ) + sizeof( MemEvent::timeAlloc ) + sizeof( MemEvent::timeFree ) ); f.Read( mem, sizeof( MemEvent::ptr ) + sizeof( MemEvent::size ) + sizeof( MemEvent::timeAlloc ) + sizeof( MemEvent::timeFree ) );
mem->callstack = 0;
}
else
{
f.Read( mem, sizeof( MemEvent::ptr ) + sizeof( MemEvent::size ) + sizeof( MemEvent::timeAlloc ) + sizeof( MemEvent::timeFree ) + sizeof( MemEvent::callstack ) );
}
uint64_t t0, t1; uint64_t t0, t1;
f.Read2( t0, t1 ); f.Read2( t0, t1 );
mem->threadAlloc = CompressThread( t0 ); mem->threadAlloc = CompressThread( t0 );