RFR: 8338688: Shenandoah: Avoid calling java_lang_Class accessors in asserts/verifier
William Kemper
wkemper at openjdk.org
Wed Aug 21 16:13:10 UTC 2024
On Tue, 20 Aug 2024 16:55:53 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> In GC verification code, we are not always safe to touch the klass directly. This becomes a problem in Lilliput, where loading klass from the from-space is erroneous. Lilliput would replace `obj->klass()` with `obj->forward_safe_klass()` to make it right in GC code. But accessors like `java_lang_Class` would not be fixed: they would instead rely on barriers to always be called on to-space objects.
>
> So we are better avoiding using these `java_lang_Class` accessors in GC verification code, and use the loaded `klass` directly.
>
> Additional tests:
> - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah`
> - [x] Linux x86_64 server fastdebug, `all` with `-XX:+UseShenandoahGC`
Thanks, LGTM.
-------------
Marked as reviewed by wkemper (Committer).
PR Review: https://git.openjdk.org/jdk/pull/20651#pullrequestreview-2251295201
More information about the shenandoah-dev
mailing list