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

Use an array to store the collection set regions instead of linking through regions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • gc
    • b129

      Currently the collection set is materialized using pointer members in the HeapRegion class, using a "next" pointer.

      This is problematic in various ways:
      - messes up the HeapRegion class with an additional member that is only used for a small part of the regions anyway.
      - it is not thread safe, and actually the sampling thread iterates over this linked list without any proper memory barriers, potentially causing crashes or at least problems with the prediction (using wrong values)
      - the change to free the collection set (JDK-8034842) in parallel needs to be extra cautious to not read old values.

      Fix this as suggested in the CR title.

            tschatzl Thomas Schatzl
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: