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:
Bartosz Taudul
2026-07-25 21:52:01 +02:00
parent f51b984edb
commit 52e31be7f4

View File

@@ -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 )
{