RFR: 8357504: Refactor the assignment of loader bits in InstanceKlassFlags
Ioi Lam
iklam at openjdk.org
Thu May 22 02:13:50 UTC 2025
On Wed, 21 May 2025 19:56:00 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> These bits are renamed to
>
>
> flag(defined_by_boot_loader , 1 << 7) /* defining class loader is boot class loader */ \
> flag(defined_by_platform_loader , 1 << 8) /* defining class loader is platform class loader */ \
> flag(defined_by_app_loader , 1 << 9) /* defining class loader is app class loader */ \
>
>
> They are not set exactly once inside `ClassFileParser::fill_instance_klass()`, to avoid race conditions
>
> Also, set these flags even when AOT/CDS is not used -- the cost is trivial. That way, we don't need to worry if a code path might be invalid when AOT/CDS is disabled.
>
> This RFE simplifies the bug fix in https://github.com/openjdk/jdk/pull/25171
>
> For reviewers
> - The first commit is strictly renaming. No functional changes
> - The second commit moves the bit setting to `ClassFileParser::fill_instance_klass()`.
The test failures in Github actions are the TestGCBasher issues (JDK-8357503) unrelated to this PR.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25365#issuecomment-2899699735
More information about the hotspot-dev
mailing list