RFR: 8356025: Provide a PrintVMInfoAtExit diagnostic switch
Matthias Baesken
mbaesken at openjdk.org
Wed May 7 08:25:14 UTC 2025
On Thu, 1 May 2025 04:54:37 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> Provides a `PrintVMInfoAtExit` diagnostic switch that, if active, causes the JVM to print out the equivalent of `jcmd VM.info` before exiting.
>
> The `VM.info` output contains a large range of valuable information about the JVM and the process.
>
> The switch can be surprisingly useful, e.g. when analysing short-lived processes that are too quick to be analysed with jcmd, or analysing JVM child processes in a process tree, and so on. Going forward, it can also remove the need for some of the more specific PrintxxxAtExit flags.
>
> It can also make writing tests easier (want to make sure switch XX enables condition YY, and YY is printed as part of VM.info? Just start the VM with PrintVMInfoAtExit and parse the output )
Looks like a useful 'thing' , thanks !
test/hotspot/jtreg/runtime/ErrorHandling/PrintVMInfoAtExitTest.java line 32:
> 30: * @modules java.base/jdk.internal.misc
> 31: * @requires vm.flagless
> 32: * @requires vm.bits == "64"
Not sure why the bits == 64 requirement is there but maybe it is because of the other settings used by the test ?
-------------
Marked as reviewed by mbaesken (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/24980#pullrequestreview-2820822912
PR Review Comment: https://git.openjdk.org/jdk/pull/24980#discussion_r2077075682
More information about the hotspot-runtime-dev
mailing list