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

Serguei Spitsyn sspitsyn at openjdk.java.net
Wed Apr 7 17:56:09 UTC 2021


On Thu, 1 Apr 2021 19:46:38 GMT, Daniel D. Daugherty <dcubed 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.
>
> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address lyndseyBeil, robehn and sspitsyn CR comments.

Hi Dan,
It looks good in general.
But I think moving JVMTI error code checks to Java is a step in a wrong direction.
First, it makes it inconsistent with all existing JVMTI tests. In this particular case, all the complexity is moved to Java side making it unbalanced. Also, we are working with Leonid toward creating relevant native testing lib for serviceability/jvmti tests (created it for Loom first) which has a support to print symbolic names (for error codes as well) if necessary.
Not sure, I understood what wrong with the native check_jvmti_status(). It seems the id argument is not needed much and can be removed anyway.
Thanks,
Serguei

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

Marked as reviewed by sspitsyn (Reviewer).

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


More information about the hotspot-runtime-dev mailing list