test/runtime/NMT/PrintNMTStatistics.java

changeset 7075
ac12996df59b
parent 6272
e56d11f8cc21
child 7110
6640f982c1be
equal deleted inserted replaced
7074:833b0f92429a 7075:ac12996df59b
26 * @key nmt regression 26 * @key nmt regression
27 * @bug 8005936 27 * @bug 8005936
28 * @summary Make sure PrintNMTStatistics works on normal JVM exit 28 * @summary Make sure PrintNMTStatistics works on normal JVM exit
29 * @library /testlibrary /testlibrary/whitebox 29 * @library /testlibrary /testlibrary/whitebox
30 * @build PrintNMTStatistics 30 * @build PrintNMTStatistics
31 * @ignore
31 * @run main ClassFileInstaller sun.hotspot.WhiteBox 32 * @run main ClassFileInstaller sun.hotspot.WhiteBox
32 * @run main PrintNMTStatistics 33 * @run main PrintNMTStatistics
33 */ 34 */
34 35
35 import com.oracle.java.testlibrary.*; 36 import com.oracle.java.testlibrary.*;
43 public static void main(String args[]) throws Exception { 44 public static void main(String args[]) throws Exception {
44 45
45 // We start a new java process running with an argument and use WB API to ensure 46 // We start a new java process running with an argument and use WB API to ensure
46 // we have data for NMT on VM exit 47 // we have data for NMT on VM exit
47 if (args.length > 0) { 48 if (args.length > 0) {
48 // Use WB API to ensure that all data has been merged before we continue
49 if (!WhiteBox.getWhiteBox().NMTWaitForDataMerge()) {
50 throw new Exception("Call to WB API NMTWaitForDataMerge() failed");
51 }
52 return; 49 return;
53 } 50 }
54 51
55 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( 52 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
56 "-XX:+UnlockDiagnosticVMOptions", 53 "-XX:+UnlockDiagnosticVMOptions",

mercurial