9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /*
26 * @test
27 * @summary Test automatic relocation of archive heap regions dur to heap size changes.
28 * @requires vm.cds.archived.java.heap
29 * @requires (vm.gc=="null")
30 * @library /test/lib /test/hotspot/jtreg/runtime/appcds
31 * @modules jdk.jartool/sun.tools.jar
32 * @compile ../test-classes/Hello.java
33 * @build sun.hotspot.WhiteBox
34 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
35 * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. DifferentHeapSizes
36 */
37
38 import jdk.test.lib.process.OutputAnalyzer;
39 import sun.hotspot.WhiteBox;
40 import jdk.test.lib.cds.CDSTestUtils;
41
42 public class DifferentHeapSizes {
43 static final String DEDUP = "-XX:+UseStringDeduplication"; // This increases code coverage.
44
45 static class Scenario {
46 int dumpSize; // in MB
47 int runSizes[]; // in MB
48 Scenario(int ds, int... rs) {
49 dumpSize = ds;
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /*
26 * @test
27 * @summary Test automatic relocation of archive heap regions dur to heap size changes.
28 * @requires vm.cds.archived.java.heap
29 * @library /test/lib /test/hotspot/jtreg/runtime/appcds
30 * @modules jdk.jartool/sun.tools.jar
31 * @compile ../test-classes/Hello.java
32 * @build sun.hotspot.WhiteBox
33 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
34 * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. DifferentHeapSizes
35 */
36
37 import jdk.test.lib.process.OutputAnalyzer;
38 import sun.hotspot.WhiteBox;
39 import jdk.test.lib.cds.CDSTestUtils;
40
41 public class DifferentHeapSizes {
42 static final String DEDUP = "-XX:+UseStringDeduplication"; // This increases code coverage.
43
44 static class Scenario {
45 int dumpSize; // in MB
46 int runSizes[]; // in MB
47 Scenario(int ds, int... rs) {
48 dumpSize = ds;
|