RFR: Differentiate young generation marking. [v2]

Charlie Gracie cgracie at openjdk.java.net
Tue Dec 8 19:43:54 UTC 2020


On Tue, 8 Dec 2020 17:27:46 GMT, Bernd Mathiske <bmathiske at openjdk.org> wrote:

>> This change is large to achieve uninterrupted functionality for single-generational Shenandoah while planting code that differentiates two distinct generations and concurrent marking for the young generation.
>> 
>> Where necessary we use templates to not impose runtime overhead. In code sections that are not runtime-critical we use conditions and switches over an enum that indicates which generational collection mode we are in (young or global).
>> 
>> We temporarily make all collections in generational mode young collections. Global and old collections will come later.
>
> Bernd Mathiske has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
> 
>   Differentiate young generation marking.

Hi @bernd-aws. I have been following your changes for adding generational support. Not an official reviewer but I added some small nitpicks (sorry) and a few questions for my own curiosity.

src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 523:

> 521:   // Prepare concurrent root processing
> 522:   void prepare_concurrent_roots();
> 523: 

(nit) extra whitespace change

src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 526:

> 524:   // Prepare and finish concurrent unloading
> 525:   void prepare_concurrent_unloading();
> 526: 

(nit) extra whitespace change

src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 675:

> 673: // ---------- Evacuation support
> 674: //
> 675: 

(nit) extra whitespace change

src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 730:

> 728: // ---------- Testing helpers functions
> 729: //
> 730: 

(nit) extra whitespace change

src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 149:

> 147:   }
> 148: 
> 149:   try_recycle_trashed(r);

I am curious why this code moved up? I do not believe there is anything wrong just curious

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 1625:

> 1623:   OrderAccess::fence();
> 1624: 
> 1625:   generation->concurrent_mark()->mark_roots(ShenandoahPhaseTimings::scan_roots);

I am wondering if it makes sense to have an instance field / an API to get the "active generation". It may reduce API changes.

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

PR: https://git.openjdk.java.net/shenandoah/pull/8


More information about the shenandoah-dev mailing list