RFR: 8351958: Some compile commands should be made diagnostic [v5]
Marc Chevalier
mchevalier at openjdk.org
Tue May 20 10:58:12 UTC 2025
On Mon, 19 May 2025 15:38:13 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Revert blackhole test change
>
> src/hotspot/share/compiler/compilerOracle.cpp line 1027:
>
>> 1025: if (option2type(option) == OptionType::Bool) {
>> 1026: register_command(typed_matcher, option, error_buf, sizeof(error_buf), true);
>> 1027: if (*error_buf != '\0') {
>
> @marc-chevalier I know that you follow existing patter. But may be `register_command()` should return boolean result if it succeeded or not so you can check it instead of loading value from buffer.
>
> `scan_value()`and `scan_option_and_value()` may need to do the same.
>
> Note, `print_parse_error()` has assert to check that error message is not empty.
It's fun you suggest that: it was my first version, but it felt like it was a lot more diff than what my PR version has. Happy to use a returned boolean.
I've made sure to rename function with temporary name not to miss any call site where the returned bool would be ignored, and renamed back. I also removed returns at the end of function not to miss any path: reaching end of function without a return is a warning (becoming error) at compile-time.
I've also removed a bit of now-obviously dead code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25150#discussion_r2097657163
More information about the hotspot-dev
mailing list