RFR: JDK-8318671: Potential uninitialized uintx value after JDK-8317683 [v3]

Thomas Stuefe stuefe at openjdk.org
Thu Oct 26 09:02:12 UTC 2023


On Wed, 25 Oct 2023 22:16:03 GMT, David Holmes <dholmes at openjdk.org> wrote:

>>> If "omitting value means 'collect'" then why do we not simply set value = (uintx)MemStatAction::collect ? Otherwise what is that message supposed to mean?
>> 
>> We only enter this function if a value for this command had been given (`-XX:CompileCommand=<command>,<method>[,<value>]`). The default case is handled somewhere else (CompilerOracle::parse_from_line).
>> 
>>> Ternary return values are unpleasant.
>> 
>> As, on a general base? You don't like the number three :-) ?
>> 
>> Here, we have to distinguish between:
>> - not handled, its not a command option that accepts enum strings
>> - handled, with two variants: handled, had an error, and handled, had no error. Only in the latter case we want to register the command.
>
> Okay I'll butt out. The comment doesn't make sense to me.

@dholmes-ora Sorry if I came across as flippant; that was not my intention. If you can stomach it, I rewrote the patch to be hopefully easier to read. Thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16335#discussion_r1372821486


More information about the serviceability-dev mailing list