RFR: 8235427: Remove unnecessary parameters from G1CollectedHeap::free_region and HeapRegion::hr_clear

Thomas Schatzl thomas.schatzl at oracle.com
Tue Dec 10 15:33:43 UTC 2019


Hi,

On 10.12.19 12:27, Stefan Johansson wrote:
> Hi,
> 
> Please review this cleanup to get rid of some unnecessary boolean passing.
> 
> Issue: https://bugs.openjdk.java.net/browse/JDK-8235427
> Webrev: http://cr.openjdk.java.net/~sjohanss/8235427/00/
> 
> Summary
> While reviewing the fix for JDK-8165443 we realized that some boolean 
> parameters passed to G1CollectedHeap::free_region always had the same 
> values and could therefore be removed. When looking a bit closer it 
> turns out even more parameters can be skipped.
> 
> The two things that are really changed when it comes to functionality in 
> this patch are:
> 1. When freeing the CSet we previously always cleared the hot card cache 
> for old regions. We now rely on this being done by free_region and this 
> will have the effect that for evacuation failures we won't clear the hot 
> card cache for those regions having failures. I've discussed this with a 
> couple of others and we can't see any problems with this.
> 
> 2. When creating heap regions we previously used the default value false 
> for locked when initializing heap regions, but we know this code path 
> will never be called in parallel so we can safely remove this parameter 
> and always do rem_set()->clear_locked() in hr_clear().
> 
> Testing
> Mach5 tier1-3 passed, currently running tier4-5 as well.
> 

   looks good.

Thomas




More information about the hotspot-gc-dev mailing list