src/share/vm/memory/cardTableModRefBS.cpp

changeset 2889
fc2b798ab316
parent 2849
063382f9b575
child 3294
bca17e38de00
     1.1 --- a/src/share/vm/memory/cardTableModRefBS.cpp	Fri May 06 09:45:18 2011 +0200
     1.2 +++ b/src/share/vm/memory/cardTableModRefBS.cpp	Tue May 10 00:33:21 2011 -0700
     1.3 @@ -455,25 +455,29 @@
     1.4    return true;
     1.5  }
     1.6  
     1.7 -
     1.8  void CardTableModRefBS::non_clean_card_iterate_possibly_parallel(Space* sp,
     1.9                                                                   MemRegion mr,
    1.10 -                                                                 DirtyCardToOopClosure* dcto_cl,
    1.11 -                                                                 ClearNoncleanCardWrapper* cl) {
    1.12 +                                                                 OopsInGenClosure* cl,
    1.13 +                                                                 CardTableRS* ct) {
    1.14    if (!mr.is_empty()) {
    1.15      int n_threads = SharedHeap::heap()->n_par_threads();
    1.16      if (n_threads > 0) {
    1.17  #ifndef SERIALGC
    1.18 -      non_clean_card_iterate_parallel_work(sp, mr, dcto_cl, cl, n_threads);
    1.19 +      non_clean_card_iterate_parallel_work(sp, mr, cl, ct, n_threads);
    1.20  #else  // SERIALGC
    1.21        fatal("Parallel gc not supported here.");
    1.22  #endif // SERIALGC
    1.23      } else {
    1.24        // We do not call the non_clean_card_iterate_serial() version below because
    1.25        // we want to clear the cards (which non_clean_card_iterate_serial() does not
    1.26 -      // do for us), and the ClearNoncleanCardWrapper closure itself does the work
    1.27 -      // of finding contiguous dirty ranges of cards to process (and clear).
    1.28 -      cl->do_MemRegion(mr);
    1.29 +      // do for us): clear_cl here does the work of finding contiguous dirty ranges
    1.30 +      // of cards to process and clear.
    1.31 +
    1.32 +      DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, precision(),
    1.33 +                                                       cl->gen_boundary());
    1.34 +      ClearNoncleanCardWrapper clear_cl(dcto_cl, ct);
    1.35 +
    1.36 +      clear_cl.do_MemRegion(mr);
    1.37      }
    1.38    }
    1.39  }

mercurial