test/hotspot/jtreg/compiler/aot/fingerprint/CDSDumper.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File open Sdiff test/hotspot/jtreg/compiler/aot/fingerprint

test/hotspot/jtreg/compiler/aot/fingerprint/CDSDumper.java

Print this page




  41         // Prepare the classlist
  42         FileOutputStream fos = new FileOutputStream(classlist);
  43         PrintStream ps = new PrintStream(fos);
  44 
  45         for (int i=3; i<args.length; i++) {
  46             ps.println(args[i].replace('.', '/'));
  47         }
  48         ps.close();
  49         fos.close();
  50 
  51         // Dump the archive
  52         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
  53             "-XX:+IgnoreUnrecognizedVMOptions",
  54             "-XX:+UnlockCommercialFeatures",
  55             "-XX:+UseAppCDS",
  56             "-XX:+UnlockDiagnosticVMOptions",
  57             "-cp", classpath,
  58             "-XX:ExtraSharedClassListFile=" + classlist,
  59             "-XX:SharedArchiveFile=" + archive,
  60             "-Xshare:dump",

  61             "-Xlog:cds");
  62 
  63         OutputAnalyzer output = new OutputAnalyzer(pb.start());


  64         output.shouldContain("Loading classes to share");
  65         output.shouldHaveExitValue(0);
  66     }
  67 }


  41         // Prepare the classlist
  42         FileOutputStream fos = new FileOutputStream(classlist);
  43         PrintStream ps = new PrintStream(fos);
  44 
  45         for (int i=3; i<args.length; i++) {
  46             ps.println(args[i].replace('.', '/'));
  47         }
  48         ps.close();
  49         fos.close();
  50 
  51         // Dump the archive
  52         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
  53             "-XX:+IgnoreUnrecognizedVMOptions",
  54             "-XX:+UnlockCommercialFeatures",
  55             "-XX:+UseAppCDS",
  56             "-XX:+UnlockDiagnosticVMOptions",
  57             "-cp", classpath,
  58             "-XX:ExtraSharedClassListFile=" + classlist,
  59             "-XX:SharedArchiveFile=" + archive,
  60             "-Xshare:dump",
  61             "-Xlog:gc+heap+coops",
  62             "-Xlog:cds");
  63 
  64         OutputAnalyzer output = new OutputAnalyzer(pb.start());
  65         System.out.println("[stdout = " + output.getStdout() + "]");
  66         System.out.println("[stderr = " + output.getStderr() + "]");
  67         output.shouldContain("Loading classes to share");
  68         output.shouldHaveExitValue(0);
  69     }
  70 }
test/hotspot/jtreg/compiler/aot/fingerprint/CDSDumper.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File