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

Roman Kennke rkennke at openjdk.org
Thu Jun 29 14:18:24 UTC 2023


On Thu, 29 Jun 2023 13:55:30 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove unused method args
>
> 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`?

I don't think that any objects would be forwarded during serial mark-sweep marking phase.

> 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?

Right. In-fact, this means we can just fix init_mark() and use that.

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

PR Review Comment: https://git.openjdk.org/lilliput-jdk17u/pull/50#discussion_r1246682656
PR Review Comment: https://git.openjdk.org/lilliput-jdk17u/pull/50#discussion_r1246682176


More information about the lilliput-dev mailing list