There are 2 places in AdvancedThresholdPolicy::select_task where safepoint can occur:
- AdvancedThresholdPolicy::update_rate
- CompileTaskWrapper::~CompileTaskWrapper for a stale task
AdvancedThresholdPolicy::select_task is called from CompileQueue::get() which holds MethodCompileQueue_lock.
Additional precautions are needed to avoid deadlocks in VM thread, so there's an agreement when entering a safepoint to avoid holding any locks VM thread can use (see [1]).
[1] http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/file/tip/src/share/vm/runtime/thread.cpp#l903
- AdvancedThresholdPolicy::update_rate
- CompileTaskWrapper::~CompileTaskWrapper for a stale task
AdvancedThresholdPolicy::select_task is called from CompileQueue::get() which holds MethodCompileQueue_lock.
Additional precautions are needed to avoid deadlocks in VM thread, so there's an agreement when entering a safepoint to avoid holding any locks VM thread can use (see [1]).
[1] http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/file/tip/src/share/vm/runtime/thread.cpp#l903
- duplicates
-
JDK-8023461 Thread holding lock at safepoint that vm can block on: MethodCompileQueue_lock
-
- Closed
-
- relates to
-
JDK-8042926 AdvancedThresholdPolicy::update_rate should use handles for Method*
-
- Closed
-