RFR: 8327057: Parallel: Refactor ParMarkBitMap::iterate
Thomas Schatzl
tschatzl at openjdk.org
Fri Mar 1 10:49:52 UTC 2024
On Thu, 29 Feb 2024 15:00:32 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simplifying bitmap iterate logic in full-gc compaction to reduce possible outcomes callers must handle.
>
> Test: tier1-6
Changes requested by tschatzl (Reviewer).
src/hotspot/share/gc/parallel/parMarkBitMap.cpp line 181:
> 179: if (cur_end >= range_end) {
> 180: // The obj ends outside the range.
> 181: live_closure->set_source(bit_to_addr(cur_beg));
The caller of `iterate` expects `live_closure->source()` to be set at exit but the new code does not update it. It is in use in case of abnormal status.
This is not the case for the `iterate` taking two closures afaict, but nevertheless it seems part of the contract so it is surprising if some methods do and some do not.
The other changes seem to be okay.
src/hotspot/share/gc/parallel/parMarkBitMap.cpp line 218:
> 216: // The range starts with dead space. Look for the next object, then fill.
> 217: // This must be the beginning of old/eden/from/to-space, so it's must be
> 218: // larger enough for a filler.
Suggestion:
// large enough for a filler.
-------------
PR Review: https://git.openjdk.org/jdk/pull/18065#pullrequestreview-1910728957
PR Review Comment: https://git.openjdk.org/jdk/pull/18065#discussion_r1508817795
PR Review Comment: https://git.openjdk.org/jdk/pull/18065#discussion_r1508743378
More information about the hotspot-gc-dev
mailing list