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

ZGC: Make some roots invisible to the heap iterator

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 14
    • 14
    • hotspot
    • gc
    • b12

    Description

      JDK-8227226 can temporarily create long[] objects on the heap, which later become oop arrays, when the array initialization has been completed. This is fine from a sampling/reporting point of view (the things done in the MemAllocator::Allocation destructor), since that only happens after the final klass pointer has been installed. However, if a heap iteration (via ZHeapIterator) happens before the final klass pointer has been installed, it will then see the long[]. As far as I can tell, this isn't a big deal, unless that heap iteration is out to JVMTI-tag all long[] instances. In that case, we tag a long[] which will later become an oop array, which seems wrong and potentially problematic. To avoid this, we want to be able to hide these roots from the heap iterator until the final klass pointer has been installed.

      Attachments

        Activity

          People

            pliden Per Liden (Inactive)
            pliden Per Liden (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: