RFR: 8307808: G1: Remove partial object-count report after gc

Thomas Schatzl tschatzl at openjdk.org
Wed May 10 10:12:16 UTC 2023


On Wed, 10 May 2023 09:48:17 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> Simple removing object-count event in the case of incomplete-marking.
> 
> Test: hotspot_gc

Lgtm. Feel free to consider doing the suggested optimization in a separate cr.

src/hotspot/share/gc/g1/g1ConcurrentMark.cpp line 1225:

> 1223:   bool do_object_b(oop obj) {
> 1224:     return obj != nullptr &&
> 1225:            (!_g1h->is_in_reserved(obj) || !_g1h->is_obj_dead(obj));

I think the first clause can be removed (or asserted); the (parallel-)objectiterator for g1 always returns `true` for that as it only ever iterates over the heap regions.
Also the `!= nullptr` is imo removable for the same reason. We are walking the heap linearly, so I do not see how that value could be null.

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

Marked as reviewed by tschatzl (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13897#pullrequestreview-1420265517
PR Review Comment: https://git.openjdk.org/jdk/pull/13897#discussion_r1189672056


More information about the hotspot-gc-dev mailing list