On Mon, 27 Nov 2023 02:14:05 GMT, David Holmes <[email protected]> wrote:
>> Stefan Karlsson has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Split test and use othervm
>
> test/hotspot/jtreg/runtime/Monitor/libMonitorWithDeadObjectTest.c line 130:
>
>> 128: // test provokes that situation and that asserts.
>> 129: if ((*jvm)->DetachCurrentThread(jvm) != JNI_OK)
>> die("DetachCurrentThread");
>> 130: pthread_exit(NULL);
>
> You don't need to call `pthread_exit` - the thread's entry function can
> simply return.
This is more code copied from CompleteExit.c.
> test/hotspot/jtreg/serviceability/jvmti/GetOwnedMonitorInfo/GetOwnedMonitorInfoTest.java
> line 53:
>
>> 51: private static native boolean hasEventPosted();
>> 52:
>> 53: private static void jniMonitorEnterAndLetObjectDie() {
>
> I can see it is convenient to just inject this test case in an existing test,
> but I'm not sure it is necessarily the right thing to do. Serviceability folk
> may have a stronger opinion.
Yeah, I was thinking the same. Maybe @sspitsyn or @plummercj could give
guidance here?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16783#discussion_r1405897185
PR Review Comment: https://git.openjdk.org/jdk/pull/16783#discussion_r1405894786