RFR: Track promotion rate into old generation

William Kemper wkemper at openjdk.java.net
Thu Sep 16 22:02:56 UTC 2021


On Thu, 16 Sep 2021 21:43:48 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> The member `_bytes_allocated_since_last_gc` has been moved into the `ShenandoahGeneration` abstraction and is updated accordingly. Evacuations into the old generation (i.e., promotion) are counted as allocations against the old generation. Promotion of entire regions is not recorded in the promotion rate.
>
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 1038:
> 
>> 1036:     } else {
>> 1037:       if (req.is_old()) {
>> 1038:         old_generation()->increase_allocated(actual_bytes);
> 
> I'm not sure I follow all the logic.  When we allocate a PLAB for promotions into old-gen, we want to increment the promotion rate.  But when we allocate a ?LAB to hold the results of an old-gen evacuation, that should not be counted as "promotion" memory.  Are we distinguishing these two cases?

Ah, that's a good catch. I think this would count evacuations in old as part of the promotion rate. Will work on a fix.

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

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


More information about the shenandoah-dev mailing list