RFR: Move affiliation and mode out of ShenandoahGenerationalMode [v2]
Aleksey Shipilev
shade at openjdk.org
Thu Apr 6 15:22:54 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
> - [ ] macos-aarch64-server-fastdebug `hotspot_gc_shenandoah` (some pre-existing failures)
Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
Fix Zero builds
-------------
Changes:
- all: https://git.openjdk.org/shenandoah/pull/246/files
- new: https://git.openjdk.org/shenandoah/pull/246/files/1fab6a32..7c2bc479
Webrevs:
- full: https://webrevs.openjdk.org/?repo=shenandoah&pr=246&range=01
- incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=246&range=00-01
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 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