RFR: 8289822: G1: Make concurrent mark code owner of TAMSes [v2]
Thomas Schatzl
tschatzl at openjdk.org
Thu Mar 14 15:45:43 UTC 2024
On Thu, 14 Mar 2024 10:16:45 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Thomas Schatzl has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits:
>>
>> - Merge branch 'master' into 8289822-concurrent-mark-tams-owner
>> - Do the mark information reset more fine grained (like before this change) to not potentially make HeapRegion::hr_clear() too slow
>> - Fixes
>> - some attempts to not have TAMSes always be updated for all regions
>> - Remove _top_at_mark_start HeapRegion member
>> - 8326781
>>
>> initial version
>>
>> initial draft
>>
>> some improvmeents
>>
>> Make things work
>>
>> forgotten fix
>
> src/hotspot/share/gc/g1/g1ConcurrentMark.hpp line 569:
>
>> 567:
>> 568: inline HeapWord* top_at_mark_start(const HeapRegion* r) const;
>> 569: inline HeapWord* top_at_mark_start(uint region) const;
>
> Maybe call it `region_index` or sth alike? (In the impl of these methods, having `region` being the index is a bit confusing, IMO.)
I can do that separately for all `region` indexes used in the file. Having both at the same time does not look good either.
> src/hotspot/share/memory/iterator.hpp line 44:
>
>> 42: // The following classes are C++ `closures` for iterating over objects, roots and spaces
>> 43:
>> 44: class Closure : public CHeapObj<mtGC> { };
>
> Why is this required (in this PR)?
The changes need to allocate `G1CollectedHeap::_is_alive_closure_cm` when creating that argument for creating the concurrent reference processor. Previously the closure used `G1CollectedHeap` which is available when inlining it into the `G1CollectedHeap` instance, but now the closure needs `G1ConcurrentMark` which is not available at that time (i.e. null).
The alternative would have been introducing something like an `initialize` method to that closure which I did not like.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18150#discussion_r1525101929
PR Review Comment: https://git.openjdk.org/jdk/pull/18150#discussion_r1525105894
More information about the hotspot-gc-dev
mailing list