RFR: 8266217: ZGC: Improve the -Xlog:gc+init output for NUMA
Per Liden
pliden at openjdk.java.net
Thu Apr 29 07:49:50 UTC 2021
On Thu, 29 Apr 2021 07:41:18 GMT, Jie Fu <jiefu at openjdk.org> wrote:
>> And of course it's not a particular important suggestion, feel free to ignore.
>
>> Maybe consider to have a `static const char* strings[] = {"Enabled", "Unsupported", "Disabled" };` (in the correct order) constant here and index by the array (and maybe an assert to catch out of bounds access if/when adds an entry and forgets to update this list).
>> This is typically more readable then a long switch case like this, but idk other people's opinions.
>
> Thanks @tschatzl for your review.
>
> I didn't think of this skill before.
> Thanks for your teaching.
>
> Let's just keep it this time since there are only 3 cases for `_state`.
> And I'd like to use your style of code next time.
>
> Thanks.
> Best regards,
> Jie
I'd like to keep the current proposal, since it's more inline with what we do in other places in ZGC, like `ZLargePages::to_string()`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3778
More information about the hotspot-gc-dev
mailing list