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

G1: Make array chunking use the same length field as the other young GCs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b04

      Description

      From Tony:

      Talking about array chunking in G1, we noticed a small difference in that code compared to what the other GCs (ParNew / PS) do. G1 uses the to-space length field to encode how much of the array has been scanned (i.e., the from-space length field is always correct). ParNew and PS use the from-space length field (and the to-space length field is always correct). I came across that issue when I was working on a change to periodically scan PLABs (for some profiling stuff I was working on) and in G1 some PLABs were unparseable because the length field of arrays could be incorrect (even if the PLAB is retired, it's possible that the length field is still incorrect given that other threads might still be working on that array).

      The patch to change G1 to do what ParNew / PS also do is very small (and we've had it for a few months in our repo without any issues). Any chance of convincing you to also take it? I should be clear that the patch doesn't fix a correctness issue in G1; the code is correct as is. But it will bring G1 in line with the other two GCs and allow PLAB scanning during GC, if you want to do that...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brutisso Bengt Rutisson (Inactive)
              Reporter:
              brutisso Bengt Rutisson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: