Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8236299 | 15 | Stefan Johansson | P4 | Resolved | Fixed | team |
Description
The signatures of these two functions can be simplified quite a bit since we always pass in the same values for them.
void free_region(HeapRegion* hr, FreeRegionList* free_list, bool skip_remset, bool skip_hot_card_cache = false, bool locked = false);
Here we always pass false for skip_remset and true for locked, so these can be removed. The values are in turn passed into hr_clear() where they are used to determine if we should call clear() or clear_locked() for the remset.
If we simplify free_region, we can do the same for:
void hr_clear(bool skip_remset, bool clear_space, bool locked = false);
There is actually a call to hr_clear where the default value for locked is used, but that is during initialization of the region and at that point we know nobody else can modify the remset so we might as well call clear_locked().
void free_region(HeapRegion* hr, FreeRegionList* free_list, bool skip_remset, bool skip_hot_card_cache = false, bool locked = false);
Here we always pass false for skip_remset and true for locked, so these can be removed. The values are in turn passed into hr_clear() where they are used to determine if we should call clear() or clear_locked() for the remset.
If we simplify free_region, we can do the same for:
void hr_clear(bool skip_remset, bool clear_space, bool locked = false);
There is actually a call to hr_clear where the default value for locked is used, but that is during initialization of the region and at that point we know nobody else can modify the remset so we might as well call clear_locked().
Attachments
Issue Links
- backported by
-
JDK-8236299 Remove unnecessary parameters from G1CollectedHeap::free_region and HeapRegion::hr_clear
-
- Resolved
-