Integrated: Move affiliation and mode out of ShenandoahGenerationalMode

Aleksey Shipilev shade at openjdk.org
Mon Apr 10 17:11:37 UTC 2023


On Thu, 6 Apr 2023 11:40:01 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> `ShenandoahGenerationalMode` currently carries `ShenandoahRegionAffiliation` and `GenerationMode` definitions, plus some utility methods. This forces inclusions of `shenandoahGenerationalMode.hpp` in weird places. Plus, we expose generic helper methods in global symbol table, which might clash with symbols from other compilation units, producing linkage errors. We have the unspoken rule to prepend every Shenandoah-related global symbol with `(s|S)henandoah` to avoid this.
> 
> This PR moves `ShenandoahRegionAffiliation` into separate header file, includes it in few places. The usages are rewritten to use helper methods, which drastically limits the number of files we need to include new header into. It also renames it to `ShenandoahAffiliation`, since I believe there is not ambiguity here and shorter identifiers are more readable.
> 
> The same is done with `GenerationMode`, but PR cuts it a bit deeper by renaming it to `ShenandoahGenerationType`.
> 
> Most substitutions were done mechanically, but please review those with care. Thanks!
> 
> Testing:
>  - [x] macos-aarch64-server-fastdebug build
>  - [x] macos-aarch64-server-fastdebug `hotspot_gc_shenandoah` (some pre-existing failures)

This pull request has now been integrated.

Changeset: 461f0831
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/shenandoah/commit/461f083162a8a9ea7adb8d6229b71124a98ef668
Stats:     424 lines in 43 files changed: 132 ins; 87 del; 205 mod

Move affiliation and mode out of ShenandoahGenerationalMode

Reviewed-by: kdnilsen, wkemper

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

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


More information about the shenandoah-dev mailing list