RFR: 8359110: Log accumulated GC and process CPU time upon VM exit [v5]

Jonas Norlinder duke at openjdk.org
Mon Jun 16 09:19:32 UTC 2025


On Fri, 13 Jun 2025 20:11:04 GMT, Jonas Norlinder <duke at openjdk.org> wrote:

>> Add support to log CPU cost for GC during VM exit with `-Xlog:gc`.
>> 
>> 
>> [1.500s][info ][gc] GC CPU cost: 1.75%
>> 
>> 
>> Additionally, detailed information may be retrieved with `-Xlog:gc=trace`
>> 
>> 
>> [1.500s][trace][gc] Process CPU time: 4.945370s
>> [1.500s][trace][gc] GC CPU time: 0.086382s
>> [1.500s][info ][gc] GC CPU cost: 1.75%
>
> Jonas Norlinder has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add CPU time tracking for string deduplication to log_gc_vtime

src/hotspot/share/runtime/vmThread.cpp line 278:

> 276:     PerfTraceTime vm_op_timer(perf_accumulated_vm_operation_time());
> 277:     HOTSPOT_VMOPS_BEGIN(
> 278:                      (char *) op->name(), strlen(op->name()),

@dholmes-ora given that I'm editing `VMThread::evaluate_operation` and your comments about code style - do you want me to also change this type cast to `(char*)` to align with the preferred style?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25779#discussion_r2149450013


More information about the hotspot-runtime-dev mailing list