test/compiler/codecache/CheckSegmentedCodeCache.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff test/compiler/codecache/CheckSegmentedCodeCache.java

test/compiler/codecache/CheckSegmentedCodeCache.java

Print this page

        

*** 30,48 **** * @library /testlibrary * @run main/othervm CheckSegmentedCodeCache */ public class CheckSegmentedCodeCache { // Code heap names ! private static final String NON_METHOD = "CodeHeap 'non-methods'"; private static final String PROFILED = "CodeHeap 'profiled nmethods'"; private static final String NON_PROFILED = "CodeHeap 'non-profiled nmethods'"; private static void verifySegmentedCodeCache(ProcessBuilder pb, boolean enabled) throws Exception { OutputAnalyzer out = new OutputAnalyzer(pb.start()); if (enabled) { try { ! // Non-method code heap should be always available with the segmented code cache out.shouldContain(NON_METHOD); } catch (RuntimeException e) { // TieredCompilation is disabled in a client VM out.shouldContain("TieredCompilation is disabled in this release."); } --- 30,48 ---- * @library /testlibrary * @run main/othervm CheckSegmentedCodeCache */ public class CheckSegmentedCodeCache { // Code heap names ! private static final String NON_METHOD = "CodeHeap 'non-nmethods'"; private static final String PROFILED = "CodeHeap 'profiled nmethods'"; private static final String NON_PROFILED = "CodeHeap 'non-profiled nmethods'"; private static void verifySegmentedCodeCache(ProcessBuilder pb, boolean enabled) throws Exception { OutputAnalyzer out = new OutputAnalyzer(pb.start()); if (enabled) { try { ! // Non-nmethod code heap should be always available with the segmented code cache out.shouldContain(NON_METHOD); } catch (RuntimeException e) { // TieredCompilation is disabled in a client VM out.shouldContain("TieredCompilation is disabled in this release."); }
*** 109,132 **** pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache", "-XX:TieredStopAtLevel=1", "-XX:+PrintCodeCache", "-version"); verifyCodeHeapNotExists(pb, PROFILED); ! // Fails with too small non-method code heap size ! pb = ProcessTools.createJavaProcessBuilder("-XX:NonMethodCodeHeapSize=100K"); ! failsWith(pb, "Invalid NonMethodCodeHeapSize"); // Fails if code heap sizes do not add up pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache", "-XX:ReservedCodeCacheSize=10M", ! "-XX:NonMethodCodeHeapSize=5M", "-XX:ProfiledCodeHeapSize=5M", "-XX:NonProfiledCodeHeapSize=5M"); failsWith(pb, "Invalid code heap sizes"); // Fails if not enough space for VM internal code pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache", "-XX:ReservedCodeCacheSize=1700K", "-XX:InitialCodeCacheSize=100K"); ! failsWith(pb, "Not enough space in non-method code heap to run VM"); } } --- 109,132 ---- pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache", "-XX:TieredStopAtLevel=1", "-XX:+PrintCodeCache", "-version"); verifyCodeHeapNotExists(pb, PROFILED); ! // Fails with too small non-nmethod code heap size ! pb = ProcessTools.createJavaProcessBuilder("-XX:NonNMethodCodeHeapSize=100K"); ! failsWith(pb, "Invalid NonNMethodCodeHeapSize"); // Fails if code heap sizes do not add up pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache", "-XX:ReservedCodeCacheSize=10M", ! "-XX:NonNMethodCodeHeapSize=5M", "-XX:ProfiledCodeHeapSize=5M", "-XX:NonProfiledCodeHeapSize=5M"); failsWith(pb, "Invalid code heap sizes"); // Fails if not enough space for VM internal code pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache", "-XX:ReservedCodeCacheSize=1700K", "-XX:InitialCodeCacheSize=100K"); ! failsWith(pb, "Not enough space in non-nmethod code heap to run VM"); } }
test/compiler/codecache/CheckSegmentedCodeCache.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File