RFR: 8359110: Log accumulated GC and process CPU time upon VM exit [v8]
David Holmes
dholmes at openjdk.org
Tue Jun 17 05:59:31 UTC 2025
On Mon, 16 Jun 2025 12:50:17 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:
>
> operation_is_gc -> is_gc_operation per @stefank suggestion
src/hotspot/share/gc/shared/vtimeScope.inline.hpp line 29:
> 27: #include "logging/log.hpp"
> 28: #include "memory/universe.hpp"
> 29: #include "runtime/vmThread.hpp"
Nit: if you put this in the .hpp file you can do away with the forward decl for VMThread that is in there.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25779#discussion_r2151383344
More information about the hotspot-runtime-dev
mailing list