RFR: 8256806: Shenandoah: optimize shenandoah/jni/TestPinnedGarbage.java test

Aleksey Shipilev shade at openjdk.java.net
Fri Nov 20 19:21:10 UTC 2020


This test is way too slow for Zero configuration, taking about 2 hours. No reasonable timeout factor accounts for this. We can clean the test up and make it more lenient. It would also improve server testing time.

Current proposal cuts down the test heap 4x, and thus the number of objects it needs to handle 4x as well. Additionally, moving `Random` initialization out of tested method marginally improves the times. I also went back to remember why this test even exists, and it has to do with [Full GC handling pinned objects specially](http://hg.openjdk.java.net/shenandoah/jdk8/hotspot/rev/bc0f0cfed315). I injected the bug back, and the test still caught it.

Additional testing:
 - [x] Linux x86_64 Zero fastdebug, affected test
 - [x] Linux x86_64 Server fastdebug, affected test
 - [x] Linux x86_32 Server fastdebug, affected test

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

Commit messages:
 - 8256806: Shenandoah: optimize shenandoah/jni/TestPinnedGarbage.java test

Changes: https://git.openjdk.java.net/jdk/pull/1358/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1358&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256806
  Stats: 10 lines in 1 file changed: 1 ins; 1 del; 8 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1358.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1358/head:pull/1358

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



More information about the hotspot-gc-dev mailing list