RFR (S): 6516521: Doc: should document about the primordial thread attaching to the VM

David Holmes david.holmes at oracle.com
Thu Oct 11 11:48:49 UTC 2018


Hi Thomas,

Thanks for taking a look.

David

On 11/10/2018 6:09 PM, Thomas Stüfe wrote:
> Hi David,
> 
> On Thu, Oct 11, 2018 at 11:45 AM David Holmes <david.holmes at oracle.com> wrote:
>>
>> Although the JNI spec itself is not an open document I see no reason not
>> to get feedback on this simple update.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-6516521
>>
>> ---
>> Chapter 5: The Invocation API
>>
>> Creating the VM
>>
>> The JNI_CreateJavaVM() function loads and initializes a Java VM and
>> returns a pointer to the JNI interface pointer. The thread that called
>> JNI_CreateJavaVM() is considered to be the main thread.
>> ---
>>
>> Proposed additional text:
>>
>> *Note:* Depending on the operating system, the primordial process thread
>> may be subject to special handling that impacts its ability to function
>> properly as a normal Java thread (such as having a limited stack size
>> and being able to throw `StackOverflowError`). It is strongly
>> recommended that the primordial thread is not used to load the Java VM,
>> but that a new thread is created just for that purpose.
>>
> 
> I agree. Good wording. As mentioned before, on AIX we won't even come
> up on the primordial thread.
> 
> ..Thomas
> 
>> Thanks,
>> David


More information about the hotspot-runtime-dev mailing list