Integrated: 8357504: Refactor the assignment of loader bits in InstanceKlassFlags
Ioi Lam
iklam at openjdk.org
Thu May 22 04:07:56 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()`.
This pull request has now been integrated.
Changeset: 3bebb1fa
Author: Ioi Lam <iklam at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/3bebb1fa76da863a24645e3057e0f8d500ef2a41
Stats: 139 lines in 25 files changed: 1 ins; 63 del; 75 mod
8357504: Refactor the assignment of loader bits in InstanceKlassFlags
Reviewed-by: matsaave, ccheung
-------------
PR: https://git.openjdk.org/jdk/pull/25365
More information about the hotspot-dev
mailing list