RFR: 8329659: Serial: Extract allowed_dead_ratio from ContiguousSpace

Albert Mingkun Yang ayang at openjdk.org
Fri Apr 5 16:52:09 UTC 2024


On Fri, 5 Apr 2024 16:37:29 GMT, Guoxiong Li <gli at openjdk.org> wrote:

> Hi all,
> 
> This patch moves the `allowed_dead_ratio` related content from `ContiguousSpace` to `DeadSpacer`.
> 
> The tests `make test-tier1_gc` passed locally. Thanks for taking the time to review.
> 
> Best Regards,
> -- Guoxiong

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;

?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18661#discussion_r1553996229


More information about the hotspot-gc-dev mailing list