changeset 7413:805aa223d540

Merge
author zgu
date Mon, 17 Dec 2012 10:40:52 -0800
parents 3f84e17b6bca (diff) 8580f22db905 (current diff)
children 594b9b2119ed 7d42f3b08300
files
diffstat 1 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/services/nmtDCmd.cpp	Fri Dec 14 16:43:37 2012 -0800
+++ b/src/share/vm/services/nmtDCmd.cpp	Mon Dec 17 10:40:52 2012 -0800
@@ -84,28 +84,31 @@
   }
 
   int nopt = 0;
-  if(_summary.is_set()) { ++nopt; }
-  if(_detail.is_set()) { ++nopt; }
-  if(_baseline.is_set()) { ++nopt; }
-  if(_summary_diff.is_set()) { ++nopt; }
-  if(_detail_diff.is_set()) { ++nopt; }
-  if(_shutdown.is_set()) { ++nopt; }
+  if(_summary.is_set() && _summary.value()) { ++nopt; }
+  if(_detail.is_set() && _detail.value()) { ++nopt; }
+  if(_baseline.is_set() && _baseline.value()) { ++nopt; }
+  if(_summary_diff.is_set() && _summary_diff.value()) { ++nopt; }
+  if(_detail_diff.is_set() && _detail_diff.value()) { ++nopt; }
+  if(_shutdown.is_set() && _shutdown.value()) { ++nopt; }
 #ifndef PRODUCT
-  if(_debug.is_set()) { ++nopt; }
+  if(_debug.is_set() && _debug.value()) { ++nopt; }
 #endif
 
   if(nopt > 1) {
       output()->print_cr("At most one of the following option can be specified: " \
         "summary, detail, baseline, summary.diff, detail.diff, shutdown"
 #ifndef PRODUCT
-        " ,debug"
+        ", debug"
 #endif
       );
       return;
-  }
-
-  if(nopt == 0) {
+  } else if (nopt == 0) {
+    if (_summary.is_set()) {
+      output()->print_cr("No command to execute");
+      return;
+    } else {
       _summary.set_value(true);
+    }
   }
 
 #ifndef PRODUCT