< prev index next >

src/hotspot/share/runtime/javaThread.cpp

Print this page
*** 68,10 ***
--- 68,11 ---
  #include "runtime/interfaceSupport.inline.hpp"
  #include "runtime/java.hpp"
  #include "runtime/javaCalls.hpp"
  #include "runtime/javaThread.inline.hpp"
  #include "runtime/jniHandles.inline.hpp"
+ #include "runtime/lockStack.inline.hpp"
  #include "runtime/mutexLocker.hpp"
  #include "runtime/orderAccess.hpp"
  #include "runtime/osThread.hpp"
  #include "runtime/safepoint.hpp"
  #include "runtime/safepointMechanism.inline.hpp"

*** 485,12 ***
  
    _parker(),
  
    _class_to_be_initialized(nullptr),
  
!   _SleepEvent(ParkEvent::Allocate(this))
! {
    set_jni_functions(jni_functions());
  
  #if INCLUDE_JVMCI
    assert(_jvmci._implicit_exception_pc == nullptr, "must be");
    if (JVMCICounterSize > 0) {
--- 486,13 ---
  
    _parker(),
  
    _class_to_be_initialized(nullptr),
  
!   _SleepEvent(ParkEvent::Allocate(this)),
! 
+   _lock_stack() {
    set_jni_functions(jni_functions());
  
  #if INCLUDE_JVMCI
    assert(_jvmci._implicit_exception_pc == nullptr, "must be");
    if (JVMCICounterSize > 0) {

*** 983,10 ***
--- 985,11 ---
      return ret;
    }
  }
  
  bool JavaThread::is_lock_owned(address adr) const {
+   assert(!UseFastLocking, "should not be called with fast-locking");
    if (Thread::is_lock_owned(adr)) return true;
  
    for (MonitorChunk* chunk = monitor_chunks(); chunk != nullptr; chunk = chunk->next()) {
      if (chunk->contains(adr)) return true;
    }

*** 1376,10 ***
--- 1379,14 ---
    while (entry != nullptr) {
      f->do_oop((oop*)entry->cont_addr());
      f->do_oop((oop*)entry->chunk_addr());
      entry = entry->parent();
    }
+ 
+   if (!UseHeavyMonitors && UseFastLocking) {
+     lock_stack().oops_do(f);
+   }
  }
  
  void JavaThread::oops_do_frames(OopClosure* f, CodeBlobClosure* cf) {
    if (!has_last_Java_frame()) {
      return;
< prev index next >