RFR: 8369283: Improve trace logs in safepoint machinery

Aleksey Shipilev shade at openjdk.org
Tue Oct 7 12:49:13 UTC 2025


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.

This leans heavily on unified logging to do the right thing. 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
 - [ ] Linux x86_64 server fastdebug, `tier1`

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

Commit messages:
 - Work

Changes: https://git.openjdk.org/jdk/pull/27673/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27673&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8369283
  Stats: 27 lines in 3 files changed: 13 ins; 11 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/27673.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27673/head:pull/27673

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


More information about the hotspot-dev mailing list