RFR: Move affiliation and mode out of ShenandoahGenerationalMode [v3]

Aleksey Shipilev shade at openjdk.org
Mon Apr 10 16:20:11 UTC 2023


> `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)

Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains ten additional commits since the last revision:

 - Merge branch 'master' into move-affiliation-mode
 - Whitespace
 - Fix Zero builds
 - Missed the spot
 - More cleanups
 - GenerationMode renames, 1
 - More work
 - More work
 - Work

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

Changes:
  - all: https://git.openjdk.org/shenandoah/pull/246/files
  - new: https://git.openjdk.org/shenandoah/pull/246/files/7c2bc479..d4807b0d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=shenandoah&pr=246&range=02
 - incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=246&range=01-02

  Stats: 20059 lines in 688 files changed: 9633 ins; 8596 del; 1830 mod
  Patch: https://git.openjdk.org/shenandoah/pull/246.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/246/head:pull/246

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


More information about the shenandoah-dev mailing list