diff --git a/src/hotspot/share/services/diagnosticFramework.cpp b/src/hotspot/share/services/diagnosticFramework.cpp index d34fd4103bf..a97339df470 100644 --- a/src/hotspot/share/services/diagnosticFramework.cpp +++ b/src/hotspot/share/services/diagnosticFramework.cpp @@ -389,7 +389,7 @@ static JcmdOptions parse_common_options(const CmdLine& line, stringStream *updat JcmdOptions options = {0}; // there is only TIMESTAMP option so far - const char TIMESTAMP[] = "-T"; + const char TIMESTAMP[] = "-t"; const char* line_str = line.cmd_addr(); diff --git a/src/hotspot/share/services/diagnosticFramework.hpp b/src/hotspot/share/services/diagnosticFramework.hpp index b380467c58f..db6bc4d10c7 100644 --- a/src/hotspot/share/services/diagnosticFramework.hpp +++ b/src/hotspot/share/services/diagnosticFramework.hpp @@ -166,7 +166,7 @@ public: struct JcmdOptions { - bool timestamp; + bool timestamp; // a timestamp was requsted with "-t" flag }; // The DCmdParser class can be used to create an argument parser for a diff --git a/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java b/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java index cebb3978e92..07612622c4e 100644 --- a/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java +++ b/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java @@ -65,9 +65,9 @@ class Arguments { processString = args[argsCounter]; argsCounter++; - // common flags: [-T] + // common flags: [-t] if (argsCounter < args.length // "jcmd " is not an error and acts as "jcmd help" - && args[argsCounter].equals("-T")) { + && args[argsCounter].equals("-t")) { sb.append(args[argsCounter]).append(" "); argsCounter++; @@ -123,11 +123,11 @@ class Arguments { } public static void usage() { - System.out.println("Usage: jcmd [-T] "); + System.out.println("Usage: jcmd [-t] "); System.out.println(" or: jcmd -l "); System.out.println(" or: jcmd <-h | --help> "); System.out.println(" "); - System.out.println(" -T flag ensures the dignostic command begins with a timestamp "); + System.out.println(" -t flag ensures the dignostic command begins with a timestamp "); System.out.println(" "); System.out.println(" command must be a valid jcmd command for the selected JVM. "); System.out.println(" Use the command \"help\" to see which commands are available. "); diff --git a/src/jdk.jcmd/share/man/jcmd.md b/src/jdk.jcmd/share/man/jcmd.md index 97e1c7c4265..342056ed156 100644 --- a/src/jdk.jcmd/share/man/jcmd.md +++ b/src/jdk.jcmd/share/man/jcmd.md @@ -33,7 +33,7 @@ jcmd - send diagnostic command requests to a running Java Virtual Machine ## Synopsis -`jcmd` \[*pid* \| *main-class*\] [`-T`] *command*... \| `PerfCounter.print` \| `-f` +`jcmd` \[*pid* \| *main-class*\] [`-t`] *command*... \| `PerfCounter.print` \| `-f` *filename* `jcmd` \[`-l`\] @@ -48,7 +48,7 @@ jcmd - send diagnostic command requests to a running Java Virtual Machine : When used, the `jcmd` utility sends the diagnostic command request to all Java processes with the specified name of the main class. -`-T` +`-t` : When used, the diagnostic commands output starts with a timestamp. *command* diff --git a/test/jdk/sun/tools/jcmd/TestJcmdTimestamp.java b/test/jdk/sun/tools/jcmd/TestJcmdTimestamp.java index 79a978a6189..9a19ab72e84 100644 --- a/test/jdk/sun/tools/jcmd/TestJcmdTimestamp.java +++ b/test/jdk/sun/tools/jcmd/TestJcmdTimestamp.java @@ -33,16 +33,16 @@ import jdk.test.lib.process.OutputAnalyzer; /* * @test - * @summary test jcmd generic flag "-T" to make sure dignostic coommand is timestamped + * @summary test jcmd generic flag "-t" to make sure dignostic coommand is timestamped * @library /test/lib * @run main/othervm TestJcmdTimestamp */ public class TestJcmdTimestamp { public static void main(String[] args) throws Exception { - TestJcmdTimestamp(new PidJcmdExecutor(), "-T VM.version", true /* expectTimestamp */); + TestJcmdTimestamp(new PidJcmdExecutor(), "-t VM.version", true /* expectTimestamp */); TestJcmdTimestamp(new PidJcmdExecutor(), "VM.version", false /* expectTimestamp */); - TestJcmdTimestamp(new FileJcmdExecutor(), "-T VM.version", true /* expectTimestamp */); + TestJcmdTimestamp(new FileJcmdExecutor(), "-t VM.version", true /* expectTimestamp */); TestJcmdTimestamp(new FileJcmdExecutor(), "VM.version", false /* expectTimestamp */); } diff --git a/test/jdk/sun/tools/jcmd/usage.out b/test/jdk/sun/tools/jcmd/usage.out index 69630666c94..406444d70de 100644 --- a/test/jdk/sun/tools/jcmd/usage.out +++ b/test/jdk/sun/tools/jcmd/usage.out @@ -1,8 +1,8 @@ -Usage: jcmd [-T] +Usage: jcmd [-t] or: jcmd -l or: jcmd <-h | --help> - -T flag ensures the dignostic command begins with a timestamp + -t flag ensures the dignostic command begins with a timestamp command must be a valid jcmd command for the selected JVM. Use the command "help" to see which commands are available.