< prev index next >

test/hotspot/jtreg/gc/g1/TestSharedArchiveWithPreTouch.java

Print this page
*** 55,27 ***
          List<String> dump_args = new ArrayList<String>(BaseOptions);
  
          if (Platform.is64bit()) {
            dump_args.addAll(0, Arrays.asList(new String[] { "-XX:+UseCompressedClassPointers", "-XX:+UseCompressedOops" }));
          }
!         dump_args.addAll(Arrays.asList(new String[] { "-Xshare:dump", "-Xlog:cds" }));
  
          pb = ProcessTools.createJavaProcessBuilder(dump_args);
          OutputAnalyzer output = new OutputAnalyzer(pb.start());
          try {
              output.shouldContain("Loading classes to share");
              output.shouldHaveExitValue(0);
  
              List<String> load_args = new ArrayList<String>(BaseOptions);
  
              if (Platform.is64bit()) {
                  load_args.addAll(0, Arrays.asList(new String[] { "-XX:+UseCompressedClassPointers", "-XX:+UseCompressedOops" }));
              }
!             load_args.addAll(Arrays.asList(new String[] { "-Xshare:on", "-version" }));
  
              pb = ProcessTools.createJavaProcessBuilder(load_args.toArray(new String[0]));
              output = new OutputAnalyzer(pb.start());
              output.shouldContain("sharing");
              output.shouldHaveExitValue(0);
          } catch (RuntimeException e) {
              // Report 'passed' if CDS was turned off.
              output.shouldContain("Unable to use shared archive");
--- 55,29 ---
          List<String> dump_args = new ArrayList<String>(BaseOptions);
  
          if (Platform.is64bit()) {
            dump_args.addAll(0, Arrays.asList(new String[] { "-XX:+UseCompressedClassPointers", "-XX:+UseCompressedOops" }));
          }
!         dump_args.addAll(Arrays.asList(new String[] { "-Xshare:dump", "-Xlog:cds*", "-Xlog:metaspace*" }));
  
          pb = ProcessTools.createJavaProcessBuilder(dump_args);
          OutputAnalyzer output = new OutputAnalyzer(pb.start());
+         output.reportDiagnosticSummary();
          try {
              output.shouldContain("Loading classes to share");
              output.shouldHaveExitValue(0);
  
              List<String> load_args = new ArrayList<String>(BaseOptions);
  
              if (Platform.is64bit()) {
                  load_args.addAll(0, Arrays.asList(new String[] { "-XX:+UseCompressedClassPointers", "-XX:+UseCompressedOops" }));
              }
!             load_args.addAll(Arrays.asList(new String[] { "-Xshare:on", "-Xlog:cds*", "-Xlog:metaspace*", "-version" }));
  
              pb = ProcessTools.createJavaProcessBuilder(load_args.toArray(new String[0]));
              output = new OutputAnalyzer(pb.start());
+             output.reportDiagnosticSummary();
              output.shouldContain("sharing");
              output.shouldHaveExitValue(0);
          } catch (RuntimeException e) {
              // Report 'passed' if CDS was turned off.
              output.shouldContain("Unable to use shared archive");
< prev index next >