Integrated: 8338688: Shenandoah: Avoid calling java_lang_Class accessors in asserts/verifier

Aleksey Shipilev shade at openjdk.org
Wed Aug 21 16:13:11 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`

This pull request has now been integrated.

Changeset: e297e881
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e297e8817f486e4af850c97fcff859c3e9a9e21c
Stats:     2 lines in 2 files changed: 0 ins; 0 del; 2 mod

8338688: Shenandoah: Avoid calling java_lang_Class accessors in asserts/verifier

Reviewed-by: rkennke, wkemper

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

PR: https://git.openjdk.org/jdk/pull/20651


More information about the hotspot-gc-dev mailing list