RFR: 8370732: Use WhiteBox.getWhiteBox().fullGC() to provoking gc for nsk/jvmti tests [v9]

SendaoYan syan at openjdk.org
Fri Oct 31 03:04:48 UTC 2025


> Hi all,
> 
> This PR use `WhiteBox.getWhiteBox().fullGC()` instead of 'ClassUnloader.eatMemory()' to provoking gc for several test/hotspot/jtreg/vmTestbase/nsk/jvmti tests, It is the fast and robust way to trigger Full GC without risks hitting OOME, and will make test run finish more quicker on machine with huge physical memory.
> 
> Change has been verified locally, test-fix only, no risk.
> 
> 
> grep VmRSS /proc/`ps -ef | grep -w java | grep vmsqe.aod.AppId | awk '{print $2}'`/status

SendaoYan has updated the pull request incrementally with one additional commit since the last revision:

  Add log.display("Provoking GC");

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28011/files
  - new: https://git.openjdk.org/jdk/pull/28011/files/4f7c2adb..0b4d40b8

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28011&range=08
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28011&range=07-08

  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/28011.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28011/head:pull/28011

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


More information about the hotspot-gc-dev mailing list