equal
deleted
inserted
replaced
417 |
417 |
418 void OtherRegionsTable::print_from_card_cache() { |
418 void OtherRegionsTable::print_from_card_cache() { |
419 FromCardCache::print(); |
419 FromCardCache::print(); |
420 } |
420 } |
421 |
421 |
422 void OtherRegionsTable::add_reference(OopOrNarrowOopStar from, int tid) { |
422 void OtherRegionsTable::add_reference(OopOrNarrowOopStar from, uint tid) { |
423 uint cur_hrm_ind = hr()->hrm_index(); |
423 uint cur_hrm_ind = hr()->hrm_index(); |
424 |
424 |
425 if (G1TraceHeapRegionRememberedSet) { |
425 if (G1TraceHeapRegionRememberedSet) { |
426 gclog_or_tty->print_cr("ORT::add_reference_work(" PTR_FORMAT "->" PTR_FORMAT ").", |
426 gclog_or_tty->print_cr("ORT::add_reference_work(" PTR_FORMAT "->" PTR_FORMAT ").", |
427 from, |
427 from, |
433 int from_card = (int)(uintptr_t(from) >> CardTableModRefBS::card_shift); |
433 int from_card = (int)(uintptr_t(from) >> CardTableModRefBS::card_shift); |
434 |
434 |
435 if (G1TraceHeapRegionRememberedSet) { |
435 if (G1TraceHeapRegionRememberedSet) { |
436 gclog_or_tty->print_cr("Table for [" PTR_FORMAT "...): card %d (cache = %d)", |
436 gclog_or_tty->print_cr("Table for [" PTR_FORMAT "...): card %d (cache = %d)", |
437 hr()->bottom(), from_card, |
437 hr()->bottom(), from_card, |
438 FromCardCache::at((uint)tid, cur_hrm_ind)); |
438 FromCardCache::at(tid, cur_hrm_ind)); |
439 } |
439 } |
440 |
440 |
441 if (FromCardCache::contains_or_replace((uint)tid, cur_hrm_ind, from_card)) { |
441 if (FromCardCache::contains_or_replace(tid, cur_hrm_ind, from_card)) { |
442 if (G1TraceHeapRegionRememberedSet) { |
442 if (G1TraceHeapRegionRememberedSet) { |
443 gclog_or_tty->print_cr(" from-card cache hit."); |
443 gclog_or_tty->print_cr(" from-card cache hit."); |
444 } |
444 } |
445 assert(contains_reference(from), "We just added it!"); |
445 assert(contains_reference(from), "We just added it!"); |
446 return; |
446 return; |
491 } |
491 } |
492 assert(contains_reference_locked(from), "We just added it!"); |
492 assert(contains_reference_locked(from), "We just added it!"); |
493 return; |
493 return; |
494 } else { |
494 } else { |
495 if (G1TraceHeapRegionRememberedSet) { |
495 if (G1TraceHeapRegionRememberedSet) { |
496 gclog_or_tty->print_cr(" [tid %d] sparse table entry " |
496 gclog_or_tty->print_cr(" [tid %u] sparse table entry " |
497 "overflow(f: %d, t: %u)", |
497 "overflow(f: %d, t: %u)", |
498 tid, from_hrm_ind, cur_hrm_ind); |
498 tid, from_hrm_ind, cur_hrm_ind); |
499 } |
499 } |
500 } |
500 } |
501 |
501 |