RFR: 8304393: Provide method to iterate over regions of humongous object in G1 [v3]

Albert Mingkun Yang ayang at openjdk.org
Mon Mar 20 11:44:26 UTC 2023


On Mon, 20 Mar 2023 11:08:56 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Hi all,
>> 
>>   please review this refactoring that introduces a method to iterate over all regions of a humongous object and apply a function to it to decrease the five times code duplication.
>> 
>> Testing: gha
>> 
>> Thanks,
>>   Thomas
>
> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
> 
>   iwalulya review

src/hotspot/share/gc/g1/g1CollectedHeap.hpp line 1095:

> 1093:   // Iterate over the regions that the humongous object starting at the given
> 1094:   // region and apply the given method with the signature f(HeapRegion*) on them.
> 1095:   template <typename Functor>

Maybe "Func" or "Function"? "Functor" means sth diff in some functional langs.

src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp line 119:

> 117: 
> 118:   do {
> 119:     HeapRegion* next = next_region_in_humongous(start);

Could this be inlined? I don't see any other callers.

src/hotspot/share/gc/g1/g1ConcurrentMark.hpp line 480:

> 478:   // Clear statistics gathered during the concurrent cycle for the given region after
> 479:   // it has been reclaimed.
> 480:   void clear_statistics_in_region(HeapRegion* r);

Could it be `clear_statistics`? The same signature as the removed one.

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

PR: https://git.openjdk.org/jdk/pull/13080


More information about the hotspot-gc-dev mailing list