RFR: 8346568: G1: Other time can be negative [v3]

Thomas Schatzl tschatzl at openjdk.org
Tue Apr 22 07:47:56 UTC 2025


On Sat, 19 Apr 2025 05:08:26 GMT, Sangheon Kim <sangheki at openjdk.org> wrote:

>> 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:
> 
>  - Review from Thomas
>  - Separate measurement for cleanup

Marked as reviewed by tschatzl (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/24454#pullrequestreview-2783156317


More information about the hotspot-gc-dev mailing list