RFR: 8336299: Improve GCLocker stall diagnostics [v4]
Thomas Schatzl
tschatzl at openjdk.org
Fri Aug 2 08:01:33 UTC 2024
On Thu, 1 Aug 2024 21:13:48 GMT, Neethu Prasad <nprasad at openjdk.org> wrote:
>> **Notes**
>> Adding logs to get more visibility into how fast a thread resumes from allocation stall.
>>
>> **Testing**
>> * tier 1, tier 2, hotspot_gc tests.
>>
>> Example log messages
>>
>> 1. Last thread exiting. Performing GC after exiting critical section. Thread "main" 0 locked.
>>
>> 2. Thread exiting critical region Thread "main" 0 locked.
>>
>> 3. Thread stalled by JNI critical section. Resumed after 586ms. Thread "Thread-0".
>>
>> 4. Thread blocked to enter critical region. Resumed after 1240ms. Thread "SIGINT handler".
>
> Neethu Prasad has updated the pull request incrementally with one additional commit since the last revision:
>
> Address formating issue and code clean up feedback
Changes requested by tschatzl (Reviewer).
src/hotspot/share/gc/shared/gcLocker.cpp line 50:
> 48: public:
> 49: GCLockerTimingDebugLogger(const char* log_message) :
> 50: _log_message(log_message) {
Indentation of the entire class is one level too deep; the first `private` visibility specifier can be ommitted.
There are two spaces before `_log_message`.
src/hotspot/share/gc/shared/gcLocker.cpp line 53:
> 51: assert(_log_message != nullptr, "GC locker debug message must be set.");
> 52: _start = Ticks::now();
> 53: }
I think this `}` should align with the method name, i.e. the body of this constructor seems to be nested one level too deep.
-------------
PR Review: https://git.openjdk.org/jdk/pull/20277#pullrequestreview-2214937023
PR Review Comment: https://git.openjdk.org/jdk/pull/20277#discussion_r1701456382
PR Review Comment: https://git.openjdk.org/jdk/pull/20277#discussion_r1701458868
More information about the hotspot-gc-dev
mailing list