[jdk19] RFR: 8291524: jdk/jfr/event/runtime/TestClassLoaderStatsEvent.java Value not equal to 2, field='hiddenClassCount', value='0'

Erik Gahlin egahlin at openjdk.org
Mon Aug 1 16:17:30 UTC 2022


Could I have a review of change that fixes an intermittently test failure. The classes are garbage collected before they are being recorded by JFR. The fix is to add a hard reference to them. I also added a call to System.gc() to ensure the test is not sensitive to garbage collections.

Testing: test/jdk/jdk/jfr/  and test/jdk/jfr/event/runtime/TestClassLoaderStatsEvent.java

Thanks
Erik

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

Commit messages:
 - Initial

Changes: https://git.openjdk.org/jdk19/pull/158/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk19&pr=158&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8291524
  Stats: 10 lines in 2 files changed: 4 ins; 0 del; 6 mod
  Patch: https://git.openjdk.org/jdk19/pull/158.diff
  Fetch: git fetch https://git.openjdk.org/jdk19 pull/158/head:pull/158

PR: https://git.openjdk.org/jdk19/pull/158


More information about the hotspot-jfr-dev mailing list