RFR: 8280024: Parallel: Remove unnecessary PSCardTable::resize_covered_region_by_end

Thomas Schatzl tschatzl at openjdk.java.net
Tue Jan 18 11:44:27 UTC 2022


On Fri, 14 Jan 2022 14:40:42 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> Simple change of removing effectively dead code.
> 
> Test: tier1-6

src/hotspot/share/gc/parallel/psCardTable.cpp line 417:

> 415: // allows identification of the region that is being resized.
> 416: void PSCardTable::resize_covered_region(MemRegion new_region) {
> 417:   for (int i = 0; i < _cur_covered_regions; i++) {

This method seems to be completely superfluous now and a call to the parent method achieves exactly the same.

I mean, this code in all cases calls `resize_covered_region_by_start()` in any case, which calls the super class method.

`CardTable::resize_covered_region` performs that `_cur_covered_regions < _max_covered_regions` assert too anyway (in `CardTable::find_covered_region_by_base()`).

So I think this entire method (and `resize_covered_region_by_start`) should be removed too.

I think this is a leftover from removal of the (ever broken, see [here](https://bugs.openjdk.java.net/issues/?jql=text%20~%20%22useadaptivegcboundary%22)) functionality to move the generation boundary (`UseAdaptiveGCBoundary`).

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

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



More information about the hotspot-gc-dev mailing list