RFR(XS) 8065346 - WB_AddToBootstrapClassLoaderSearch calls JvmtiEnv::create_a_jvmti when not in _thread_in_vm state

Ioi Lam ioi.lam at oracle.com
Thu Nov 20 01:54:13 UTC 2014


Hi Yumin,

Thanks for the review. I have updated the webrev at

http://cr.openjdk.java.net/~iklam/8065346-jvmti-test-crash-v2/

Thanks
- Ioi

On 11/20/14, 1:28 AM, Yumin Qi wrote:
> Ioi,
>
>   In fact you can use
> *  const char* seg = java_lang_String::as_utf8_string(JNIHandles::resolve_non_null(segment));*
>   which does not need state transition since it is in native. (Coleen 
> pointed out in a codereview for my change to whitebox)
>   But need ResouceMark first.
>
> Thanks
> Yumin
>
> On 11/19/2014 6:08 AM, Ioi Lam wrote:
>> Hi,
>>
>> Please review a simple fix for whitebox test API:
>>
>> http://cr.openjdk.java.net/~iklam/8065346-jvmti-test-crash/
>> https://bugs.openjdk.java.net/browse/JDK-8065346
>>
>> Summary of fix:
>>
>>     The JVMTI calls expect the current thread to be in VM state, but 
>> JNI GetStringUTFChars
>>     expects the thread to be in Native state.
>>
>>     So I moved the ThreadToNativeFromVM constructors accordingly to 
>> make everyone happy.
>>
>> Tests:
>>
>>     I ran the tests with a debug hotspot build and the tests passed 
>> after the fix.
>>
>> Thanks
>> - Ioi
>



More information about the hotspot-runtime-dev mailing list