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 authored and Tao Sang committed 2024-07-04 11:50:46 -04:00
1 parent fa07c33cba
commit 73c02041e1
4 files changed
+228 -100

No files matched your search

+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();
}