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

G1: Use two arrays for the fast cset test, put region type information in the arrays

XMLWordPrintable

    • gc
    • generic
    • generic

      The "is in CSet" queries during G1 use a bool array, with one entry per region, which specifies whether the region is in the cset or not.

      This can be extended in a couple of ways. First, it will be beneficial to use two arrays: one that's being built and one that has the previous CSet information. So, at the start of a pause we make the "being built" array as the "current one" which remains static during the pause while we're tagging the new survivor regions in the other array (which is not the one that's "being built").

      Additionally, we can add more information to these arrays. Instead of just a true / false bool on whether the region is in the CSet we can actually have values which show the actual region type (eden, survivor, etc.). This can help us in the future in order to optimize the GC operation: when we read the entry for a region, not only we'll be able to tell whether the region is in the CSet or not (entry != 0) but also whether it's young in order to know whether to checks its age bits, etc.

      For this we can use the "heap spanning table" data structure introduced in JDK-7163191.

            Unassigned Unassigned
            tonyp Tony Printezis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: