test/hotspot/jtreg/runtime/appcds/ExtraSymbols.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Cdiff test/hotspot/jtreg/runtime/appcds/ExtraSymbols.java

test/hotspot/jtreg/runtime/appcds/ExtraSymbols.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2014, 2017, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2014, 2018, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 36,56 **** import java.io.*; import jdk.test.lib.process.OutputAnalyzer; public class ExtraSymbols { public static void main(String[] args) throws Exception { String appJar = JarBuilder.getOrCreateHelloJar(); // 1. Dump without extra symbols. ! OutputAnalyzer output = TestCommon.dump(appJar, TestCommon.list("Hello")); checkOutput(output); int numEntries1 = numOfEntries(output); // 2. Dump an archive with extra symbols. All symbols in // ExtraSymbols.symbols.txt are valid. Dumping should succeed. ! output = TestCommon.dump(appJar, TestCommon.list("Hello"), "-XX:SharedArchiveConfigFile=" + TestCommon.getSourceFile("ExtraSymbols.symbols.txt")); checkOutput(output); int numEntries2 = numOfEntries(output); if (numEntries2 <= numEntries1) { throw new RuntimeException("No extra symbols added to archive"); --- 36,58 ---- import java.io.*; import jdk.test.lib.process.OutputAnalyzer; public class ExtraSymbols { + static final String CDS_LOGGING = "-Xlog:cds,cds+hashtables"; public static void main(String[] args) throws Exception { String appJar = JarBuilder.getOrCreateHelloJar(); // 1. Dump without extra symbols. ! OutputAnalyzer output = TestCommon.dump(appJar, TestCommon.list("Hello"), ! CDS_LOGGING); checkOutput(output); int numEntries1 = numOfEntries(output); // 2. Dump an archive with extra symbols. All symbols in // ExtraSymbols.symbols.txt are valid. Dumping should succeed. ! output = TestCommon.dump(appJar, TestCommon.list("Hello"), CDS_LOGGING, "-XX:SharedArchiveConfigFile=" + TestCommon.getSourceFile("ExtraSymbols.symbols.txt")); checkOutput(output); int numEntries2 = numOfEntries(output); if (numEntries2 <= numEntries1) { throw new RuntimeException("No extra symbols added to archive");
test/hotspot/jtreg/runtime/appcds/ExtraSymbols.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File