Integrated: 8369283: Improve trace logs in safepoint machinery

Aleksey Shipilev shade at openjdk.org
Thu Oct 9 18:51:00 UTC 2025


On Tue, 7 Oct 2025 12:42:20 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> During the performance investigations in safepoint machinery (notably [JDK-8350324](https://bugs.openjdk.org/browse/JDK-8350324)), I found the trace logging lacking. It would be good to improve it in order to finely profile various microscopic things like thread list walks, the blocking/resuming of Java threads, etc. For [JDK-8350324](https://bugs.openjdk.org/browse/JDK-8350324), for example, I want to be able to measure the Java thread delays if they assist in avalanche wakeups.
> 
> This leans heavily on unified logging and invariant clocks to do the right thing, but I think it is a fair compromise for simplicity. The configuration I found most useful for testing is:
> 
> 
> -Xlog:async -Xlog:safepoint=trace:file=safepoint.log:uptimenanos
> 
> 
> My tentative plan is to visualize this more comprehensively with a little tool that digests that log.
> 
> I am open for bikeshedding on logging wording. The log example is in the comment below.
> 
> Additional testing:
>  - [x] Ad-hoc log peeking
>  - [x] Linux x86_64 server fastdebug, `tier1`
>  - [x] Linux x86_64 server fastdebug, `all`

This pull request has now been integrated.

Changeset: 1992b69a
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/1992b69a4794d1f2f65eaeb6dbb1e1e23a948b6e
Stats:     38 lines in 2 files changed: 28 ins; 7 del; 3 mod

8369283: Improve trace logs in safepoint machinery

Reviewed-by: fbredberg, dholmes, rehn

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

PR: https://git.openjdk.org/jdk/pull/27673


More information about the hotspot-dev mailing list