RFR: 8280553: resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.java can fail if GC occurs

Chris Plummer cjplummer at openjdk.java.net
Fri Jan 28 04:14:36 UTC 2022


This test is failing in the loom repo when using -Xcomp. The reason is because loom introduced doing a full GC in the codecache sweeper, which causes the large array that the test allocates to be GC'd before the heap dump is done. The fix is to make the large array static rather than a local variable.

I'm choosing to fix this in the jdk repo rather than the loom repo since it is a latent bug that theoretically could occur even without the loom changes, and also to help reduce the amount of changes to be reviewed when loom is integrated into jdk.

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

Commit messages:
 - Make hugeArray static so it is not collected.

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

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


More information about the serviceability-dev mailing list