RFR: Generation affiliation transitions for heap regions.

Bernd Mathiske bmathiske at openjdk.java.net
Tue Nov 17 13:32:21 UTC 2020


On Tue, 17 Nov 2020 11:12:50 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> Preparatory renaming generation->affiliation since we will want to have a class called ShenandoahGeneration that is not an enum. The next PR will build on this. It will be a big refactoring that pulls code out of the ShenandoahHeap class and puts it into generation-specific classes that are subclasses of ShenandoahGeneration.
>> 
>> The Affiliation declaration still sits in AllocRequest and not in ShenandoahHeapRegion or ShenandoahGeneration for the same reason as before: it is hard to get anything to compile in other combinations of what goes where. I tried.
>> 
>> The card table update code in the set_affiliation() will be revised and augmented later, but seems OK as a first step.
>
> src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 550:
> 
>> 548:   bool is_in(const void* p) const;
>> 549: 
>> 550:   bool is_in_young(const void* p) const;
> 
> This overrides CollectedHeap method, right? So either put 'virtual' here to indicate this, or even better 'override'. I believe we can use that new C++11 specifier now...

This method does not exist in CollectedHeap. It does exist in GenCollectedHeap, but ShenandoahHeap is not a subclass of the latter. (GenCollectedHeap is rather specialized, not suitable for us. It assumes contiguous generation spaces. G1 does not use it either.)

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

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


More information about the shenandoah-dev mailing list