JDK-8076265 : Simplify deal_with_reference
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-03-30
  • Updated: 2015-09-29
  • Resolved: 2015-04-09
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.
8u60Fixed 9 b64Fixed
Related Reports
Blocks :  
The behavior of CMTask::deal_with_reference is conditionalized on the _CHECK_BOTH_FINGERS_ macro.  That conditionalization involves some unnecessary code duplication, and could be simplified.

However, that macro is always 1, with no way to modify it other than by editing the source or via build arguments (I assume there is a way to insert a -D option into compiler invocations).  The macro and the conditionalization were added in 2011 (JDK-7046558: G1: concurrent marking optimizations).  Anyone who wants to do performance comparisons can easily reintroduce whatever conditionalizations they need; there's no need to keep untested cruft in the code base.

In addition, the local finger testing first checks for NULL _finger, then checks for NULL _curr_region, and assumes non-NULL _curr_region implies _region_limit is not NULL.  However, either all three of those values are set based on a region, or all three are NULL, never a mix.  So the NULL checks guarding current region range checking can be simplified.

This is a cleanup task in preparation for JDK-8069367.