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

Call check_possible_safepoint() from SafepointMechanism::process_if_requested()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 18
    • hotspot
    • b14

      There are 3 cases where we call check_possible_safepoint() to verify it is okay to allow a safepoint/handshake to start:
      1) When directly trying to process pending safepoint/handshakes (process_if_requested/process_if_requested_with_exit_check)
      2) When transitioning to a safe state since that can also allow a safepoint/handshake to start
      3) Places where we could have attempted to process a pending safepoint/handshake depending on a conditional, e.g. taking a branch that acquires a _safepoint_check_always lock (added by JDK-5103339).

      For case 1) we should call check_possible_safepoint() in SafepointMechanism::process_if_requested(). Currently we either make that call outside(ThreadStateTransition::transition_and_process) or we don't make it at all.

            pchilanomate Patricio Chilano Mateo
            pchilanomate Patricio Chilano Mateo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: