RFR: 8267833: Improve G1CardSetInlinePtr::add()

Kim Barrett kbarrett at openjdk.java.net
Mon Aug 16 09:10:25 UTC 2021


On Mon, 16 Aug 2021 08:51:40 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Hi all,
>> 
>> Please review this cleanup change to reduce the number of comparisons made when adding entries to an inline pointer cardset container. We allow the find to restart from a previously known index.
>> 
>> Testing: Tier 1-3
>
> src/hotspot/share/gc/g1/g1CardSetContainers.inline.hpp line 95:
> 
>> 93: }
>> 94: 
>> 95: inline bool G1CardSetInlinePtr::contains(uint card_idx, uint bits_per_card) {
> 
> I think `contains` previously didn't use it's `card_idx` argument.  Is it needed by any callers?  Or was the previous non-use just a performance bug?

D'oh!  Of course it's used.  It's the thing we're looking for.  I just couldn't see it right there in front of me.  Never mind.

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

PR: https://git.openjdk.java.net/jdk/pull/5067



More information about the hotspot-gc-dev mailing list