RFR: 8262881: port JVM/DI tests from JDK-4413752 to JVM/TI

Daniel D.Daugherty dcubed at openjdk.java.net
Fri Mar 19 20:19:45 UTC 2021


On Wed, 17 Mar 2021 07:18:07 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> 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

@sspitsyn - Thanks for the review! I figured you would enjoy this 20 year old
blast from the past! I'm tempted to ping @karenkinnear just to see if she'll
remember these tests!

I'll fix the indents in the .cpp files. Right now I'm using these tests to shake
out @robehn's work on "JDK-8257831 Suspend with handshakes".

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

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


More information about the hotspot-runtime-dev mailing list