RFR: 8334147: Shenandoah: Avoid taking lock for disabled free set logging [v10]

Xiaolong Peng xpeng at openjdk.org
Thu Jun 27 22:32:19 UTC 2024


On Thu, 27 Jun 2024 20:55:44 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 343:
>> 
>>> 341: 
>>> 342:   void recycle_trash();
>>> 343:   // log status, assuming lock has alredy been acquired by the caller.
>> 
>> "already". Also see previous comment about removing enablement check in `log_status` and asserting. Will then need to check other callers and retest.
>
> We should keep it, finish_rebuild also call log_status since it already holds the lock, removing  enablement check will affect the log behavior in finish_rebuild.

I got your point, but we have two enablement checks, one for Info one for Debug, we can't remove it from log_status.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19915#discussion_r1657881647


More information about the hotspot-gc-dev mailing list