[lilliput-jdk17u:lilliput] RFR: 8310944: [Lilliput/JDK17] Streamline and cleanup GC code

Roman Kennke rkennke at openjdk.org
Thu Jun 29 10:11:29 UTC 2023


We have a bunch of ugly hacks in GC code paths where we do stuff like:
if (UseCompactObjectHeaders) {
 // fetch object Klass* or size in a safe way...
} else {
  // fetch object Klass* or size in the traditional way
}

This happens in various places in similar ways. I propose to add relevant methods to oopDesc, and make all GC code use those new methods instead.

This helps streamline and clean up a bunch of GC code, and bring it closer to the JDK22 upstreaming PR.

Testing:
 - [x] hotspot_gc
 - [x] hotspot_gc (+UCOH)
 - [x] tier1
 - [x] tier1 (+ShenandoahGC)
 - [x] tier1 (+ParallelGC)
 - [x] tier1 (+SerialGC)
 - [x] tier1 (+UCOH)
 - [x] tier1 (+UCOH +ShenandoahGC)
 - [x] tier1 (+UCOH +ParallelGC)
 - [x] tier1 (+UCOH +SerialGC)
 - [ ] tier2
 - [ ] tier2 (+UCOH)

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

Commit messages:
 - Remove unused declaration
 - Safely access Klass* and size in G1 and Par promotion
 - 8310944: [Lilliput/JDK17] Streamline and cleanup GC code

Changes: https://git.openjdk.org/lilliput-jdk17u/pull/50/files
 Webrev: https://webrevs.openjdk.org/?repo=lilliput-jdk17u&pr=50&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8310944
  Stats: 292 lines in 15 files changed: 83 ins; 177 del; 32 mod
  Patch: https://git.openjdk.org/lilliput-jdk17u/pull/50.diff
  Fetch: git fetch https://git.openjdk.org/lilliput-jdk17u.git pull/50/head:pull/50

PR: https://git.openjdk.org/lilliput-jdk17u/pull/50


More information about the lilliput-dev mailing list