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

Move CM Thread execution state into G1CollectorState

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • tbd
    • 9
    • hotspot
    • gc

      The fix for JDK-8151336 introduced this code in do_collection_pause_at_safepoint():

        // We should not be doing initial mark unless the conc mark thread is running
        if (!_cmThread->should_terminate()) {
          // This call will decide whether this pause is an initial-mark
          // pause. If it is, during_initial_mark_pause() will return true
          // for the duration of this pause.
          g1_policy()->decide_on_conc_mark_initiation();
        }

      Ideally the check " if (!_cmThread->should_terminate())" should be inside decide_on_conc_mark_initiation() but G1CollectorPolicy does not know about the concurrent mark thread.

      Most of what decide_on_conc_mark_initiation() does is based on the information in G1CollectorState. So, it would be more natural to add a variable in G1CollectorState to keep track of whether or not the concurrent mark thread is still running.

            Unassigned Unassigned
            brutisso Bengt Rutisson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: