RFR: JDK-8260200: optimize FreeRegionList::remove_starting_at by removing u… [v2]

Stefan Johansson sjohanss at openjdk.java.net
Fri Jan 22 08:58:49 UTC 2021


On Fri, 22 Jan 2021 01:38:11 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> optimize FreeRegionList::remove_starting_at by removing unnecessary reading and setting
>> 
>> FreeRegionList::remove_starting_at(...) traverses from a node and removes subsequent N nodes from free list. But when traverses the free list, it removes nodes one by one by setting the prev and next pointers of prev and next node. it's not necessary do these settings for every node, as we can remove target nodes at once and just set prev and next pointers for just 2 nodes.
>
> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
> 
>   JDK-8260200: optimize FreeRegionList::remove_starting_at by removing unnecessary reading and setting

I would also prefer if you enable GitHub actions to allow testing. I've kicked of a run in our internal environment as well.

src/hotspot/share/gc/g1/heapRegionSet.cpp line 252:

> 250:   } else {
> 251:     assert_free_region_list(_tail != first, "invariant");
> 252:   }

Since these checks no longer does anything other than assertions I think it would be nice to hide it in a helper that for production builds will do nothing using `NOT_DEBUG_RETURN`.

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

Changes requested by sjohanss (Reviewer).

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



More information about the hotspot-gc-dev mailing list