RFR: 8336299: Improve GCLocker stall diagnostics [v6]

Thomas Schatzl tschatzl at openjdk.org
Tue Aug 13 08:03:51 UTC 2024


On Tue, 13 Aug 2024 06:33:31 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Neethu Prasad has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   address feedback regarding logger potentially getting instantiated multiple times
>
> src/hotspot/share/gc/shared/gcLocker.cpp line 58:
> 
>> 56:       ResourceMark rm; // JavaThread::name() allocates to convert to UTF8
>> 57:       const Tickspan elapsed_time = Ticks::now() - _start;
>> 58:       log.debug("%s Resumed after " UINT64_FORMAT "ms. Thread \"%s\".", _log_message, elapsed_time.milliseconds(), Thread::current()->name());
> 
> Maybe `UINT64_FORMAT` can be replaced by `%zu`?

`Tickspan::milliseconds()` returns an `uint64_t` which is not `size_t`; the `z` length modifier is only for `size_t` and would be wrong to use here on 32 bit systems.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20277#discussion_r1714850063


More information about the hotspot-gc-dev mailing list