RFR: 8261768: SelfDestructTimer should accept seconds
David Holmes
dholmes at openjdk.java.net
Tue May 24 05:05:47 UTC 2022
On Mon, 23 May 2022 16:39:29 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
> The Java VM supports a runtime flag called `SelfDestructTimer`, which if used, will automatically terminate the java process using the value, expressed in minutes.
>
> This flag is very useful when, for example, working on VM startup performance, as it allows a sampling tool to capture the exact same time interval for clear comparison of before and after optimizations.
>
> The only problem is that the minimum value of 1 minutes is a really long time for a computer and any data captured during that minute will have many samples to filter through.
>
> This fix allows SelfDestructTimer to accept a fractional value of minutes, which in practical terms allows for values to be expressed as seconds, which allows more flexible control.
>
> For example:
>
> - `XX:SelfDestructTimer=0.0` means that the feature is **off** (default, unchanged)
> - `XX:SelfDestructTimer=0.25` means **15 seconds**
> - `XX:SelfDestructTimer=0.5` means **30 seconds**
> - `XX:SelfDestructTimer=1.0` means **1 minute**
>
> The implementation keeps the old semantics, so that`XX: SelfDestructTimer=1` behavior, for example, is unchanged.
This is a very old flag that predates diagnostic flags. :) Changing it to diagnostic would not be unreasonable IMO but a separate RFE.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8849
More information about the hotspot-runtime-dev
mailing list