On Thu, 18 Sep 2025 14:57:44 GMT, Ivan Bereziuk <[email protected]> wrote:
> `jcmd` provides great diagnostics but many commands lack a timestamp in their > output. > Adding a timestamp to the output would add value for those debugging JVM data. > > Some diagnostic commands already provide timestamps. For example > `Thread.print` already prints one of "yyyy-MM-dd HH:mm:ss" format. > > With this MR I propose to introduce time-stamping to all diagnostic `jcmd` > commands in a form of an additional common flag "-t": > > jcmd [pid | main-class] [-t] command... | PerfCounter.print | -f filename > ^^^^ > > * The choice for time format is ISO 8601 `yyyy-MM-dd'T'HH:mm:ss.SSSZ` > (example `2026-01-21T16:58:49.518+0100`) > * if "-t" flag is not passed, `Thread.print` keeps printing "yyyy-MM-dd > HH:mm:ss" timestamp to preserve backwards compatibility. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/27368
