RFR: 8057586: Explicit GC ignored if GCLocker is active [v2]

Albert Mingkun Yang ayang at openjdk.org
Tue Mar 28 15:57:04 UTC 2023


On Tue, 28 Mar 2023 08:46:13 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:

>> test/hotspot/jtreg/gc/TestJNICriticalStressTest.java line 208:
>> 
>>> 206:         println("Starting " + allocThreadNum + " allocating threads");
>>> 207:         for (int i = 0; i < allocThreadNum; i += 1) {
>>> 208:             new Thread(new AllocatingWorker()).start();
>> 
>> What's the point of having an alloc thread? I'd expect whiteboxapi to be enough to trigger gc cycles regardless of heap state.
>
> https://bugs.openjdk.org/browse/JDK-8057573
> 
> Reproducer taken from here. Added minor changes to fit JTREG.
> 
> The alloc thread test makes for more robust testing, but not required.

I don't get why having an alloc thread would improve/degrade the robustness of this test -- jni-call-thread and systemgc-thread should be enough.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13191#discussion_r1150833921


More information about the hotspot-gc-dev mailing list