Integrated: 8329699: GenShen: Move promotion logic out of shHeap and shHeapRegion

William Kemper wkemper at openjdk.org
Fri Apr 12 20:39:09 UTC 2024


On Thu, 4 Apr 2024 18:15:38 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`.

This pull request has now been integrated.

Changeset: 9d869ca1
Author:    William Kemper <wkemper at openjdk.org>
URL:       https://git.openjdk.org/shenandoah/commit/9d869ca1b4d5b210a93dbb4d209189d913c92446
Stats:     1876 lines in 36 files changed: 968 ins; 791 del; 117 mod

8329699: GenShen: Move promotion logic out of shHeap and shHeapRegion

Reviewed-by: kdnilsen

-------------

PR: https://git.openjdk.org/shenandoah/pull/415


More information about the shenandoah-dev mailing list