RFR: 8322383: G1: Only preserve marks on objects that are actually moved

Roman Kennke rkennke at openjdk.org
Tue Dec 19 16:26:05 UTC 2023


The G1 full-GC preserves marks during marking, for all live objects in compaction region. However, not all live objects do actually move. In particular, the start of a compaction chain may have a sediment of all-live objects which would not move, and thus don't need to have their marks preserved.
The problem can easily be solved by preserving marks during forwarding. That also seems a more natural place to do that.

Testing:
 - [x] hotspot_gc
 - [ ] tier1
 - [ ] tier2

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

Commit messages:
 - 8322383: G1: Only preserve marks on objects that are actually moved

Changes: https://git.openjdk.org/jdk/pull/17159/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17159&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8322383
  Stats: 41 lines in 9 files changed: 17 ins; 13 del; 11 mod
  Patch: https://git.openjdk.org/jdk/pull/17159.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17159/head:pull/17159

PR: https://git.openjdk.org/jdk/pull/17159


More information about the hotspot-dev mailing list