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

William Kemper wkemper at openjdk.org
Thu Apr 6 16:49:45 UTC 2023


On Thu, 6 Apr 2023 15:22:54 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
>>  - [ ] 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

Marked as reviewed by wkemper (Committer).

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

PR Review: https://git.openjdk.org/shenandoah/pull/246#pullrequestreview-1375239606


More information about the shenandoah-dev mailing list