1.1 --- a/src/share/vm/services/memTracker.cpp Wed Nov 21 21:26:12 2012 -0500 1.2 +++ b/src/share/vm/services/memTracker.cpp Wed Nov 28 09:19:38 2012 -0500 1.3 @@ -69,15 +69,12 @@ 1.4 1.5 void MemTracker::init_tracking_options(const char* option_line) { 1.6 _tracking_level = NMT_off; 1.7 - if (strncmp(option_line, "=summary", 8) == 0) { 1.8 + if (strcmp(option_line, "=summary") == 0) { 1.9 _tracking_level = NMT_summary; 1.10 - } else if (strncmp(option_line, "=detail", 7) == 0) { 1.11 + } else if (strcmp(option_line, "=detail") == 0) { 1.12 _tracking_level = NMT_detail; 1.13 - } else { 1.14 - char msg[255]; 1.15 - //+1 to remove the '=' character 1.16 - jio_snprintf(msg, 255, "Unknown option given to XX:NativeMemoryTracking: %s", option_line+1); 1.17 - vm_exit_during_initialization(msg, NULL); 1.18 + } else if (strcmp(option_line, "=off") != 0) { 1.19 + vm_exit_during_initialization("Syntax error, expecting -XX:NativeMemoryTracking=[off|summary|detail]", NULL); 1.20 } 1.21 } 1.22