Top


定義場所(file name)

hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp

名前(function name)

void G1RemSet::updateRS(DirtyCardQueue* into_cset_dcq, int worker_i) {

本体部(body)

  {- -------------------------------------------
  (1) 処理の開始時間を記録しておく.
      ---------------------------------------- -}

      double start = os::elapsedTime();

  {- -------------------------------------------
  (1) RefineRecordRefsIntoCSCardTableEntryClosure を使って, 
      collection set 外から collection set 内を指しているポインタを発見し, ついでに Remembered Set を更新する (?? #TODO)
      ---------------------------------------- -}

      // Apply the given closure to all remaining log entries.
      RefineRecordRefsIntoCSCardTableEntryClosure into_cset_update_rs_cl(_g1, into_cset_dcq);
      _g1->iterate_dirty_card_closure(&into_cset_update_rs_cl, into_cset_dcq, false, worker_i);

  {- -------------------------------------------
  (1) (verify)
      (RS log の中に dirty card が残っていないことを確認)
      ---------------------------------------- -}

      // Now there should be no dirty cards.
      if (G1RSLogCheckCardTable) {
        CountNonCleanMemRegionClosure cl(_g1);
        _ct_bs->mod_card_iterate(&cl);
        // XXX This isn't true any more: keeping cards of young regions
        // marked dirty broke it.  Need some reasonable fix.
        guarantee(cl.n() == 0, "Card table should be clean.");
      }

  {- -------------------------------------------
  (1) 処理に掛かった時間を G1CollectorPolicy オブジェクトに記録.
      ---------------------------------------- -}

      _g1p->record_update_rs_time(worker_i, (os::elapsedTime() - start) * 1000.0);
    }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.