RFR: 8288064: Class initialization locking [v2]

Coleen Phillimore coleenp at openjdk.java.net
Wed Jun 15 13:44:57 UTC 2022


On Wed, 15 Jun 2022 06:27:33 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review comments from David Holmes.
>
> src/hotspot/share/oops/instanceKlass.hpp line 547:
> 
>> 545:   bool is_in_error_state() const           { return init_state() == initialization_error; }
>> 546:   bool is_reentrant_initialization(Thread *thread) { return thread == _init_thread; }
>> 547:   bool is_reentrant_linking(Thread *thread)        { return thread == _init_thread; }
> 
> Sorry Coleen when I asked for this I thought these queries included the state check, but now I see the state is checked separately. You may as well just have a single simple query `is_init_thread(JavaThread* current)`.
> And wherever we set the `_init_thread` we should have an assert that it is NULL (if not already done). Thanks.

Ok, your suggested name change is good and I added the assert we talked about. JCK vm tests pass but I'm rerunning tier1-4 on this change.

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

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


More information about the serviceability-dev mailing list