RFR: 8329699: GenShen: Move promotion logic out of shHeap and shHeapRegion [v2]
William Kemper
wkemper at openjdk.org
Thu Apr 4 18:40:25 UTC 2024
> The code to handle promotions during evacuation has been moved into a new class in its own files: `shGenerationalEvacuationTask`
>
> The methods for managing `plabs` have been moved into `shGenerationalHeap`. `plabs` are now also only created when running the generational mode.
>
>
> - inline HeapWord* allocate_from_plab(Thread* thread, size_t size, bool is_promotion);
> - HeapWord* allocate_from_plab_slow(Thread* thread, size_t size, bool is_promotion);
> - HeapWord* allocate_new_plab(size_t min_size, size_t word_size, size_t* actual_size);
> - void retire_plab(PLAB* plab);
> - void retire_plab(PLAB* plab, Thread* thread);
>
>
> The code to handle promotion in place has been moved from `shHeapRegion` into `shGenerationalEvacuationTask`:
>
> - void promote_humongous();
> - void promote_in_place();
>
>
> Unused methods related to global coalesce and fill have been deleted from `shHeapRegion`:
>
> - void global_oop_iterate_and_fill_dead(OopIterateClosure* cl);
> - void global_oop_iterate_objects_and_fill_dead(OopIterateClosure* cl);
> - void oop_iterate_humongous(OopIterateClosure* cl);
> - void oop_iterate_humongous(OopIterateClosure* cl, HeapWord* start, size_t words);
>
>
> Additionally, these methods in `shHeap` which just delegated to old or young generation instances have more or less been inlined at the usage site (many `includes` have been fixed):
>
> - ShenandoahOldHeuristics* old_heuristics();
> - ShenandoahYoungHeuristics* young_heuristics();
> -
> - bool doing_mixed_evacuations();
> - bool is_old_bitmap_stable() const;
> - bool is_gc_generation_young() const;
>
>
> The boolean `is_promotion` that was passed through all of the allocation calls has been moved into `shAllocRequest` to reduce the upstream delta for `shHeap`.
William Kemper has updated the pull request incrementally with one additional commit since the last revision:
Fix mac build
-------------
Changes:
- all: https://git.openjdk.org/shenandoah/pull/415/files
- new: https://git.openjdk.org/shenandoah/pull/415/files/e398ce38..8140ce9b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=shenandoah&pr=415&range=01
- incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=415&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/shenandoah/pull/415.diff
Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/415/head:pull/415
PR: https://git.openjdk.org/shenandoah/pull/415
More information about the shenandoah-dev
mailing list