JDK-8262881 : port JVM/DI tests from JDK-4413752 to JVM/TI
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2021-03-02
  • Updated: 2021-04-15
  • Resolved: 2021-04-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b18Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Port the JVM/DI tests from the following bug fix to JVM/TI:

    JDK-4413752 Linux: suspended thread blocks raw ObjectMonitor entry

Here are the test source file names:

$ ls -l *.c *.java
-r--r--r--  1 dcubed  green  11808 Feb 12  2001 di4413752.c
-r--r--r--  1 dcubed  green  10212 Feb 16  2001 di4413752.java
-r--r--r--  1 dcubed  green   9788 Mar 23  2001 dijava4413752.c
-r--r--r--  1 dcubed  green  10285 Mar 23  2001 dijava4413752.java
-r--r--r--  1 dcubed  green  11045 Feb 14  2001 diobj4413752.c
-r--r--r--  1 dcubed  green  10459 Feb 16  2001 diobj4413752.java
-r--r--r--  1 dcubed  green  10612 Feb 16  2001 diwait4413752.c
-r--r--r--  1 dcubed  green   8182 Feb 16  2001 diwait4413752.java
-r--r--r--  1 dcubed  green   4406 Feb 12  2001 pi4413752.c
-rw-r--r--  1 dcubed  green   9809 Aug 25  2005 pi4413752.java
-r--r--r--  1 dcubed  green   3678 Feb 13  2001 piobj4413752.c
-rw-r--r--  1 dcubed  green   9823 Aug 25  2005 piobj4413752.java
-r--r--r--  1 dcubed  green   3296 Feb 16  2001 piwait4413752.c
-rw-r--r--  1 dcubed  green   8123 Aug 25  2005 piwait4413752.java

There were two different APIs families that needed testing back then: JVM/DI and JVM/PI.

Within both API families, we needed to test a couple of different API combinations:

- RawMonitorEnter() with SuspendThread()
  - di4413752.java and di4413752.c
  - pi4413752.java and piwait4413752.c

- ObjectMonitor enter() with SuspendThread()
  - diobj4413752.java and diobj4413752.c
  - piobj4413752.java and piobj4413752.c

- ObjectMonitor wait() with SuspendThread
  - diwait4413752.java and diwait4413752.c
  - piwait4413752.java and piwait4413752.c

- ObjectMonitor enter() with java.lang.Thread.suspend()
  - dijava4413752.java and dijava4413752.c
  - looks like I didn't write JVM/Pi versions of this test

JVM/DI and JVM/PI were replaced by JVM/TI so only these API combinations
need porting:

- 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

ObjectMonitor enter() with java.lang.Thread.suspend() doesn't need porting because
that API is deprecated.
Comments
Changeset: 1ca4abe9 Author: Daniel D. Daugherty <dcubed@openjdk.org> Date: 2021-04-09 15:01:36 +0000 URL: https://git.openjdk.java.net/jdk/commit/1ca4abe9
09-04-2021

Ran the three new tests on my MBP13 for six hours: $ grep ^Execute doit_SuspendWith*.log doit_SuspendWithObjectMonitorEnter_fastdebug.log:Executed 45161507 loops in 21600 seconds. doit_SuspendWithObjectMonitorEnter_release.log:Executed 64492834 loops in 21600 seconds. doit_SuspendWithObjectMonitorEnter_slowdebug.log:Executed 23518825 loops in 21600 seconds. doit_SuspendWithObjectMonitorWait_fastdebug.log:Executed 60453754 loops in 21600 seconds. doit_SuspendWithObjectMonitorWait_release.log:Executed 89779716 loops in 21600 seconds. doit_SuspendWithObjectMonitorWait_slowdebug.log:Executed 31433660 loops in 21600 seconds. doit_SuspendWithRawMonitorEnter_fastdebug.log:Executed 43645661 loops in 21600 seconds. doit_SuspendWithRawMonitorEnter_release.log:Executed 60410503 loops in 21600 seconds. doit_SuspendWithRawMonitorEnter_slowdebug.log:Executed 23343897 loops in 21600 seconds. Each test was run on all three configs in parallel (fastdebug, release, slowdebug) and there are three tests so nine sets of results. Ran the three new tests on my Linux-X64 T7600 for six hours: $ grep ^Execute doit_SuspendWith*.log doit_SuspendWithObjectMonitorEnter_fastdebug.log:Executed 30832702 loops in 21600 seconds. doit_SuspendWithObjectMonitorEnter_release.log:Executed 40884596 loops in 21600 seconds. doit_SuspendWithObjectMonitorEnter_slowdebug.log:Executed 15659421 loops in 21600 seconds. doit_SuspendWithObjectMonitorWait_fastdebug.log:Executed 62173675 loops in 21600 seconds. doit_SuspendWithObjectMonitorWait_release.log:Executed 83507875 loops in 21600 seconds. doit_SuspendWithObjectMonitorWait_slowdebug.log:Executed 30832833 loops in 21600 seconds. doit_SuspendWithRawMonitorEnter_fastdebug.log:Executed 43646521 loops in 21600 seconds. doit_SuspendWithRawMonitorEnter_release.log:Executed 56357199 loops in 21600 seconds. doit_SuspendWithRawMonitorEnter_slowdebug.log:Executed 22478115 loops in 21600 seconds.
09-03-2021

Ran the three new tests on my MBP13 for an hour: $ grep ^Execute doit_SuspendWith*.log doit_SuspendWithObjectMonitorEnter_fastdebug.log:Executed 8292710 loops in 3600 seconds. doit_SuspendWithObjectMonitorEnter_release.log:Executed 11509172 loops in 3600 seconds. doit_SuspendWithObjectMonitorEnter_slowdebug.log:Executed 4374294 loops in 3600 seconds. doit_SuspendWithObjectMonitorWait_fastdebug.log:Executed 12972496 loops in 3600 seconds. doit_SuspendWithObjectMonitorWait_release.log:Executed 17504928 loops in 3600 seconds. doit_SuspendWithObjectMonitorWait_slowdebug.log:Executed 6996608 loops in 3600 seconds. doit_SuspendWithRawMonitorEnter_fastdebug.log:Executed 8258477 loops in 3600 seconds. doit_SuspendWithRawMonitorEnter_release.log:Executed 11211985 loops in 3600 seconds. doit_SuspendWithRawMonitorEnter_slowdebug.log:Executed 4426655 loops in 3600 seconds. Each test was run on all three configs in parallel (fastdebug, release, slowdebug) and there are three tests so nine sets of results.
05-03-2021