hotspot/src/share/vm/oops/method.cpp
changeset 37267 ad8c0e8de29f
parent 36822 cdc493d7bc9a
parent 37248 11a660dbbb8e
child 37439 e8970711113b
--- a/hotspot/src/share/vm/oops/method.cpp	Mon Apr 04 13:40:18 2016 -0700
+++ b/hotspot/src/share/vm/oops/method.cpp	Thu Apr 07 09:47:48 2016 -0700
@@ -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"
@@ -38,6 +39,7 @@
 #include "memory/heapInspection.hpp"
 #include "memory/metadataFactory.hpp"
 #include "memory/oopFactory.hpp"
+#include "memory/resourceArea.hpp"
 #include "oops/constMethod.hpp"
 #include "oops/method.hpp"
 #include "oops/methodData.hpp"
@@ -374,7 +376,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;
   }