RFR: 8336299: Improve GCLocker stall diagnostics
Thomas Schatzl
tschatzl at openjdk.org
Wed Jul 24 08:30:33 UTC 2024
On Mon, 22 Jul 2024 13:52:41 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.
>
>
>
> Last thread exiting. Performing GC after exiting critical section. Thread "main" 0 locked.
>
> Thread exiting critical region Thread "main" 0 locked.
It might also be nice to give an example of such a new message in the CR.
src/hotspot/share/gc/shared/gcLocker.cpp line 124:
> 122: }
> 123:
> 124: elapsedTimer elapsed_timer;
In GC code we tend to use the newer `Ticks` and `Tickspan` API, not `elapsedTimer`. Only Parallel GC uses it at this point afaict (or just `os::elapsedTime()`/`os::elapsed_counter()`).
Maybe it's even worth to add a special class that can be used with scopes to hide all that including the manual call to `log_debug_jni` (automatically done in the destructor). Probably not really useful.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20277#issuecomment-2247213479
PR Review Comment: https://git.openjdk.org/jdk/pull/20277#discussion_r1689356411
More information about the hotspot-gc-dev
mailing list