RFR: 8276229: Stop allowing implicit updates in G1BlockOffsetTable

Stefan Johansson sjohanss at openjdk.java.net
Wed Nov 10 13:48:33 UTC 2021


On Wed, 10 Nov 2021 13:41:59 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> My initial thought was also that this should not be needed, but the code proved me wrong. It might be possible to refactor the code even further to avoid this case.
>
> Okay, understood. I have been too fixated on the case with remembered sets to disregard other cases, looking at the code I even found interesting ones :)
> 
>            card1       card2
>    -----+----------+----------+---------
>        A|AAABBBCCCD|DDD       |
>    -----+----------+----------+---------
>        ^    ^  ^
>        q    n  addr
> ```   
> Something like this: we get asked by `addr` somewhere in card card1, `block_preceeding_addr(addr)` is `q` and `n` is the end of the block.
> 
> Agree, then the code (and the comment) is correct.
> 
> Maybe it is really worth to optimize the card scanning case.

Yes, if we can avoid doing the call to `block_start()` when we know we have a valid object start that could be a nice optimization.

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

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


More information about the hotspot-gc-dev mailing list