RFR: 8335358: [premain] Explore alternative ways to trigger the end of training run [v3]

Mat Carter macarte at openjdk.org
Tue Sep 17 17:34:24 UTC 2024


On Tue, 17 Sep 2024 04:33:38 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> src/hotspot/share/services/diagnosticCommand.hpp line 410:
>> 
>>> 408:     static const JavaPermission permission() {
>>> 409:     JavaPermission p = {"java.lang.management.ManagementPermission",
>>> 410:                         "monitor", nullptr};
>> 
>> Should this be 'monitor' or 'control' (or something else)?
>
> I think "monitor" is appropriate (used also for dumping heap, etc). The API says "control" is to "control the runtime characteristics of the Java virtual machine", but we aren't really modifying the runtime characteristics.

Yes in v1 of this PR, ending the training run would cause the application to exit, hence our though on 'control', but as this is no longer the case, 'monitor' is more appropriate

-------------

PR Review Comment: https://git.openjdk.org/leyden/pull/21#discussion_r1763627882


More information about the leyden-dev mailing list