From 7ce4aa894279b76b6033bb4a1d0caa00d4213406 Mon Sep 17 00:00:00 2001 From: Chris Plummer Date: Thu, 16 Dec 2021 23:25:07 +0000 Subject: [PATCH] 8276982: VM.class_hierarchy jcmd help output and man page text needs clarifications/improvements Reviewed-by: stuefe, dholmes, sspitsyn --- src/hotspot/share/services/diagnosticCommand.cpp | 5 +++-- src/jdk.jcmd/share/man/jcmd.1 | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/hotspot/share/services/diagnosticCommand.cpp b/src/hotspot/share/services/diagnosticCommand.cpp index 1b3710cf004..21bb35ad9a1 100644 --- a/src/hotspot/share/services/diagnosticCommand.cpp +++ b/src/hotspot/share/services/diagnosticCommand.cpp @@ -906,8 +906,9 @@ void CompilerDirectivesClearDCmd::execute(DCmdSource source, TRAPS) { ClassHierarchyDCmd::ClassHierarchyDCmd(outputStream* output, bool heap) : DCmdWithParser(output, heap), _print_interfaces("-i", "Inherited interfaces should be printed.", "BOOLEAN", false, "false"), - _print_subclasses("-s", "If a classname is specified, print its subclasses. " - "Otherwise only its superclasses are printed.", "BOOLEAN", false, "false"), + _print_subclasses("-s", "If a classname is specified, print its subclasses " + "in addition to its superclasses. Without this option only the " + "superclasses will be printed.", "BOOLEAN", false, "false"), _classname("classname", "Name of class whose hierarchy should be printed. " "If not specified, all class hierarchies are printed.", "STRING", false) { diff --git a/src/jdk.jcmd/share/man/jcmd.1 b/src/jdk.jcmd/share/man/jcmd.1 index 9d8288be42c..65adf880911 100644 --- a/src/jdk.jcmd/share/man/jcmd.1 +++ b/src/jdk.jcmd/share/man/jcmd.1 @@ -873,9 +873,9 @@ The following \f[I]options\f[R] must be specified using either \f[CB]\-i\f[R]: (Optional) Inherited interfaces should be printed. (BOOLEAN, false) .IP \[bu] 2 -\f[CB]\-s\f[R]: (Optional) If a class name is specified, it prints the -subclasses. -If the class name is not specified, only the superclasses are printed. +\f[CB]\-s\f[R]: (Optional) If a classname is specified, print its +subclasses in addition to its superclasses. +Without this option only the superclasses will be printed. (BOOLEAN, false) .PP \f[I]arguments\f[R]: