RFR: 8346568: G1: Other time can be negative
Sangheon Kim
sangheki at openjdk.org
Fri Apr 4 21:21:22 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. Concurrent task execution time
- Sometimes just triggering concurrent work takes 2 digit milliseconds. Changed to add only initiating time on sum_of_sub_phases and keep displaying concurrent tasks' average execution time.
Testing: tier 1 ~ 5
-------------
Commit messages:
- Separate measurement for cleanup
Changes: https://git.openjdk.org/jdk/pull/24454/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24454&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8346568
Stats: 61 lines in 4 files changed: 35 ins; 17 del; 9 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