RFR: 8278917: Use Prev Bitmap for recording evac failed objects [v5]

Stefan Johansson sjohanss at openjdk.java.net
Tue Dec 21 10:43:48 UTC 2021


> Please review this enhancement to improve evacuation failure handling in G1.
> 
> **Summary**
> Prior to this change the evacuation failure handling recorded the failing objects during evacuation in a set backed by `G1SegmentedArray`. Later when processing the objects the set needed to be sorted to allow for efficient zapping of the areas between the live objects. During this phase we also mark the live objects in the prev mark bitmap to allow for correct verification.
> 
> This change optimizes away sorting part by directly marking failing objects in the mark bitmap. The marks are then used to determine which objects need to be processed (and what areas should be zapped) when cleaning up after the evacuation phase. For this to work, there can't be any stale marks in the bitmap. This require us to do some additional clearing that was not needed before. Both at the end of a Full GC and during preparation for mixed collections. 
> 
> This additional clearing does cost a bit, but are done in parallel and the benefit outweighs the cost. For the Full GC the clearing of the bitmap is moved into the compaction closure. This is something that was thought of before and the closure already have the bitmap as a member. This way the Full GC regression becomes minimal.
> 
> **Testing** 
> 
> - [x] Mach5 with and without additional evacuation failures injected
> - [x] Local testing to verify the evacuation failure processing is improved
> - [x] Performance testing not generating evacuation failures show no regression
> - [x] Full GC tests show very limited regressions due to additional clearing in compaction phase

Stefan Johansson has updated the pull request incrementally with one additional commit since the last revision:

  Thomas bikeshedding :)

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/6867/files
  - new: https://git.openjdk.java.net/jdk/pull/6867/files/6449286c..56213f93

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6867&range=04
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6867&range=03-04

  Stats: 18 lines in 6 files changed: 0 ins; 0 del; 18 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6867.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6867/head:pull/6867

PR: https://git.openjdk.java.net/jdk/pull/6867



More information about the hotspot-gc-dev mailing list