RFR: 8263461: jdk/jfr/event/gc/detailed/TestEvacuationFailedEvent.java uses wrong mechanism to cause evacuation failure
kbarrett at openjdk.java.net
Tue Jun 22 00:55:35 UTC 2021
On Mon, 21 Jun 2021 14:32:16 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
> can I have reviews for this change to the jdk/jfr/event/gc/detailed/TestEvacuationFailedEvent.java test to use the only "officially sanctioned" way to cause evacuation failures via the respective debug-level options.
> Testing: checking failing test case to cause evacuation failures
Changes requested by kbarrett (Reviewer).
test/jdk/jdk/jfr/event/gc/detailed/TestEvacuationFailedEvent.java line 72:
> 70: WhiteBox.getWhiteBox().youngGC();
> 71: // Keep alive data.
> 72: System.out.println(data);
`Reference.reachabilityFence` seems like a better choice for keep-alive. Other than that, looks good.
More information about the hotspot-gc-dev