RFR: 8294059: Serial: Refactor GenCollectedHeap::collect [v2]

Albert Mingkun Yang ayang at openjdk.org
Wed Sep 28 10:37:08 UTC 2022


On Wed, 28 Sep 2022 08:55:10 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update src/hotspot/share/gc/shared/genCollectedHeap.cpp
>>   
>>   Co-authored-by: Stefan Johansson <54407259+kstefanj at users.noreply.github.com>
>
> src/hotspot/share/gc/shared/genCollectedHeap.cpp line 842:
> 
>> 840:                                       ? YoungGen
>> 841:                                       : OldGen;
>> 842: 
> 
> At high risk of sounding onerous and nitpicky: please avoid adding new ways of formatting the `?` statement, and in this case it's short enough to write on a single line without any loss of clarity too.
> 
> (Fwiw, I searched for multi-line formatting of `?` in shared code, and as far as I can see the `?` isn't aligned to the `=` above ever - it is seemingly in the majority of times intended like a new scope, i.e. 2 (or sometimes 4?) spaces from the previous line. Actually I wanted to avoid these kinds of discussions, but, well it kind of pops out when looking at it...)

I can see one such example in `jvm_posix.cpp`. Anyway, I feel this is clearer. (Very subjective ofc.)

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

PR: https://git.openjdk.org/jdk/pull/10355



More information about the hotspot-gc-dev mailing list