RFR: 8278568: Consolidate filler objects
Albert Mingkun Yang
ayang at openjdk.java.net
Thu Dec 16 13:32:04 UTC 2021
On Mon, 13 Dec 2021 11:42:42 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
> In PSPromotionLAB exists some code that fills unused tails of promotion LABs, which is semantically the same as the CollectedHeap::fill* family of methods. They can be consolidated.
>
> We also have ContiguousSpace::allocate_temporary_filler() which does the same, but is unused and can be removed.
>
> Testing:
> - [x] hotspot_gc
> - [x] tier1
> - [ ] tier2
> - [ ] tier3
Just two minor comments/suggestions.
src/hotspot/share/gc/parallel/psPromotionLAB.cpp line 79:
> 77: // so they can always fill with an array.
> 78: HeapWord* tlab_end = end() + CollectedHeap::min_dummy_object_size();
> 79: CollectedHeap::fill_with_object(top(), tlab_end, DEBUG_ONLY(true) NOT_DEBUG(false));
Using `trueInDebug` would be clearer.
src/hotspot/share/gc/shared/collectedHeap.hpp line 292:
> 290:
> 291: virtual void fill_with_dummy_object(HeapWord* start, HeapWord* end, bool zap);
> 292: static size_t min_dummy_object_size();
I wonder if `constexpr` works here.
-------------
Marked as reviewed by ayang (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6814
More information about the hotspot-gc-dev
mailing list