-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: None
-
Component/s: hotspot
Whenever accountable change in ShenandoahHeapRegion, we may call recompute_total_used and recompute_total_affiliated to update the total accountings, they are in following cases:
* Memory allocation: total used is changed, total affiliated may be changed.
* Rebuild free-set
* Flip regions from mutator to collector/old collector partition.
total used and total affiliated are not often been read(mainly read by heuristics), there is no need to recompute them in the write-path, since there are way more write then read for these accounting fields.
Meanwhile recompute_total_used take 3 template parameters, and recompute_total_affiliated take 9 template parameters, which make the code hard to write and maintain.
* Memory allocation: total used is changed, total affiliated may be changed.
* Rebuild free-set
* Flip regions from mutator to collector/old collector partition.
total used and total affiliated are not often been read(mainly read by heuristics), there is no need to recompute them in the write-path, since there are way more write then read for these accounting fields.
Meanwhile recompute_total_used take 3 template parameters, and recompute_total_affiliated take 9 template parameters, which make the code hard to write and maintain.