mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 08:14:34 +00:00
Simplify loading memory events.
This commit is contained in:
parent
569a9fb9be
commit
d030674b83
@ -880,19 +880,10 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
|||||||
s_loadProgress.subProgress.store( i, std::memory_order_relaxed );
|
s_loadProgress.subProgress.store( i, std::memory_order_relaxed );
|
||||||
if( fileVer > FileVersion( 0, 4, 1 ) )
|
if( fileVer > FileVersion( 0, 4, 1 ) )
|
||||||
{
|
{
|
||||||
f.Read2( mem->ptr, mem->size );
|
f.Read( mem, sizeof( MemEvent::ptr ) + sizeof( MemEvent::size ) + sizeof( MemEvent::timeAlloc ) + sizeof( MemEvent::timeFree ) + sizeof( MemEvent::csAlloc ) + sizeof( MemEvent::csFree ) );
|
||||||
mem->timeAlloc = ReadTimeOffset( f, refTime );
|
refTime += mem->timeAlloc;
|
||||||
int64_t freeOffset;
|
mem->timeAlloc = refTime;
|
||||||
f.Read( freeOffset );
|
if( mem->timeFree >= 0 ) mem->timeFree += refTime;
|
||||||
if( freeOffset < 0 )
|
|
||||||
{
|
|
||||||
mem->timeFree = freeOffset;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mem->timeFree = mem->timeAlloc + freeOffset;
|
|
||||||
}
|
|
||||||
f.Read2( mem->csAlloc, mem->csFree );
|
|
||||||
}
|
}
|
||||||
else if( fileVer > FileVersion( 0, 3, 1 ) )
|
else if( fileVer > FileVersion( 0, 3, 1 ) )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user