mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[perf] Fix a data race in the PerfJITEventListener
Concurrent JIT compilation + PerfJITEventListener triggers tsan error Reviewed By: cota Differential Revision: https://reviews.llvm.org/D104977
This commit is contained in:
parent
785de491d5
commit
260c6f5e5f
@ -284,6 +284,9 @@ void PerfJITEventListener::notifyObjectLoaded(
|
||||
NotifyCode(Name, *AddrOrErr, Size);
|
||||
}
|
||||
|
||||
// avoid races with writes
|
||||
std::lock_guard<sys::Mutex> Guard(Mutex);
|
||||
|
||||
Dumpstream->flush();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user