RFR: 8366477: Refactor AOT-related flag bits in klass.hpp [v2]

Ashutosh Mehra asmehra at openjdk.org
Thu Sep 4 03:14:42 UTC 2025


On Sat, 30 Aug 2025 18:20:15 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> This PR is one (of many) steps in [JDK-8366473](https://bugs.openjdk.org/browse/JDK-8366473) (Refactor CDS source code with new AOT terminology):
>> 
>> 1. Rename from `Klass::_shared_class_flags` to `Klass::_aot_class_flags`
>> 2. Move `_has_aot_safe_initializer` and `_is_runtime_setup_required` from `InstanceKlassFlags` (has run out of bits) to here (we still have 7 extra bits left), to accommodate future `@AOTXXX` annotations.
>
> Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
> 
>  - Merge branch '8366475-rename-metaspace-shared-to-aot-metaspace' into 8366477-refactor-aot-related-flag-bits-in-klass-hpp
>  - 8366477: Refactor AOT-related flag bits in klass.hpp

src/hotspot/share/oops/klass.hpp line 184:

> 182:     _verified_at_dump_time                 = 1 << 3,
> 183:     _has_archived_enum_objs                = 1 << 4,
> 184:     _is_generated_shared_class             = 1 << 5, // This class was not loaded from a classfile in the module image

does it make sense to rename `_is_generated_shared_class` to `_is_generated_aot_class`?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27018#discussion_r2320699977


More information about the hotspot-dev mailing list