SWDEV-458943 - Implement std::mutex based monitor

Implement std::mutex based monitor that has much
simpler logics than legacy monitor.
Create DEBUG_CLR_USE_STDMUTEX_IN_AMD_MONITOR to
toggle them.
If DEBUG_CLR_USE_STDMUTEX_IN_AMD_MONITOR = false
  (by default), use legacy monitor;
If DEBUG_CLR_USE_STDMUTEX_IN_AMD_MONITOR = true,
  use std::mutex based monitor.
If no perf drop of stl::mutex based monitor,
legacy one will be removed later.

Change-Id: I1d21368ff462477d3238d71e4e2a1a7d6b9167ad
This commit is contained in:
Tao Sang
2024-06-05 11:25:18 -04:00
committed by Tao Sang
parent fa07c33cba
commit 73c02041e1
4 changed files with 228 additions and 100 deletions
+1 -1
View File
@@ -183,7 +183,7 @@ class Event : public RuntimeObject {
//! Signal all threads waiting on this event.
void signal() {
ScopedLock lock(lock_);
ScopedLock lock(lock_);// Unnecessary
lock_.notifyAll();
}