changeset 4071:2c3dca6e1d65

7200092: Make NMT a bit friendlier to work with Reviewed-by: kvn, ysr, azeemj
author nloodin
date Fri, 21 Sep 2012 10:56:28 +0200
parents e5977d045076
children 1ba2ed1c07df
files src/share/vm/services/memTracker.cpp
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/services/memTracker.cpp	Wed Nov 21 20:07:52 2012 -0500
+++ b/src/share/vm/services/memTracker.cpp	Fri Sep 21 10:56:28 2012 +0200
@@ -71,8 +71,13 @@
   _tracking_level = NMT_off;
   if (strncmp(option_line, "=summary", 8) == 0) {
     _tracking_level = NMT_summary;
-  } else if (strncmp(option_line, "=detail", 8) == 0) {
+  } else if (strncmp(option_line, "=detail", 7) == 0) {
     _tracking_level = NMT_detail;
+  } else {
+    char msg[255];
+    //+1 to remove the '=' character
+    jio_snprintf(msg, 255, "Unknown option given to XX:NativeMemoryTracking: %s", option_line+1);
+    vm_exit_during_initialization(msg, NULL);
   }
 }