8055814: [TESTBUG] runtime/NMT/NMTWithCDS.java fails with product builds due to missing UnlockDiagnosticVMOptions
authorctornqvi
Fri, 22 Aug 2014 09:30:57 -0700
changeset 26297 5f5878285770
parent 26296 fd6180a0e0ab
child 26298 297ca021b2ee
8055814: [TESTBUG] runtime/NMT/NMTWithCDS.java fails with product builds due to missing UnlockDiagnosticVMOptions Summary: Passing -XX:+UnlockDiagnosticVMOptions to ProcessBuilder Reviewed-by: zgu, gtriantafill
hotspot/test/runtime/NMT/NMTWithCDS.java
--- a/hotspot/test/runtime/NMT/NMTWithCDS.java	Fri Aug 22 08:13:38 2014 +0200
+++ b/hotspot/test/runtime/NMT/NMTWithCDS.java	Fri Aug 22 09:30:57 2014 -0700
@@ -34,14 +34,15 @@
 
   public static void main(String[] args) throws Exception {
     ProcessBuilder pb;
-    pb = ProcessTools.createJavaProcessBuilder("-XX:SharedArchiveFile=./sample.jsa", "-Xshare:dump");
+    pb = ProcessTools.createJavaProcessBuilder(
+        "-XX:+UnlockDiagnosticVMOptions", "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:dump");
     OutputAnalyzer output = new OutputAnalyzer(pb.start());
     try {
       output.shouldContain("Loading classes to share");
       output.shouldHaveExitValue(0);
 
       pb = ProcessTools.createJavaProcessBuilder(
-        "-XX:NativeMemoryTracking=detail", "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:on", "-version");
+        "-XX:+UnlockDiagnosticVMOptions", "-XX:NativeMemoryTracking=detail", "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:on", "-version");
       output = new OutputAnalyzer(pb.start());
       output.shouldContain("sharing");
       output.shouldHaveExitValue(0);