RFR: 8329351: add runtime/Monitor/TestRecursiveLocking.java for recursive Java monitor stress testing

Daniel D. Daugherty dcubed at openjdk.org
Fri Apr 19 20:48:28 UTC 2024


On Thu, 11 Apr 2024 23:51:56 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> The first stress test to be added is:
>> 
>> runtime/Monitor/TestRecursiveLocking.java
>> 
>> It has been tested with a couple of 12 hour runs on my MBP13:
>>   - 3 build configs: release, fastdebug, slowdebug, 4 hours each, total 12 hours
>>   - 18 test configs, 800 seconds each, total 4 hours
>> 
>> The default configuration has been tested in Mach5 Tier2 and the
>> StressWrapper_TestRecursiveLocking_36M.java version has been
>> tested in Mach5 Tier3.
>
> test/hotspot/jtreg/runtime/Monitor/StressWrapper_TestRecursiveLocking_36M.java line 29:
> 
>> 27:  * @requires vm.flagless
>> 28:  * @summary Tests recursive locking in -Xint in outer then inner mode.
>> 29:  * @library /testlibrary /test/lib /runtime/Monitor
> 
> I don't think that '/runtime/Monitor' is required. Jtreg searches files in current directory by default.

I'll verify that `/runtime/Monitor` is not needed.

> test/hotspot/jtreg/runtime/Monitor/StressWrapper_TestRecursiveLocking_36M.java line 33:
> 
>> 31:  * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
>> 32:  *
>> 33:  * @run main/othervm/timeout=240 -Xbootclasspath/a:.
> 
> I would recommend to split this into 3 tests instead of run so jtreg might execute them in parallel and provide separate results.

These groupings are intentional. I have a total of 6 `@test` values in this test file:

 * @test id=Xint_outer_inner
 * @test id=Xint_alternate_AB
 * @test id=C1_outer_inner
 * @test id=C1_alternate_AB
 * @test id=C2_outer_inner
 * @test id=C2_alternate_AB
 ```
Each `@test` group includes all of one test-mode flavor for each compiler mode: Xint, C1, C2.

So this test file will already be executing up to 6 sub-tests in parallel for JOBS values
of 6 or higher depending on the resources of the test machine itself.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18664#discussion_r1572941012
PR Review Comment: https://git.openjdk.org/jdk/pull/18664#discussion_r1572939474


More information about the hotspot-runtime-dev mailing list