RFR: 8287024: G1: Improve the API boundary between HeapRegionRemSet and G1CardSet
Albert Mingkun Yang
ayang at openjdk.java.net
Thu May 19 15:12:40 UTC 2022
On Thu, 19 May 2022 14:53:59 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> can I get reviews for this small refactoring that clarifies the boundaries of what kind of data `HeapRegionRemSet` and `G1CardSet` should operate on?
>
> * `HeapRegionRemSet` deals with addresses, heap regions
> * `G1CardSet` deals with card indexes in the heap, card regions and cards within card regions
>
> The `G1CardSet::add_card()` and `G1CardSet::contains_card()` methods are fuzzy about that, they require the caller (`HeapRegionRemSet`) to know about card regions and cards within regions.
>
> Testing: gha
>
> Thanks,
> Thomas
A very minor comment.
src/hotspot/share/gc/g1/g1CardSet.cpp line 703:
> 701: }
> 702:
> 703: void G1CardSet::split_card(uintptr_t offset, uint& card_region, uint& card_within_region) const {
I think `card` is more specific than `offset`, IMO.
-------------
Marked as reviewed by ayang (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/8790
More information about the hotspot-gc-dev
mailing list