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

Chris Plummer cjplummer at openjdk.java.net
Fri Jan 28 07:46:42 UTC 2022


On Fri, 28 Jan 2022 06:08:55 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use Reference.reachabilityFence() instead of static field.
>
> test/hotspot/jtreg/resourcehogs/serviceability/sa/LingeredAppWithLargeArray.java line 30:
> 
>> 28:     public static void main(String args[]) {
>> 29:         hugeArray = new int[Integer.MAX_VALUE/2];
>> 30:         LingeredApp.main(args);
> 
> Another option here is to use Reference.reachabilityFence(hugeArray). That makes it a bit more explicit/obvious that the test needs to keep hugeArray alive.

Done! Also changed #7257 to do the same.

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

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


More information about the serviceability-dev mailing list