Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8335154

jcmd VM.classes -verbose=false does not set verbose to false

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • None
    • core-svc
    • None
    • b05

      Unlike other jcmd -verbose arguments, which can be set, or set specifically to true or false:

      jcmd PID VM.classes -verbose=false
      ...does not set verbose to false.


      VM.classes is
      866 class ClassesDCmd : public DCmdWithParser {
      867 protected:
      868 DCmdArgument<bool> _verbose;


      994 void ClassesDCmd::execute(DCmdSource source, TRAPS) {
      995 VM_PrintClasses vmop(output(), _verbose.is_set());
      996 VMThread::execute(&vmop);
      997 }

      _verbose.is_set() is wrong, it could be set, but set to false.

      _verbose.value() should be used (see other examples such as StringtableDCmd::execute).

            kevinw Kevin Walls
            kevinw Kevin Walls
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: