--- a/hotspot/src/share/vm/compiler/compileBroker.cpp Thu Mar 24 15:53:19 2016 -0700
+++ b/hotspot/src/share/vm/compiler/compileBroker.cpp Sat Apr 02 05:39:25 2016 +0200
@@ -32,6 +32,7 @@
#include "compiler/compileLog.hpp"
#include "compiler/compilerOracle.hpp"
#include "compiler/directivesParser.hpp"
+#include "gc/shared/referencePendingListLocker.hpp"
#include "interpreter/linkResolver.hpp"
#include "memory/allocation.inline.hpp"
#include "oops/methodData.hpp"
@@ -48,6 +49,7 @@
#include "runtime/os.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/sweeper.hpp"
+#include "runtime/timerTrace.hpp"
#include "trace/tracing.hpp"
#include "utilities/dtrace.hpp"
#include "utilities/events.hpp"
@@ -901,7 +903,7 @@
// the pending list lock or a 3-way deadlock may occur
// between the reference handler thread, a GC (instigated
// by a compiler thread), and compiled method registration.
- if (InstanceRefKlass::owns_pending_list_lock(JavaThread::current())) {
+ if (ReferencePendingListLocker::is_locked_by_self()) {
return;
}