< prev index next >

src/share/vm/gc/g1/g1RemSet.cpp

Print this page




 407 G1Mux2Closure::G1Mux2Closure(OopClosure *c1, OopClosure *c2) :
 408   _c1(c1), _c2(c2) { }
 409 
 410 G1UpdateRSOrPushRefOopClosure::
 411 G1UpdateRSOrPushRefOopClosure(G1CollectedHeap* g1h,
 412                               G1RemSet* rs,
 413                               G1ParPushHeapRSClosure* push_ref_cl,
 414                               bool record_refs_into_cset,
 415                               uint worker_i) :
 416   _g1(g1h), _g1_rem_set(rs), _from(NULL),
 417   _record_refs_into_cset(record_refs_into_cset),
 418   _push_ref_cl(push_ref_cl), _worker_i(worker_i) { }
 419 
 420 // Returns true if the given card contains references that point
 421 // into the collection set, if we're checking for such references;
 422 // false otherwise.
 423 
 424 bool G1RemSet::refine_card(jbyte* card_ptr, uint worker_i,
 425                            bool check_for_refs_into_cset) {
 426   assert(_g1->is_in_exact(_ct_bs->addr_for(card_ptr)),
 427          err_msg("Card at "PTR_FORMAT" index "SIZE_FORMAT" representing heap at "PTR_FORMAT" (%u) must be in committed heap",
 428                  p2i(card_ptr),
 429                  _ct_bs->index_for(_ct_bs->addr_for(card_ptr)),
 430                  p2i(_ct_bs->addr_for(card_ptr)),
 431                  _g1->addr_to_region(_ct_bs->addr_for(card_ptr))));
 432 
 433   // If the card is no longer dirty, nothing to do.
 434   if (*card_ptr != CardTableModRefBS::dirty_card_val()) {
 435     // No need to return that this card contains refs that point
 436     // into the collection set.
 437     return false;
 438   }
 439 
 440   // Construct the region representing the card.
 441   HeapWord* start = _ct_bs->addr_for(card_ptr);
 442   // And find the region containing it.
 443   HeapRegion* r = _g1->heap_region_containing(start);
 444 
 445   // Why do we have to check here whether a card is on a young region,
 446   // given that we dirty young regions and, as a result, the
 447   // post-barrier is supposed to filter them out and never to enqueue




 407 G1Mux2Closure::G1Mux2Closure(OopClosure *c1, OopClosure *c2) :
 408   _c1(c1), _c2(c2) { }
 409 
 410 G1UpdateRSOrPushRefOopClosure::
 411 G1UpdateRSOrPushRefOopClosure(G1CollectedHeap* g1h,
 412                               G1RemSet* rs,
 413                               G1ParPushHeapRSClosure* push_ref_cl,
 414                               bool record_refs_into_cset,
 415                               uint worker_i) :
 416   _g1(g1h), _g1_rem_set(rs), _from(NULL),
 417   _record_refs_into_cset(record_refs_into_cset),
 418   _push_ref_cl(push_ref_cl), _worker_i(worker_i) { }
 419 
 420 // Returns true if the given card contains references that point
 421 // into the collection set, if we're checking for such references;
 422 // false otherwise.
 423 
 424 bool G1RemSet::refine_card(jbyte* card_ptr, uint worker_i,
 425                            bool check_for_refs_into_cset) {
 426   assert(_g1->is_in_exact(_ct_bs->addr_for(card_ptr)),
 427          err_msg("Card at " PTR_FORMAT " index " SIZE_FORMAT " representing heap at " PTR_FORMAT " (%u) must be in committed heap",
 428                  p2i(card_ptr),
 429                  _ct_bs->index_for(_ct_bs->addr_for(card_ptr)),
 430                  p2i(_ct_bs->addr_for(card_ptr)),
 431                  _g1->addr_to_region(_ct_bs->addr_for(card_ptr))));
 432 
 433   // If the card is no longer dirty, nothing to do.
 434   if (*card_ptr != CardTableModRefBS::dirty_card_val()) {
 435     // No need to return that this card contains refs that point
 436     // into the collection set.
 437     return false;
 438   }
 439 
 440   // Construct the region representing the card.
 441   HeapWord* start = _ct_bs->addr_for(card_ptr);
 442   // And find the region containing it.
 443   HeapRegion* r = _g1->heap_region_containing(start);
 444 
 445   // Why do we have to check here whether a card is on a young region,
 446   // given that we dirty young regions and, as a result, the
 447   // post-barrier is supposed to filter them out and never to enqueue


< prev index next >