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

Remove Mutex::_safepoint_check_sometimes

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b25

      Description

      With the SR_lock removal, the only lock that is taken with safepoint checking but sometimes with Mutex::_no_safepoint_check is the Heap_lock. That lock acquisition is during thread exit, and there's already code that doesn't do safepoint checking for that condition:

        bool is_active_Java_thread = self->is_active_Java_thread();
      ...
          if (is_active_Java_thread) {
            assert(rank() > Mutex::special, "Potential deadlock with special or lesser rank mutex");
            { ThreadBlockInVM tbivmdc(self->as_Java_thread(), &in_flight_mutex);
              in_flight_mutex = this; // save for ~ThreadBlockInVM
              _lock.lock();
            }

      So there's no need for safepoint_check_sometimes anymore.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              coleenp Coleen Phillimore
              Reporter:
              coleenp Coleen Phillimore
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: