< prev index next >

src/hotspot/share/prims/jvmtiRawMonitor.cpp

Print this page
*** 27,10 ***
--- 27,13 ---
  #include "prims/jvmtiRawMonitor.hpp"
  #include "runtime/atomic.hpp"
  #include "runtime/interfaceSupport.inline.hpp"
  #include "runtime/orderAccess.hpp"
  #include "runtime/thread.inline.hpp"
+ #if INCLUDE_TSAN
+ #include "tsan/tsan.hpp"
+ #endif  // INCLUDE_TSAN
  
  JvmtiRawMonitor::QNode::QNode(Thread* thread) : _next(NULL), _prev(NULL),
                                                  _event(thread->_ParkEvent),
                                                  _notified(0), _t_state(TS_RUN) {
  }

*** 45,10 ***
--- 48,11 ---
    JavaThread* current_java_thread = JavaThread::current();
    assert(current_java_thread->thread_state() == _thread_in_vm, "Must be in vm");
    for (int i = 0; i < count(); i++) {
      JvmtiRawMonitor* rmonitor = monitors()->at(i);
      rmonitor->raw_enter(current_java_thread);
+     TSAN_RUNTIME_ONLY(TSAN_RAW_LOCK_ACQUIRED(rmonitor));
    }
    // pending monitors are converted to real monitor so delete them all.
    dispose();
  }
  
< prev index next >