RFR: 8264372: Threads::destroy_vm only ever returns true
David Holmes
david.holmes at oracle.com
Fri Apr 16 09:13:13 UTC 2021
On 16/04/2021 5:25 pm, Aleksey Shipilev wrote:
> On Fri, 16 Apr 2021 06:12:39 GMT, David Holmes <dholmes at openjdk.org> wrote:
>
>> Trivial cleanup to remove the bool return from Threads::destroy_vm as it only ever returned true.
>>
>> Testing: tiers 1-3
>>
>> Thanks,
>> David
>
> Looks good to me.
Thanks for looking at this Aleksey!
> src/hotspot/share/prims/jni.cpp line 3735:
>
>> 3733: ThreadStateTransition::transition_from_native(thread, _thread_in_vm);
>> 3734: Threads::destroy_vm();
>> 3735: // Should not change thread state, VM is gone
>
> It looks like this comment is there to match the removed `ThreadStateTransition::transition(thread, _thread_in_vm, _thread_in_native);`? In other words, it looks unnecessary.
Right - I will remove. I was reading it as "Don't bother changing state
any more, VM is gone".
David
> -------------
>
> Marked as reviewed by shade (Reviewer).
>
> PR: https://git.openjdk.java.net/jdk/pull/3535
>
More information about the hotspot-dev
mailing list