RFR: 8256813: Simplify WeakProcessor counting of OopStorage entries
Stefan Johansson
sjohanss at openjdk.java.net
Mon Nov 23 07:57:57 UTC 2020
On Sat, 21 Nov 2020 05:08:57 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this change to WeakProcessor's counting of weak and dead
> entries. After JDK-8212879 we no longer need different closure classes to
> deal with the serial and oopstorage cases, since the serial case no longer
> exists. We can collapse that down to one closure class that is tailored for
> the remaining uses.
>
> Also deleted a stale comment left over from JDK-8212879.
>
> Testing:
> mach5 tier1
> Locally (linux-x64) hotspot:tier1 with Serial and Parallel GCs.
Nice cleanup, but I have one question around the accounting below.
src/hotspot/share/gc/shared/weakProcessor.inline.hpp line 73:
> 71: size_t dead() const { return _old_dead + _new_dead; }
> 72: size_t new_dead() const { return _new_dead; }
> 73: size_t processed() const { return _new_dead + _live; }
Shouldn't `_old_dead` be included in `processed()`? Looking at the old `num_total()` it includes `_num_skipped` which matches what `_old_dead` counts now.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1362
More information about the hotspot-gc-dev
mailing list