RFR: 8371316: Adjust assertion (GC pause time cannot be smaller than the sum of each phase) in G1GCPhaseTimes::print

Matthias Baesken mbaesken at openjdk.org
Wed Nov 5 10:19:13 UTC 2025


it has been observed that the assertion (GC pause time cannot be smaller than the sum of each phase) in G1GCPhaseTimes::print cuts off the printed values, this should be adjusted to see the real values in error situations.
The current assert prints misleading messages like this (see [JDK-8370063](https://bugs.openjdk.org/browse/JDK-8370063)) :


# Internal Error (d:\priv\jenkins\ci2\client-home\workspace\openjdk-jdk-windows_x86_64-dbg\jdk\src\hotspot\share\gc\g1\g1GCPhaseTimes.cpp:571), pid=8976, tid=24744
# assert(_gc_pause_time_ms >= accounted_ms) failed: GC pause time(0.001ms) cannot be smaller than the sum of each phase(0.001ms).

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

Commit messages:
 - JDK-8371316

Changes: https://git.openjdk.org/jdk/pull/28147/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28147&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8371316
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/28147.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28147/head:pull/28147

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


More information about the hotspot-gc-dev mailing list