Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8076265

Simplify deal_with_reference

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • hotspot
    • gc
    • b64
    • generic
    • generic

    Backports

      Description

        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.


        Attachments

          Issue Links

            Activity

              People

                kbarrett Kim Barrett
                kbarrett Kim Barrett
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: