There are four event settings that can be configured from Java:
- Enabled
- StackTrace
- Period
- Threshold
Users can specify a default value for their events, for example, @Threshold("1000 ms") or @Period("30 s"). This works, but if an incorrect setting is set dynamically, for example, foo.bar#threshold=whatever, programmatically or from the shell, the setting should fall back on the default, for example, 1000 ms. The problem is that it defaults to the default as if no user-defined default had been specified at all, for example, "0 ns" for thresholds.
Also, if a user-defined default is incorrect, for example, @Threshold("whatever"), the default value should be the system default, e.g., "0 ns". This is a programming error and users should be warned, and if it happens in the JDK, we should fail fast with an internal error.
Enabled and StackTrace settings have the correct behavior, but not Period and Threshold. Cutoff and Throttle should also implement the same behavior, even though they are not yet exposed to end users.
- Enabled
- StackTrace
- Period
- Threshold
Users can specify a default value for their events, for example, @Threshold("1000 ms") or @Period("30 s"). This works, but if an incorrect setting is set dynamically, for example, foo.bar#threshold=whatever, programmatically or from the shell, the setting should fall back on the default, for example, 1000 ms. The problem is that it defaults to the default as if no user-defined default had been specified at all, for example, "0 ns" for thresholds.
Also, if a user-defined default is incorrect, for example, @Threshold("whatever"), the default value should be the system default, e.g., "0 ns". This is a programming error and users should be warned, and if it happens in the JDK, we should fail fast with an internal error.
Enabled and StackTrace settings have the correct behavior, but not Period and Threshold. Cutoff and Throttle should also implement the same behavior, even though they are not yet exposed to end users.
- links to
-
Commit(master) openjdk/jdk/265d6301
-
Review(master) openjdk/jdk/25291