RFR(S): 8191229: serviceability/jvmti/GetOwnedMonitorInfo/GetOwnedMonitorInfoTest.java fails with NoClassDefFoundError

Daniel D. Daugherty daniel.daugherty at oracle.com
Fri Dec 8 01:40:19 UTC 2017


I would not do the JVM/TI SetEventNotificationMode() call i JNI_OnLoad().

Dan


On 12/7/17 8:38 PM, Chris Plummer wrote:
> Hi Yasumasa,
>
> That would work, but let me see what David and Serguei think. I 
> believe normally we enable events in Agent_Initialize(), so don't want 
> to switch around something that's working if it's not what we really 
> want.
>
> thanks,
>
> Chris
>
> On 12/7/17 5:13 PM, Yasumasa Suenaga wrote:
>> Hi Chris,
>>
>> Thanks! I did not see that.
>>
>> IMHO, you can move SetEventNotificationMode() to JNI_OnLoad(). If so,
>> we ensure that CheckLockObject() is called after all initialization is
>> completed.
>> We can keep jvmtiEnv instance.
>>
>>
>> Yasumasa
>>
>>
>>
>> 2017-12-08 1:51 GMT+09:00 Chris Plummer <chris.plummer at oracle.com>:
>>> Hi Yasumasa,
>>>
>>> It is safe in my version because I move it to a global ref. See the
>>> NewGlobalRef() call in my webrev.
>>>
>>> thanks,
>>>
>>> Chris
>>>
>>>
>>> On 12/7/17 6:14 AM, Yasumasa Suenaga wrote:
>>>> Hi Chris,
>>>>
>>>> I added testcase of GetOwnedMonitorInfo in JDK-8185164.
>>>> I have concern your change to cache the result of FindClass().
>>>>
>>>> According to [1], FindClass() calls find_class_from_class_loader(), it
>>>> returns JNI local value.
>>>> Is it safe to cache?
>>>>
>>>> So I called FindClass each time in original commit.
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Yasumasa
>>>>
>>>>
>>>> [1]
>>>> http://hg.openjdk.java.net/jdk/hs/file/32fd4be602d5/src/hotspot/share/prims/jvm.cpp#l3450 
>>>>
>>>>
>>>>
>>>> On 2017/12/07 16:44, Chris Plummer wrote:
>>>>> New webrev:
>>>>>
>>>>> https://bugs.openjdk.java.net/browse/JDK-8191229
>>>>> http://cr.openjdk.java.net/~cjplummer/8191229/webrev.01/
>>>>>
>>>>> testClass now initialized from JNI_OnLoad(), and use memset to clear
>>>>> callbacks. Also updated to use JVMTI_VERSION_9 when calling GetEnv().
>>>>>
>>>>> thanks,
>>>>>
>>>>> Chris
>>>>>
>



More information about the serviceability-dev mailing list