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

Remove Mutex::_safepoint_check_sometimes

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • hotspot
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: