From 8bc04a0b289f3e3cf6bf29ffb06d6fbe89a1cd25 Mon Sep 17 00:00:00 2001 From: Nils Loodin Date: Fri, 21 Sep 2012 10:56:28 +0200 Subject: [PATCH] 7200092: Make NMT a bit friendlier to work with Reviewed-by: kvn, ysr, azeemj --- hotspot/src/share/vm/services/memTracker.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/services/memTracker.cpp b/hotspot/src/share/vm/services/memTracker.cpp index 91c324dfcc6..2af6e10d627 100644 --- a/hotspot/src/share/vm/services/memTracker.cpp +++ b/hotspot/src/share/vm/services/memTracker.cpp @@ -71,8 +71,13 @@ void MemTracker::init_tracking_options(const char* option_line) { _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); } }