RFR: 8329659: Serial: Extract allowed_dead_ratio from ContiguousSpace [v2]
Guoxiong Li
gli at openjdk.org
Sat Apr 6 07:39:28 UTC 2024
On Fri, 5 Apr 2024 16:49:31 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Simplify
>
> src/hotspot/share/gc/serial/serialFullGC.cpp line 100:
>
>> 98: public:
>> 99: DeadSpacer(ContiguousSpace* space, size_t allowed_dead_ratio) : _allowed_deadspace_words(0), _space(space) {
>> 100: _active = allowed_dead_ratio > 0;
>
> How about
>
>
> size_t ratio = (_space == SerialHeap::heap()->old_gen()->space())
> ? MarkSweepDeadRatio
> : 0;
>
> ?
If each space have a `allowed_dead_ratio`, it is easy to modify one of them and meet the changeable demand in the future. But these years, we rarely have a demand to revise them. Maybe the previous code and this current patch are both over-designed. Fixed just as you suggested.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18661#discussion_r1554542787
More information about the hotspot-gc-dev
mailing list