RFR: 8276098: Do precise BOT updates in G1 evacuation phase [v3]

Thomas Schatzl tschatzl at openjdk.java.net
Tue Nov 9 09:39:39 UTC 2021


On Tue, 9 Nov 2021 09:18:58 GMT, Yude Lin <duke at openjdk.java.net> wrote:

> Okay, it's actually not relevant to this patch. `G1ScanHRForRegionClosure::do_claimed_block` has made an unaligned request to BOT because of `_scanned_to`. That is, `_scanned_to` is not aligned on card boundary. And this causes a slow path. I think there might be an easy way to prevent slow path, e.g., make a special case for unaligned mr.start() in `HeapRegion::oops_on_memregion_seq_iterate_careful`. But that might be another topic.

In this case `_scanned_to` points to a valid object anyway; from just reading the code, possibly the `block_start()` call in `HeapRegion::oops_on_memregion_seq_iterate_careful` shouldn't be done in this case. Maybe if the caller of `HeapRegion::oops_on_memregion_seq_iterate_careful` already finds the necessary start.

Or `block_start` could be changed to `block_start_const` in this case.

However this is a different issue I think.

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

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


More information about the hotspot-gc-dev mailing list