[lilliput-jdk17u:lilliput] RFR: 8310944: [Lilliput/JDK17] Streamline and cleanup GC code [v2]
Aleksey Shipilev
shade at openjdk.org
Thu Jun 29 13:58:25 UTC 2023
On Thu, 29 Jun 2023 11:02:31 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> 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)
>
> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove unused method args
I have questions :)
src/hotspot/share/oops/oop.inline.hpp line 97:
> 95: markWord oopDesc::prototype_mark() const {
> 96: if (UseCompactObjectHeaders) {
> 97: return klass()->prototype_header();
This is called from `MarkSweep::mark_object`. Shouldn't it then use `forward_safe_klass`?
src/hotspot/share/oops/oop.inline.hpp line 303:
> 301: set_mark(forward_safe_klass()->prototype_header());
> 302: } else {
> 303: set_mark(markWord::prototype());
This thing is used from `PreservedMarks::init_forwarded_mark`, which in current 17u upstream calls `oopDesc::init_mark`, which then calls: ` set_mark(markWord::prototype_for_klass(klass()));`.
So, does this miss the +BiasedLocking mark prototype?
-------------
PR Review: https://git.openjdk.org/lilliput-jdk17u/pull/50#pullrequestreview-1505343296
PR Review Comment: https://git.openjdk.org/lilliput-jdk17u/pull/50#discussion_r1246657851
PR Review Comment: https://git.openjdk.org/lilliput-jdk17u/pull/50#discussion_r1246650743
More information about the lilliput-dev
mailing list