RFR: 8340334: Update jcmd VM.events max parameter to be INT
Kevin Walls
kevinw at openjdk.org
Tue Nov 19 10:16:46 UTC 2024
On Tue, 19 Nov 2024 06:54:57 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> The jcmd VM.events max parameter type is changed to INT.
>> Also,I noted the max <= 0 is ignored, so I updated documentation and set "0" as a default value.
>> The jcmd exists if parameter is negative now.
>>
>> The `max` is `int` while really it is the unsigned int. However I don't think it makes sense to change it to `size_t` or `unsigned int` in all places where 'max' is used.
>
> src/hotspot/share/services/diagnosticCommand.hpp line 892:
>
>> 890: protected:
>> 891: DCmdArgument<char*> _log;
>> 892: DCmdArgument<jlong> _max;
>
> Why `jlong` and not `jint`?
Everything which parses an integer option uses
DCmdArgument<jlong>
(e.g. heap dump parallelism, etc...)
DCmdArgument<jlong>::parse_value(..)
does the parsing, we have never had a definition for
DCmdArgument<jint>
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22224#discussion_r1848047861
More information about the hotspot-runtime-dev
mailing list