[13] RFR (XS): 8225141: Better handling of classes in error state in fast class initialization checks
dean.long at oracle.com
dean.long at oracle.com
Fri May 31 23:14:43 UTC 2019
Looks good.
dl
On 5/31/19 1:53 PM, Vladimir Ivanov wrote:
> http://cr.openjdk.java.net/~vlivanov/8225141/webrev.00/
> https://bugs.openjdk.java.net/browse/JDK-8225141
>
> Fast class initialization checks don't properly handle classes in
> error state when performed from (previously) initializing thread.
>
> One way to fix it is to add one more fast path check
> (InstanceKlass::_init_state == being_initialized) into the barrier,
> but that would require significant changes, since both newly
> introduced checks (JDK-8223213 [1]) and existing C1 checks should be
> changed.
>
> What I propose is to set InstanceKlass::_init_thread only for the
> duration when the klass is in being_initialized state and reset it
> back to NULL when changing class state. It makes existing
> "_init_thread == current_thread" check equivalent to "_init_state ==
> being_initialized && _init_thread == current_thread".
>
> Testing: hs-precheckin-comp, tier1-4
>
> Best regards,
> Vladimir Ivanov
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8223213
More information about the hotspot-compiler-dev
mailing list