mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Adjust load stages.
This commit is contained in:
parent
71db7c431f
commit
a46425f4e9
@ -246,11 +246,11 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
|
||||
if( fileVer <= FileVersion( 0, 3, 1 ) )
|
||||
{
|
||||
s_loadProgress.total.store( 13, std::memory_order_relaxed );
|
||||
s_loadProgress.total.store( 7, std::memory_order_relaxed );
|
||||
}
|
||||
else
|
||||
{
|
||||
s_loadProgress.total.store( 15, std::memory_order_relaxed );
|
||||
s_loadProgress.total.store( 8, std::memory_order_relaxed );
|
||||
}
|
||||
|
||||
s_loadProgress.progress.store( 0, std::memory_order_relaxed );
|
||||
@ -272,12 +272,10 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
m_captureName = std::string( tmp, tmp+sz );
|
||||
}
|
||||
|
||||
s_loadProgress.progress.store( 1, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
m_data.frames.reserve_and_use( sz );
|
||||
f.Read( m_data.frames.data(), sizeof( uint64_t ) * sz );
|
||||
|
||||
s_loadProgress.progress.store( 2, std::memory_order_relaxed );
|
||||
flat_hash_map<uint64_t, const char*, nohash<uint64_t>> pointerMap;
|
||||
|
||||
f.Read( sz );
|
||||
@ -292,7 +290,6 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
pointerMap.emplace( ptr, dst );
|
||||
}
|
||||
|
||||
s_loadProgress.progress.store( 3, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
{
|
||||
@ -301,7 +298,6 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
m_data.strings.emplace( id, pointerMap.find( ptr )->second );
|
||||
}
|
||||
|
||||
s_loadProgress.progress.store( 4, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
{
|
||||
@ -310,7 +306,6 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
m_data.threadNames.emplace( id, pointerMap.find( ptr )->second );
|
||||
}
|
||||
|
||||
s_loadProgress.progress.store( 5, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
{
|
||||
@ -321,13 +316,11 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
m_data.sourceLocation.emplace( ptr, srcloc );
|
||||
}
|
||||
|
||||
s_loadProgress.progress.store( 6, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
m_data.sourceLocationExpand.reserve_and_use( sz );
|
||||
f.Read( m_data.sourceLocationExpand.data(), sizeof( uint64_t ) * sz );
|
||||
const auto sle = sz;
|
||||
|
||||
s_loadProgress.progress.store( 7, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
m_data.sourceLocationPayload.reserve( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
@ -351,7 +344,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
}
|
||||
#endif
|
||||
|
||||
s_loadProgress.progress.store( 8, std::memory_order_relaxed );
|
||||
s_loadProgress.progress.store( 1, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
if( eventMask & EventType::Locks )
|
||||
{
|
||||
@ -450,7 +443,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
}
|
||||
}
|
||||
|
||||
s_loadProgress.progress.store( 9, std::memory_order_relaxed );
|
||||
s_loadProgress.progress.store( 2, std::memory_order_relaxed );
|
||||
flat_hash_map<uint64_t, MessageData*, nohash<uint64_t>> msgMap;
|
||||
f.Read( sz );
|
||||
if( eventMask & EventType::Messages )
|
||||
@ -480,7 +473,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
}
|
||||
}
|
||||
|
||||
s_loadProgress.progress.store( 10, std::memory_order_relaxed );
|
||||
s_loadProgress.progress.store( 3, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
m_data.threads.reserve( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
@ -540,7 +533,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
} );
|
||||
#endif
|
||||
|
||||
s_loadProgress.progress.store( 11, std::memory_order_relaxed );
|
||||
s_loadProgress.progress.store( 4, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
m_data.gpuData.reserve( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
@ -572,7 +565,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
m_data.gpuData.push_back_no_space_check( ctx );
|
||||
}
|
||||
|
||||
s_loadProgress.progress.store( 12, std::memory_order_relaxed );
|
||||
s_loadProgress.progress.store( 5, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
if( eventMask & EventType::Plots )
|
||||
{
|
||||
@ -609,7 +602,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
return;
|
||||
}
|
||||
|
||||
s_loadProgress.progress.store( 13, std::memory_order_relaxed );
|
||||
s_loadProgress.progress.store( 6, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
bool reconstructMemAllocPlot = false;
|
||||
if( eventMask & EventType::Memory )
|
||||
@ -690,7 +683,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
|
||||
if( fileVer <= FileVersion( 0, 3, 1 ) ) goto finishLoading;
|
||||
|
||||
s_loadProgress.progress.store( 14, std::memory_order_relaxed );
|
||||
s_loadProgress.progress.store( 7, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
m_data.callstackPayload.reserve( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
@ -710,7 +703,6 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
||||
m_data.callstackPayload.push_back_no_space_check( arr );
|
||||
}
|
||||
|
||||
s_loadProgress.progress.store( 15, std::memory_order_relaxed );
|
||||
f.Read( sz );
|
||||
m_data.callstackFrameMap.reserve( sz );
|
||||
for( uint64_t i=0; i<sz; i++ )
|
||||
|
Loading…
Reference in New Issue
Block a user