[master] RFR: Unconditionally preserve all marks during GC

Roman Kennke rkennke at openjdk.java.net
Tue May 18 21:01:29 UTC 2021


When storing the Klass* in the object header, we need to preserve all marks during GC, because otherwise we'd be loosing the Klass*.

This means that the PreservedMarks structure is repurposed as a full (reverse) forwarding table. Reverse because instead of mapping object->forwardee, and leaving the mark alone, it maps object->mark and stores the forwardee in the header, which might be a better idea because it means we can have a most compact table.

Shenandoah doesn't have this problem, except during full-GC, and ZGC has its own forwarding table.

This change will likely affect performance, but I haven't checked by how much, yet. It's probably more useful to see this in the context of actually reduced header.
Testing:
 - [x] tier1
 - [ ] tier2

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

Commit messages:
 - Unconditionally preserve all marks during GC

Changes: https://git.openjdk.java.net/lilliput/pull/6/files
 Webrev: https://webrevs.openjdk.java.net/?repo=lilliput&pr=6&range=00
  Stats: 117 lines in 15 files changed: 0 ins; 106 del; 11 mod
  Patch: https://git.openjdk.java.net/lilliput/pull/6.diff
  Fetch: git fetch https://git.openjdk.java.net/lilliput pull/6/head:pull/6

PR: https://git.openjdk.java.net/lilliput/pull/6


More information about the lilliput-dev mailing list