src/share/vm/services/nmtDCmd.cpp

changeset 4348
3f84e17b6bca
parent 3900
d2a62e0f25eb
child 4810
06db4c0afbf3
     1.1 --- a/src/share/vm/services/nmtDCmd.cpp	Fri Dec 07 10:55:16 2012 -0800
     1.2 +++ b/src/share/vm/services/nmtDCmd.cpp	Mon Dec 17 13:14:02 2012 -0500
     1.3 @@ -84,28 +84,31 @@
     1.4    }
     1.5  
     1.6    int nopt = 0;
     1.7 -  if(_summary.is_set()) { ++nopt; }
     1.8 -  if(_detail.is_set()) { ++nopt; }
     1.9 -  if(_baseline.is_set()) { ++nopt; }
    1.10 -  if(_summary_diff.is_set()) { ++nopt; }
    1.11 -  if(_detail_diff.is_set()) { ++nopt; }
    1.12 -  if(_shutdown.is_set()) { ++nopt; }
    1.13 +  if(_summary.is_set() && _summary.value()) { ++nopt; }
    1.14 +  if(_detail.is_set() && _detail.value()) { ++nopt; }
    1.15 +  if(_baseline.is_set() && _baseline.value()) { ++nopt; }
    1.16 +  if(_summary_diff.is_set() && _summary_diff.value()) { ++nopt; }
    1.17 +  if(_detail_diff.is_set() && _detail_diff.value()) { ++nopt; }
    1.18 +  if(_shutdown.is_set() && _shutdown.value()) { ++nopt; }
    1.19  #ifndef PRODUCT
    1.20 -  if(_debug.is_set()) { ++nopt; }
    1.21 +  if(_debug.is_set() && _debug.value()) { ++nopt; }
    1.22  #endif
    1.23  
    1.24    if(nopt > 1) {
    1.25        output()->print_cr("At most one of the following option can be specified: " \
    1.26          "summary, detail, baseline, summary.diff, detail.diff, shutdown"
    1.27  #ifndef PRODUCT
    1.28 -        " ,debug"
    1.29 +        ", debug"
    1.30  #endif
    1.31        );
    1.32        return;
    1.33 -  }
    1.34 -
    1.35 -  if(nopt == 0) {
    1.36 +  } else if (nopt == 0) {
    1.37 +    if (_summary.is_set()) {
    1.38 +      output()->print_cr("No command to execute");
    1.39 +      return;
    1.40 +    } else {
    1.41        _summary.set_value(true);
    1.42 +    }
    1.43    }
    1.44  
    1.45  #ifndef PRODUCT

mercurial