On Tue, 9 Mar 2021 21:08:54 GMT, Daniel D. Daugherty <[email protected]> wrote:

> Add three tests from JDK-4413752 ported to JVM/TI:
> 
> - RawMonitorEnter() with SuspendThread()
>   - 
> test/hotspot/jtreg/serviceability/jvmti/SuspendWithRawMonitorEnter/SuspendWithRawMonitorEnter.java
>   - 
> test/hotspot/jtreg/serviceability/jvmti/SuspendWithRawMonitorEnter/libSuspendWithRawMonitorEnter.cpp
> 
> - ObjectMonitor enter() with SuspendThread()
>   - 
> test/hotspot/jtreg/serviceability/jvmti/SuspendWithObjectMonitorEnter/SuspendWithObjectMonitorEnter.java
>   - 
> test/hotspot/jtreg/serviceability/jvmti/SuspendWithObjectMonitorEnter/libSuspendWithObjectMonitorEnter.cpp
> 
> - ObjectMonitor wait() with SuspendThread
>   - 
> test/hotspot/jtreg/serviceability/jvmti/SuspendWithObjectMonitorWait/SuspendWithObjectMonitorWait.java
>   - 
> test/hotspot/jtreg/serviceability/jvmti/SuspendWithObjectMonitorWait/libSuspendWithObjectMonitorWait.cpp
> 
> The Java files have a transaction diagram to show what each of the
> threads in the test is doing.

Hi Dan,
It is interesting how much these tests were changed when ported.
A couple of indent-related comments.
There are incorrect indents in the following lines in all .cpp files:
 ```
68 Java_SuspendWithObjectMonitorEnter_GetResult(JNIEnv *env, jclass cls) {
 69     return iGlobalStatus;
 70 }
  72 JNIEXPORT void JNICALL
 73 Java_SuspendWithObjectMonitorEnter_SetPrintDebug(JNIEnv *env, jclass cls) {
 74     printdebug = 1;
 75 }
 97 Java_SuspendWithObjectMonitorEnterWorker_GetPrintDebug(JNIEnv *env, jclass 
cls) {
 98     return printdebug;
 99 }

Thanks,
Serguei

-------------

PR: https://git.openjdk.java.net/jdk/pull/2899

Reply via email to