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

Eliminate filter_thread_buffers

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b20

      Description

      SATBMarkQueueSet::filter_thread_buffers is called by G1 during each pause's root processing stage. The purpose of this call is to remove young objects from the queues, since they will be moved and the queue entries won't be updated and so will be stale.

      However, full queue filtering (SATBMarkQueue::filter) will already take care of this. And even if full queue filtering is disabled (JDK-8079167), marking will eventually take care of it (the mark queue stacks may also contain such entries).

      Another indication that it isn't necessary is that the filtering is only applied to the per-thread SATB queues, and is not applied to the completed buffers in the qset.

      So unless there is some other reason for it, that function is just moving work from mutator or concurrent marking threads into GC pauses. That doesn't seem like the right tradeoff.

      And if it were needed, the current predicate for calling it seems not quite right. It is checking the collector state's mark_or_rebuild_in_progress(), but we should only care about whether marking is active. It seems like that test shouldn't be needed at all, and instead filter_thread_buffers could check the qset's active state. But really, I think this function should just be eliminated.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kbarrett Kim Barrett
              Reporter:
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: