changeset 7208:4b8dc0e79adb

8067235: embedded/minvm/checknmt fails on compact1 and compact2 with minimal VM Reviewed-by: lfoltan, sspitsyn
author dholmes
date Wed, 08 Apr 2015 22:29:17 -0400
parents 10d10330688b
children bff23dedb306
files src/share/vm/runtime/arguments.cpp
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Fri Apr 03 10:12:57 2015 -0700
+++ b/src/share/vm/runtime/arguments.cpp	Wed Apr 08 22:29:17 2015 -0400
@@ -3837,8 +3837,8 @@
       CommandLineFlags::printFlags(tty, false);
       vm_exit(0);
     }
+    if (match_option(option, "-XX:NativeMemoryTracking", &tail)) {
 #if INCLUDE_NMT
-    if (match_option(option, "-XX:NativeMemoryTracking", &tail)) {
       // The launcher did not setup nmt environment variable properly.
       if (!MemTracker::check_launcher_nmt_support(tail)) {
         warning("Native Memory Tracking did not setup properly, using wrong launcher?");
@@ -3853,8 +3853,12 @@
       } else {
         vm_exit_during_initialization("Syntax error, expecting -XX:NativeMemoryTracking=[off|summary|detail]", NULL);
       }
+#else
+      jio_fprintf(defaultStream::error_stream(),
+        "Native Memory Tracking is not supported in this VM\n");
+      return JNI_ERR;
+#endif
     }
-#endif
 
 
 #ifndef PRODUCT