diff -r bf95d7ddba60 -r eba0866f9379 src/share/vm/services/management.cpp --- a/src/share/vm/services/management.cpp Mon Oct 12 19:31:16 2015 +0200 +++ b/src/share/vm/services/management.cpp Fri Apr 03 15:40:35 2015 +0200 @@ -1107,6 +1107,8 @@ bool with_locked_monitors, bool with_locked_synchronizers, TRAPS) { + // no need to actually perform thread dump if no TIDs are specified + if (num_threads == 0) return; // First get an array of threadObj handles. // A JavaThread may terminate before we get the stack trace.