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

G1 BOT verification should not verify beyond allocation threshold



    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • hotspot
    • gc
    • b18


      The G1 BOT contains an allocation threshold which basically acts as a "last known valid entry" index for the per-region BOT (which are views on the global BOT table).

      Currently G1 BOT verification actually "verifies" the BOT within a region past that BOT index.

      This causes issues with young regions; actually there is already code that prevents their BOT verification. This is perfectly fine, allocations in young regions do not update the BOTs.

      With JDK-8262068 this existing filtering of young regions (such that their BOT is not verified) does not work because there may be young regions that are not compacted (so with a BOT that have that last known valid entry at the start of the region) are still labelled as old.

      This change proposes to not try to verify the BOT beyond the last known valid index (which is arguably not worth doing), which also covers the existing young filtering.

      There are alternatives that may work in particular for JDK-8262068:
      a) always compact young regions (which recreates the BOT)
      b) create a "dummy" BOT that spans the entire part of the region containing live objects

      However they were rejected by me because
      option a) takes time and directly counters that optimization for no reason
      option b) makes finding the start of an object within these regions slow (they are not refined when there is at least *some* bot)

      and finally I do not think there is much point in trying to be clever about areas in the BOT that are known to not contain useful values.


        Issue Links



              tschatzl Thomas Schatzl
              tschatzl Thomas Schatzl
              0 Vote for this issue
              3 Start watching this issue