RFR: 8338535: GenShen: some style improvements to source code implementationle [v2]

William Kemper wkemper at openjdk.org
Mon Aug 19 21:37:09 UTC 2024


On Mon, 19 Aug 2024 21:14:26 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> 1. Hide union data structure behind accessor methods for ShenandoahHeuristics::RegionData._u
>> 2. Change type of ShenandoahCollectionSet::establish_preselected from byte* to byte[] to clarify intended usage.
>> 3. Remove unhelpful comment from shenandoahFullGC.cpp
>
> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix name of zero_RegionData function

Changes requested by wkemper (Committer).

src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.hpp line 92:

> 90:   } RegionData;
> 91: 
> 92:   static inline void set_RegionData_region_and_garbage(RegionData& region_data, ShenandoahHeapRegion* region, size_t garbage) {

Can these static functions just be instance methods? call sites would then be:
```C++
region_data->set_region_and_garbage(region, garbage);

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

PR Review: https://git.openjdk.org/shenandoah/pull/475#pullrequestreview-2246498696
PR Review Comment: https://git.openjdk.org/shenandoah/pull/475#discussion_r1722372855


More information about the shenandoah-dev mailing list