RFR: 8265057: G1: Investigate removal of maintenance of two BOT thresholds

Thomas Schatzl tschatzl at openjdk.java.net
Tue Aug 3 14:31:35 UTC 2021


On Tue, 3 Aug 2021 13:25:07 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:

> Hi all,
> 
> Please review this change to remove `_next_offset_index` and maintain only one threshold `_next_offset_threshold` a direct pointer to the BOT entry in the BOT. We derive the next_offset_index from from _next_offset_threshold where required. Performance tests do not show any regression as a result of this change. 
> 
> Testing: Tier 1-5

Lgtm apart from the suggested fixes to some comments.

src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp line 267:

> 265:   // For efficiency, do copy-in/copy-out.
> 266:   HeapWord* threshold = *threshold_;
> 267:   size_t    index =  _bot->index_for_raw(threshold);

Superfluous spaces but maybe keep it for consistency in this method/file.

src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp line 309:

> 307:   assert(threshold >= blk_end, "Incorrect offset threshold");
> 308: 
> 309:   // index_ and threshold_ updated here.

Stale comment about `_index`. Maybe just "Finally update threshold_." at the end, but simply removing the comment seems as fine.

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

Marked as reviewed by tschatzl (Reviewer).

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



More information about the hotspot-gc-dev mailing list