Reorder instructions.

This commit is contained in:
Bartosz Taudul 2018-03-18 23:37:07 +01:00
parent ce2bf7c207
commit 2eece7c1f3

View File

@ -1652,10 +1652,12 @@ void Worker::ReadTimeline( FileRead& f, Vector<ZoneEvent*>& vec, uint16_t thread
for( uint64_t i=0; i<size; i++ ) for( uint64_t i=0; i<size; i++ )
{ {
auto zone = m_slab.Alloc<ZoneEvent>(); auto zone = m_slab.Alloc<ZoneEvent>();
new( &zone->child ) decltype( zone->child );
vec.push_back_no_space_check( zone ); vec.push_back_no_space_check( zone );
new( &zone->child ) decltype( zone->child );
f.Read( zone, sizeof( ZoneEvent ) - sizeof( ZoneEvent::child ) ); f.Read( zone, sizeof( ZoneEvent ) - sizeof( ZoneEvent::child ) );
ReadTimeline( f, zone->child, thread );
#ifndef TRACY_NO_STATISTICS #ifndef TRACY_NO_STATISTICS
auto it = m_data.sourceLocationZones.find( zone->srcloc ); auto it = m_data.sourceLocationZones.find( zone->srcloc );
assert( it != m_data.sourceLocationZones.end() ); assert( it != m_data.sourceLocationZones.end() );
@ -1671,8 +1673,6 @@ void Worker::ReadTimeline( FileRead& f, Vector<ZoneEvent*>& vec, uint16_t thread
} }
} }
#endif #endif
ReadTimeline( f, zone->child, thread );
} }
} }