< prev index next >

test/hotspot/jtreg/serviceability/sa/TestHeapDumpForInvokeDynamic.java

Print this page




 106         SAOutput.shouldHaveExitValue(0);
 107         SAOutput.shouldContain("heap written to");
 108         SAOutput.shouldContain(heapDumpFileName);
 109         System.out.println(SAOutput.getOutput());
 110 
 111         verifyHeapDump(heapDumpFileName);
 112     }
 113 
 114     public static void main (String... args) throws Exception {
 115 
 116         String heapDumpFileName = "lambdaHeapDump.bin";
 117 
 118         File heapDumpFile = new File(heapDumpFileName);
 119         if (heapDumpFile.exists()) {
 120             heapDumpFile.delete();
 121         }
 122 
 123         try {
 124             List<String> vmArgs = new ArrayList<String>();
 125             vmArgs.add("-XX:+UsePerfData");

 126             vmArgs.addAll(Utils.getVmOptions());
 127 
 128             theApp = new LingeredAppWithInvokeDynamic();
 129             LingeredApp.startApp(vmArgs, theApp);
 130             attachDumpAndVerify(heapDumpFileName, theApp.getPid());
 131         } finally {
 132             LingeredApp.stopApp(theApp);
 133         }
 134     }
 135 }


 106         SAOutput.shouldHaveExitValue(0);
 107         SAOutput.shouldContain("heap written to");
 108         SAOutput.shouldContain(heapDumpFileName);
 109         System.out.println(SAOutput.getOutput());
 110 
 111         verifyHeapDump(heapDumpFileName);
 112     }
 113 
 114     public static void main (String... args) throws Exception {
 115 
 116         String heapDumpFileName = "lambdaHeapDump.bin";
 117 
 118         File heapDumpFile = new File(heapDumpFileName);
 119         if (heapDumpFile.exists()) {
 120             heapDumpFile.delete();
 121         }
 122 
 123         try {
 124             List<String> vmArgs = new ArrayList<String>();
 125             vmArgs.add("-XX:+UsePerfData");
 126             vmArgs.add("-Xmx512m");
 127             vmArgs.addAll(Utils.getVmOptions());
 128 
 129             theApp = new LingeredAppWithInvokeDynamic();
 130             LingeredApp.startApp(vmArgs, theApp);
 131             attachDumpAndVerify(heapDumpFileName, theApp.getPid());
 132         } finally {
 133             LingeredApp.stopApp(theApp);
 134         }
 135     }
 136 }
< prev index next >