hotspot/src/share/vm/oops/method.cpp
changeset 37179 4dbcb3a642d2
parent 36615 c744e3b0f8c5
parent 37155 f00f299cb386
child 37248 11a660dbbb8e
--- a/hotspot/src/share/vm/oops/method.cpp	Tue Mar 22 18:41:09 2016 -0700
+++ b/hotspot/src/share/vm/oops/method.cpp	Wed Mar 23 23:36:29 2016 +0100
@@ -30,6 +30,7 @@
 #include "gc/shared/collectedHeap.inline.hpp"
 #include "gc/shared/gcLocker.hpp"
 #include "gc/shared/generation.hpp"
+#include "gc/shared/referencePendingListLocker.hpp"
 #include "interpreter/bytecodeStream.hpp"
 #include "interpreter/bytecodeTracer.hpp"
 #include "interpreter/bytecodes.hpp"
@@ -374,7 +375,7 @@
 
   // Do not profile method if current thread holds the pending list lock,
   // which avoids deadlock for acquiring the MethodData_lock.
-  if (InstanceRefKlass::owns_pending_list_lock((JavaThread*)THREAD)) {
+  if (ReferencePendingListLocker::is_locked_by_self()) {
     return;
   }