hotspot/test/runtime/NMT/VirtualAllocTestType.java
changeset 29574 ab0121071f54
parent 28190 5a6b07edeb21
child 29678 dd2f3932c21e
--- a/hotspot/test/runtime/NMT/VirtualAllocTestType.java	Thu Mar 12 19:34:50 2015 -0400
+++ b/hotspot/test/runtime/NMT/VirtualAllocTestType.java	Tue Mar 10 19:56:19 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,30 +47,19 @@
     String pid = Integer.toString(ProcessTools.getProcessId());
     ProcessBuilder pb = new ProcessBuilder();
 
-    boolean has_nmt_detail = wb.NMTIsDetailSupported();
-    if (has_nmt_detail) {
-      System.out.println("NMT detail support detected.");
-    } else {
-      System.out.println("NMT detail support not detected.");
-    }
-
     addr = wb.NMTReserveMemory(reserveSize);
     pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "detail"});
 
     output = new OutputAnalyzer(pb.start());
     output.shouldContain("Test (reserved=256KB, committed=0KB)");
-    if (has_nmt_detail) {
-      output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + reserveSize) + "\\] reserved 256KB for Test");
-    }
+    output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + reserveSize) + "\\] reserved 256KB for Test");
 
     wb.NMTCommitMemory(addr, commitSize);
 
 
     output = new OutputAnalyzer(pb.start());
     output.shouldContain("Test (reserved=256KB, committed=128KB)");
-    if (has_nmt_detail) {
-      output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + commitSize) + "\\] committed 128KB");
-    }
+    output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + commitSize) + "\\] committed 128KB");
 
     wb.NMTUncommitMemory(addr, commitSize);
 
@@ -85,4 +74,4 @@
     output.shouldNotContain("Test (reserved=");
     output.shouldNotMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + reserveSize) + "\\] reserved");
   }
-    }
+}