On Mon, 27 Nov 2023 02:17:27 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/serviceability/jvmti/GetOwnedMonitorInfo/GetOwnedMonitorInfoTest.java
> line 78:
>
>> 76: final GetOwnedMonitorInfoTest lock = new
>> GetOwnedMonitorInfoTest();
>> 77:
>> 78: Thread t1 = threadFactory.newThread(() -> {
>
> Pre-existing nit: by default virtual threads have no name, so the output in
> the virtual thread case looks a little odd. Can you add:
>
> Thread.currentThread().setName("Worker-Thread");
>
> please.
Sure.
> test/hotspot/jtreg/serviceability/jvmti/GetOwnedMonitorInfo/libGetOwnedMonitorInfoTest.c
> line 270:
>
>> 268: Java_GetOwnedMonitorInfoTest_jniMonitorEnter(JNIEnv* env, jclass cls,
>> jobject obj) {
>> 269: if ((*env)->MonitorEnter(env, obj) != 0) {
>> 270: fprintf(stderr, "MonitorEnter failed");
>
> Should this be a fatal error?
I added a call to exit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16783#discussion_r1405909361
PR Review Comment: https://git.openjdk.org/jdk/pull/16783#discussion_r1405906191