8220707: [TESTBUG] serviceability/sa/TestHeapDumpForLargeArray.java fails with jtreg -vmoption:-Xmx < 8g

Reviewed-by: clanger, sballal, jcbeyler
This commit is contained in:
Nick Gasson 2019-03-29 09:31:44 +00:00
parent 0569496b69
commit 0eadf53694

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -96,10 +96,13 @@ public class TestHeapDumpForLargeArray {
}
try {
// Need to add the default arguments first to have explicit
// -Xmx8g last, otherwise test will fail if default
// arguments contain a smaller -Xmx.
List<String> vmArgs = new ArrayList<String>();
vmArgs.addAll(Utils.getVmOptions());
vmArgs.add("-XX:+UsePerfData");
vmArgs.add("-Xmx8g");
vmArgs.addAll(Utils.getVmOptions());
theApp = new LingeredAppWithLargeArray();
LingeredApp.startApp(vmArgs, theApp);