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

Albert Mingkun Yang ayang at openjdk.org
Wed May 10 10:26:27 UTC 2023


On Wed, 10 May 2023 10:01:33 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Simple removing object-count event in the case of incomplete-marking.
>> 
>> Test: hotspot_gc
>
> 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.

Think so; will do it in another PR.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13897#discussion_r1189699599


More information about the hotspot-gc-dev mailing list