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

Specialize HeapRegion::oops_on_card_seq_iterate_careful() for use during concurrent refinement and updating the rset

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b21

      Description

      HeapRegion::oops_on_card_seq_iterate_careful() is currently used to walk through the heap corresponding to cards both during concurrent refinement and the update RS phase during GC.

      For this reason it does too much particularly during gc: the filter_young and the card_ptr are only used during refinement actually used, additionally some code that is not necessary during the update RS phase is executed.

      In particular:
        - during update RS, filter young is always false, and card_ptr is always NULL.
        - the check whether we are during gc could be removed then
        - during GC it is not possible to run into an unparseable point, so all the corresponding checks are superfluous there
        - I am not sure if the loop to get from the first block_start() call to the first object reaching into the given memory range is actually necessary. A single check whether the parseable point has been reached is probably sufficient (if any), given that it should be impossible to actually get a card in the queue that has not been allocated into at all. It is likely a renmant of the previous use of block_start_careful() instead of block_start.

      The code should get slightly faster too, although probably not noticeable.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tschatzl Thomas Schatzl
                Reporter:
                tschatzl Thomas Schatzl
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: