On Wed, 26 Jun 2024 12:29:18 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> VM.classes uses: >> >> 995 VM_PrintClasses vmop(output(), _verbose.is_set()); >> >> _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). >> >> With this change -verbose=false will turn off verbose mode like all other >> DCmds which accept -verbose >> >> bash-4.2$ jcmd 20193 VM.classes -verbose=false | wc -l >> 2490 >> bash-4.2$ jcmd 20193 VM.classes -verbose=true | wc -l >> 90258 > > src/hotspot/share/services/diagnosticCommand.cpp line 995: > >> 993: >> 994: void ClassesDCmd::execute(DCmdSource source, TRAPS) { >> 995: VM_PrintClasses vmop(output(), _verbose.value()); > > What if it wasn't set? It has a default value... Generally "false" for _verbose DCmdArguments. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19901#discussion_r1654745341