RFR: 8315576: compiler/codecache/CodeCacheFullCountTest.java fails after JDK-8314837

Yi-Fan Tsai duke at openjdk.org
Wed Sep 6 22:01:59 UTC 2023


CodeCacheFullCountTest disables code cache flushing, loads classes, makes the code cache running out of space (the remaining is insufficient for another nmethod), and disables compilers.
The test expects two scenarios: 1) the process continues and terminates normally or 2) the adapters cannot be allocated in `refClass` and VirtualMachineError has been thrown and printed.

When the test runs with option `-Xcomp`, `-esa`, and `-XX:-TieredCompilation`, more codes are compiled and the code cache becomes full early. The adapters may not be allocated in `loadClass`, and VirtualMachineError has been thrown but wrapped in LambdaConversionException (`InnerClassLambdaMetafactory.buildCallSite`) and BootstrapMethodError (`BootstrapMethodInvoker.invoke`).
VirtualMachineError may not be completely printed by `printStackTrace` in `ThreadGroup.uncaughtException` before the process terminated. This breaks the expected scenario 2.

The check of scenario 2 is removed from the test as it's not reliable.

The test has passed as below.

make test \
    TEST="test/hotspot/jtreg/compiler/codecache/CodeCacheFullCountTest.java" \
    JTREG="JAVA_OPTIONS=-Xcomp -ea -esa -XX:-TieredCompilation"

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

Commit messages:
 - 8315576: compiler/codecache/CodeCacheFullCountTest.java fails after JDK-8314837

Changes: https://git.openjdk.org/jdk/pull/15604/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15604&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8315576
  Stats: 5 lines in 1 file changed: 0 ins; 5 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/15604.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15604/head:pull/15604

PR: https://git.openjdk.org/jdk/pull/15604


More information about the hotspot-compiler-dev mailing list