RFR: 8336742: Shenandoah: Add more verbose logging/stats for mark termination attempts

Aleksey Shipilev shade at openjdk.org
Fri Jul 26 17:56:32 UTC 2024


On Thu, 25 Jul 2024 21:03:54 GMT, Neethu Prasad <nprasad at openjdk.org> wrote:

>> Hm. Maybe even better to wrap it with:
>> 
>> 
>>     {
>>       ShenandoahTimingsTracker t(ShenandoahPhaseTimings::conc_mark_satb_flush_rendezvous, true);
>>       Handshake::execute(&flush_satb);
>>     }
>> 
>> 
>> Note the last, new argument that allows to merge multiple events into one. We need to separately make `ShenandoahTimingsTracker` report `gc,phases` log statement, imo.
>
> Do we want something like below for conc_mark_satb_flush_rendezvous phase?
> The log line is not useful for all the other usage of ShenandoahTimingTracker. So I'm thinking of logging only when boolean should_aggregate is set.
> 
> There will be two log lines when number of flush attempts = 2.
> 
> 
> [3.475s][info][gc,phases   ] GC(14) Recorded time for phase SATB Flush Rendezvous as 0.615854 ms
> [3.476s][info][gc,phases   ] GC(14) Recorded time for phase SATB Flush Rendezvous as 0.357069 ms
> 
> We can also have separate log line for start and end.

I don't think we need this phase tracking to print anything special, really. What we should probably do is to feed it into `ShenandoahTimingsTracker`, and let the rest of the infra deal with it as it sees fit. Nominally, show it in `gc+stats`. Later, we would need to consider printing `gc,phases` logging straight from `ShenandoahTimingsTracker`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20318#discussion_r1693421509


More information about the hotspot-gc-dev mailing list