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

Xiaolong Peng xpeng at openjdk.org
Thu Jun 27 15:55:36 UTC 2024


On Thu, 27 Jun 2024 08:21:12 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make log_status_with_heap_locked public
>
> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1139:
> 
>> 1137: #ifdef ASSERT
>> 1138:    || LogTarget(Debug, gc, free)::is_enabled()
>> 1139: #endif
> 
> OK, I see it matches what `log_status_with_heap_locked` is already doing. 
> 
> For future reference, a shorter variant of this would be:
> 
> 
>  if (LogTarget(Info, gc, free)::is_enabled() DEBUG_ONLY(|| LogTarget(Debug, gc, free)::is_enabled()) {
> 
> 
> ...but this variant is also good.

Updated the code to shorter variant.

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

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


More information about the hotspot-gc-dev mailing list