RFR: 8318629: G1: Refine code a bit in G1RemSetTrackingPolicy::update_at_allocate

Albert Mingkun Yang ayang at openjdk.org
Mon Oct 23 11:05:37 UTC 2023


On Sat, 21 Oct 2023 11:49:16 GMT, Hamlin Li <mli at openjdk.org> wrote:

> Hi,
> Can you help to review this simple refactoring?
> Thanks!

Can't say the new code is easier to read.

I wonder what you think of sth like:


assert(is_young || is_old || is_humongous);

if (is_old) {
  ...
} else {
  ...
}

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

PR Review: https://git.openjdk.org/jdk/pull/16300#pullrequestreview-1692262420


More information about the hotspot-gc-dev mailing list