RFR: 8269466: Factor out the common code for initializing and starting internal VM JavaThreads [v2]
Coleen Phillimore
coleenp at openjdk.java.net
Wed Jun 30 18:56:07 UTC 2021
On Wed, 30 Jun 2021 18:44:33 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fixed copyright years in hpp files
>
> src/hotspot/share/runtime/thread.cpp line 3935:
>
>> 3933: // in that case. However, since this must work and we do not allow
>> 3934: // exceptions anyway, check and abort if this fails.
>> 3935: if (thread == nullptr || thread->osthread() == nullptr) {
>
> thread shouldn't be NULL here if you haven't used a nothrow version of new to allocate the thread.
Since you're no longer holding the JavaThreads_lock here, it seems like you could do this from the JavaThread constructor instead of adding this function. Except for the case for the JFR thread and JVMTI. So maybe you need this. Maybe fix the comment at the end of JavaThread constructor that says you're holding a lock and are going to throw OOM and those details.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4629
More information about the serviceability-dev
mailing list