RFR: 8327057: Parallel: Refactor ParMarkBitMap::iterate [v2]

Thomas Schatzl tschatzl at openjdk.org
Fri Mar 1 11:10:18 UTC 2024


On Fri, 1 Mar 2024 10:46:43 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Albert Mingkun Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>> 
>>  - Merge branch 'master' into pgc-iterate-incomplete
>>  - review
>>  - pgc-iterate-incomplete
>
> 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.

@albertnetymk mentioned that `do_addr` of `MarkAndUpdateClosure` properly updates the `source` of the closure.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18065#discussion_r1508836779


More information about the hotspot-gc-dev mailing list