RFR: 8350854: Include thread counts in safepoint logging [v2]

Xiaolong Peng xpeng at openjdk.org
Tue Mar 4 19:45:33 UTC 2025


> The PR is to add thread counts in safepoint logging. In recent work, we notice the number of Java thread may affects time to reach/leave safepoint hardly in some cases, but safepoint logging doesn't have thread counts, thread counts are printed only with 'safepoint+stats' log. 
> 
> Given in many cases, we only have `safepoint` log enabled, not `safepoint+stats`, it make sense to add thread count to 'safepoint' logging. 
> 
> Here is example log output with the change:
> 
> [15.240s][info][safepoint      ] Safepoint "ShenandoahFinalMarkStartEvac", Time since last: 3527459 ns, Reaching safepoint: 78666 ns, At safepoint: 821625 ns, Leaving safepoint: 1472167 ns, Total: 2372458 ns, Threads: 3 runnable, 1038 total
> 
> 
> 
> ### Test
> - [x] Tire1
> - [x] Tire2

Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:

  Use format %d instead of INT32_FORMAT

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/23838/files
  - new: https://git.openjdk.org/jdk/pull/23838/files/10707b16..874791f4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23838&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23838&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/23838.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23838/head:pull/23838

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


More information about the hotspot-runtime-dev mailing list