Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8042925

Consider avoiding safepoints in AdvancedThresholdPolicy::select_task

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 9
    • hotspot
    • None

      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

            anoll Albert Noll (Inactive)
            vlivanov Vladimir Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: