mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
Change order of file version checks during loading memory events.
This commit is contained in:
parent
88b7961421
commit
569a9fb9be
@ -878,17 +878,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
|||||||
for( uint64_t i=0; i<sz; i++ )
|
for( uint64_t i=0; i<sz; i++ )
|
||||||
{
|
{
|
||||||
s_loadProgress.subProgress.store( i, std::memory_order_relaxed );
|
s_loadProgress.subProgress.store( i, std::memory_order_relaxed );
|
||||||
if( fileVer <= FileVersion( 0, 3, 1 ) )
|
if( fileVer > FileVersion( 0, 4, 1 ) )
|
||||||
{
|
|
||||||
f.Read( mem, sizeof( MemEvent::ptr ) + sizeof( MemEvent::size ) + sizeof( MemEvent::timeAlloc ) + sizeof( MemEvent::timeFree ) );
|
|
||||||
mem->csAlloc = 0;
|
|
||||||
mem->csFree = 0;
|
|
||||||
}
|
|
||||||
else if( fileVer <= FileVersion( 0, 4, 1 ) )
|
|
||||||
{
|
|
||||||
f.Read( mem, sizeof( MemEvent::ptr ) + sizeof( MemEvent::size ) + sizeof( MemEvent::timeAlloc ) + sizeof( MemEvent::timeFree ) + sizeof( MemEvent::csAlloc ) + sizeof( MemEvent::csFree ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
f.Read2( mem->ptr, mem->size );
|
f.Read2( mem->ptr, mem->size );
|
||||||
mem->timeAlloc = ReadTimeOffset( f, refTime );
|
mem->timeAlloc = ReadTimeOffset( f, refTime );
|
||||||
@ -904,6 +894,16 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
|||||||
}
|
}
|
||||||
f.Read2( mem->csAlloc, mem->csFree );
|
f.Read2( mem->csAlloc, mem->csFree );
|
||||||
}
|
}
|
||||||
|
else if( fileVer > FileVersion( 0, 3, 1 ) )
|
||||||
|
{
|
||||||
|
f.Read( mem, sizeof( MemEvent::ptr ) + sizeof( MemEvent::size ) + sizeof( MemEvent::timeAlloc ) + sizeof( MemEvent::timeFree ) + sizeof( MemEvent::csAlloc ) + sizeof( MemEvent::csFree ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
f.Read( mem, sizeof( MemEvent::ptr ) + sizeof( MemEvent::size ) + sizeof( MemEvent::timeAlloc ) + sizeof( MemEvent::timeFree ) );
|
||||||
|
mem->csAlloc = 0;
|
||||||
|
mem->csFree = 0;
|
||||||
|
}
|
||||||
|
|
||||||
uint64_t t0, t1;
|
uint64_t t0, t1;
|
||||||
f.Read2( t0, t1 );
|
f.Read2( t0, t1 );
|
||||||
|
Loading…
Reference in New Issue
Block a user