< prev index next >

test/hotspot/jtreg/runtime/cds/SharedBaseAddress.java

Print this page

        

*** 34,43 **** --- 34,45 ---- * jdk.jartool/sun.tools.jar * @compile test-classes/Hello.java * @run main/timeout=240 SharedBaseAddress */ + import jdk.test.lib.cds.CDSTestUtils; + import jdk.test.lib.cds.CDSOptions; import jdk.test.lib.process.OutputAnalyzer; public class SharedBaseAddress { // shared base address test table
*** 48,57 **** --- 50,72 ---- }; public static void main(String[] args) throws Exception { String appJar = JarBuilder.getOrCreateHelloJar(); + // First check CDS for default mode + for (String testEntry : testTable) { + String filename = "SharedBaseAddress" + testEntry + ".jsa"; + System.out.println("sharedBaseAddress = " + testEntry); + CDSOptions opts = (new CDSOptions()) + .setArchiveName(filename) + .addPrefix("-XX:SharedBaseAddress=" + testEntry); + + CDSTestUtils.createArchiveAndCheck(opts); + CDSTestUtils.runWithArchiveAndCheck(opts); + } + + // Next check CDS in AppCDS mode for (String testEntry : testTable) { System.out.println("sharedBaseAddress = " + testEntry); OutputAnalyzer dumpOutput = TestCommon.dump( appJar, new String[] {"Hello"}, "-XX:SharedBaseAddress=" + testEntry);
< prev index next >