JDK-8030815 : Code roots are not accounted for in region prediction
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-12-19
  • Updated: 2023-09-25
  • Resolved: 2023-09-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b16Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Description
In JDK-7145569 per-region code root remembered sets were introduced.

However these per-region remembered sets are not accounted for in the region prediction.

I.e. G1CollectorPolicy::predict_region_elapsed_time_ms() does not take code roots into account.

This negatively affects pause time prediction performance
Comments
Changeset: d0385712 Author: Thomas Schatzl <tschatzl@openjdk.org> Date: 2023-09-19 08:23:57 +0000 URL: https://git.openjdk.org/jdk/commit/d0385712130ad1073741d7861f6bee432f8d7210
19-09-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15632 Date: 2023-09-08 10:06:10 +0000
13-09-2023

I.e. this code taking remset into account: double G1Policy::predict_region_merge_scan_time(HeapRegion* hr, bool for_young_only_phase) const { size_t rs_length = hr->rem_set()->occupied(); size_t scan_card_num = _analytics->predict_scan_card_num(rs_length, for_young_only_phase); return _analytics->predict_card_merge_time_ms(rs_length, for_young_only_phase) + _analytics->predict_card_scan_time_ms(scan_card_num, for_young_only_phase); } or any other prediction does not take code roots into account.
01-09-2023

As the description suggests, this change is about improving prediction accuracy, not throughput.
03-03-2016

According to performance testing suggested change did not give any improvments
03-03-2016

Particularly code root migration as part of the costs for the per-region code root remembered set takes a considerable time, see JDK-8030157
19-12-2013