RFR: 8329699: GenShen: Move promotion logic out of shHeap and shHeapRegion [v2]
Kelvin Nilsen
kdnilsen at openjdk.org
Thu Apr 11 20:03:01 UTC 2024
On Thu, 4 Apr 2024 18:40:25 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> 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
Very nice cleanup. Thanks for your work on this.
-------------
Marked as reviewed by kdnilsen (Committer).
PR Review: https://git.openjdk.org/shenandoah/pull/415#pullrequestreview-1995168043
More information about the shenandoah-dev
mailing list