< prev index next >

test/hotspot/jtreg/gc/TestVerifySubSet.java

Print this page
rev 49171 : imported patch 8185034-metaspace-cleanup-1-rename-metaspaceaux


  52                                                  "-XX:+VerifyAfterGC",
  53                                                  "-Xlog:gc+verify=debug",
  54                                                  "-XX:VerifySubSet="+subset,
  55                                                  RunSystemGC.class.getName()});
  56         ProcessBuilder pb =
  57             ProcessTools.createJavaProcessBuilder(vmOpts.toArray(new String[vmOpts.size()]));
  58         OutputAnalyzer output = new OutputAnalyzer(pb.start());
  59 
  60         System.out.println("Output:\n" + output.getOutput());
  61         return output;
  62     }
  63 
  64     public static void main(String args[]) throws Exception {
  65 
  66         OutputAnalyzer output;
  67 
  68         output = runTest("heap, threads, codecache, metaspace");
  69         output.shouldContain("Heap");
  70         output.shouldContain("Threads");
  71         output.shouldContain("CodeCache");
  72         output.shouldContain("MetaspaceAux");
  73         output.shouldNotContain("SymbolTable");
  74         output.shouldNotContain("StringTable");
  75         output.shouldNotContain("SystemDictionary");
  76         output.shouldNotContain("CodeCache Oops");
  77         output.shouldHaveExitValue(0);
  78 
  79         output = runTest("hello, threads, codecache, metaspace");
  80         output.shouldContain("memory sub-system is unknown, please correct it");
  81         output.shouldNotContain("Threads");
  82         output.shouldNotContain("CodeCache");
  83         output.shouldNotContain("MetaspaceAux");
  84         output.shouldHaveExitValue(1);
  85     }
  86 }


  52                                                  "-XX:+VerifyAfterGC",
  53                                                  "-Xlog:gc+verify=debug",
  54                                                  "-XX:VerifySubSet="+subset,
  55                                                  RunSystemGC.class.getName()});
  56         ProcessBuilder pb =
  57             ProcessTools.createJavaProcessBuilder(vmOpts.toArray(new String[vmOpts.size()]));
  58         OutputAnalyzer output = new OutputAnalyzer(pb.start());
  59 
  60         System.out.println("Output:\n" + output.getOutput());
  61         return output;
  62     }
  63 
  64     public static void main(String args[]) throws Exception {
  65 
  66         OutputAnalyzer output;
  67 
  68         output = runTest("heap, threads, codecache, metaspace");
  69         output.shouldContain("Heap");
  70         output.shouldContain("Threads");
  71         output.shouldContain("CodeCache");
  72         output.shouldContain("MetaspaceUtils");
  73         output.shouldNotContain("SymbolTable");
  74         output.shouldNotContain("StringTable");
  75         output.shouldNotContain("SystemDictionary");
  76         output.shouldNotContain("CodeCache Oops");
  77         output.shouldHaveExitValue(0);
  78 
  79         output = runTest("hello, threads, codecache, metaspace");
  80         output.shouldContain("memory sub-system is unknown, please correct it");
  81         output.shouldNotContain("Threads");
  82         output.shouldNotContain("CodeCache");
  83         output.shouldNotContain("MetaspaceUtils");
  84         output.shouldHaveExitValue(1);
  85     }
  86 }
< prev index next >