RFR: 8372444: Genshen: Optimize evacuation function

Y. Srinivas Ramakrishna ysr at openjdk.org
Wed Nov 26 02:16:49 UTC 2025


On Tue, 25 Nov 2025 17:33:01 GMT, William Kemper <wkemper at openjdk.org> wrote:

> This is a hot code path. Many of the branches can be eliminated at compile time by introducing template parameters. This change shows a 5% reduction in concurrent evacuation times at the trimmed-10 average on the extremem benchmark:
> 
> 
> gen/control/extremem
>                                 Category |  Count |         Total |      GeoMean |      Average |     Trim 0.1 |       StdDev |      Minimum |      Maximum
>         concurrent_evacuation_young_data |     65 |   9625198.000 |   118747.249 |   148079.969 |   145182.189 |    76534.845 |     7216.000 |   317261.000
> 
> gen/template/extremem
>                                 Category |  Count |         Total |      GeoMean |      Average |     Trim 0.1 |       StdDev |      Minimum |      Maximum
>         concurrent_evacuation_young_data |     65 |   9095084.000 |   113036.539 |   139924.369 |   137661.226 |    71091.273 |     7523.000 |   294442.000

LGTM. Impressed that templatization led to such a substantial improvement.
Should the 2-case switch in `ShenandoahGenerationalHeap::evacuate_object()` be converted to an `if-else` ?

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

Marked as reviewed by ysr (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28496#pullrequestreview-3508029430


More information about the shenandoah-dev mailing list