RFR: 8294059: Serial: Refactor GenCollectedHeap::collect
Thomas Schatzl
tschatzl at openjdk.org
Wed Sep 28 08:57:30 UTC 2022
On Tue, 20 Sep 2022 10:53:09 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple cleanup of control flow in `GenCollectedHeap::collect`.
>
> Test: hotspot_gc
Looks good.
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...)
-------------
Marked as reviewed by tschatzl (Reviewer).
PR: https://git.openjdk.org/jdk/pull/10355
More information about the hotspot-gc-dev
mailing list