mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-23 02:34:33 +00:00
Do not touch the thread compression cache in a load-time job.
The job which builds the symbol samples and child samples maps called CompressThread, which updates the lookup cache and can insert into the compression map, while the timeline processing job concurrently reads the map, deliberately using the raw lookup to avoid this exact hazard. All threads are already present in the compression data loaded from the trace, so use the raw lookup as well.
This commit is contained in:
@@ -1927,7 +1927,8 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks, bool allow
|
||||
jobs.emplace_back( std::thread( [this] {
|
||||
for( auto& t : m_data.threads )
|
||||
{
|
||||
uint16_t tid = CompressThread( t->id );
|
||||
// Don't touch thread compression cache in a thread.
|
||||
uint16_t tid = m_data.localThreadCompress.DecompressMustRaw( t->id );
|
||||
auto cit = t->ctxSwitchSamples.begin();
|
||||
for( auto& v : t->samples )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user