RFR: 8297503: Merge FilteringDCTOC into ContiguousSpaceDCTOC
Thomas Schatzl
tschatzl at openjdk.org
Wed Nov 23 18:00:00 UTC 2022
On Wed, 23 Nov 2022 13:40:55 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple cleanup of trimming unnecessary type hierarchy levels.
>
> Test: hotspot_gc
Lgtm, some minor comments to be fixed as you want.
src/hotspot/share/gc/shared/space.hpp line 547:
> 545: // sub-classes). It knows how to filter out objects that are outside of the
> 546: // _boundary.
> 547: //
Suggestion:
//
// Assumptions:
src/hotspot/share/gc/shared/space.hpp line 555:
> 553: class ContiguousSpaceDCTOC : public DirtyCardToOopClosure {
> 554: protected:
> 555: // Overrides.
Instead of the `overrides` comment, both methods could be decorated with the `override` specifier.
src/hotspot/share/gc/shared/space.hpp line 573:
> 571: void walk_mem_region_with_cl(MemRegion mr,
> 572: HeapWord* bottom, HeapWord* top,
> 573: FilteringClosure* cl);
These do not need to be `protected` afaict
src/hotspot/share/gc/shared/space.hpp line 577:
> 575: public:
> 576: ContiguousSpaceDCTOC(ContiguousSpace* sp, OopIterateClosure* cl,
> 577: CardTable::PrecisionStyle precision,
That's a pre-existing (different) issue, but the only `PrecisionStyle` this code is ever used with seems to be `ObjHeadPreciseArray`.
-------------
Marked as reviewed by tschatzl (Reviewer).
PR: https://git.openjdk.org/jdk/pull/11322
More information about the hotspot-gc-dev
mailing list