< prev index next >

src/hotspot/share/services/threadService.hpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -33,11 +33,10 @@
 #include "runtime/objectMonitor.inline.hpp"
 #include "runtime/perfData.hpp"
 #include "runtime/thread.hpp"
 #include "runtime/threadSMR.hpp"
 #include "services/management.hpp"
-#include "services/serviceUtil.hpp"
 
 class OopClosure;
 class ThreadDumpResult;
 class ThreadStackTrace;
 class ThreadSnapshot;

@@ -546,11 +545,11 @@
   // java_thread is waiting thread being blocked on monitor reenter.
   // Current thread is the notifying thread which holds the monitor.
   static bool wait_reenter_begin(JavaThread *java_thread, ObjectMonitor *obj_m) {
     assert((java_thread != NULL), "Java thread should not be null here");
     bool active = false;
-    if (is_alive(java_thread) && ServiceUtil::visible_oop((oop)obj_m->object())) {
+    if (is_alive(java_thread)) {
       active = contended_enter_begin(java_thread);
     }
     return active;
   }
 

@@ -567,11 +566,11 @@
     // Change thread status and collect contended enter stats for monitor contended
     // enter done for external java world objects and it is contended. All other cases
     // like for vm internal objects and for external objects which are not contended
     // thread status is not changed and contended enter stat is not collected.
     _active = false;
-    if (is_alive() && ServiceUtil::visible_oop((oop)obj_m->object()) && obj_m->contentions() > 0) {
+    if (is_alive() && obj_m->contentions() > 0) {
       _stat = java_thread->get_thread_stat();
       _active = contended_enter_begin(java_thread);
     }
   }
 
< prev index next >