RFR: 8346568: G1: Other time can be negative [v2]
Sangheon Kim
sangheki at openjdk.org
Fri Apr 18 19:09:33 UTC 2025
> Other time described in this bug is displayed at G1GCPhaseTimes::print_other(total_measured_time - sum_of_sub_phases). And the value can be negative for 3 reasons.
> 1. Different scope of measurement
> - 3 variables is out of scope from total_measured_time. Those used for wait-root-region-scan, verify-before/after.
> (_root_region_scan_wait_time_ms, _cur_verify_before_time_ms and _cur_verify_after_time_ms)
> - Changed not to be included in sum_of_sub_phases.
> - One may want to include them in total_measured_time but I think it is better to be addressed in a separate ticket.
> 2. Duplicated measurement
> - Initial and optional evacuation time include nmethod-cleanup-time, so separated them as we are already measuring them. As there is no public getter, just added cleanup time when those evacuation time are used internally.
> 3. Pre Concurrent task execution time
> - Sometimes the difference between the existing average time and pre-concurrent work is 2 digit milliseconds. Changed to measure exact time rather than accumulating the average value to sum_of_sub_phases and keep displaying concurrent tasks' average execution time.
>
> Testing: tier 1 ~ 5
Sangheon Kim has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
- Merge branch 'openjdk:master' into JDK-8346568-G1-negative-time
- Separate measurement for cleanup
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/24454/files
- new: https://git.openjdk.org/jdk/pull/24454/files/1c1750fd..d5f6b641
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=24454&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=24454&range=00-01
Stats: 257042 lines in 1817 files changed: 57470 ins; 193153 del; 6419 mod
Patch: https://git.openjdk.org/jdk/pull/24454.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24454/head:pull/24454
PR: https://git.openjdk.org/jdk/pull/24454
More information about the hotspot-gc-dev
mailing list