src/share/vm/gc_implementation/g1/sparsePRT.cpp

changeset 7091
a8ea2f110d87
parent 6932
828056cf311f
child 7535
7ae4e26cb1e0
equal deleted inserted replaced
7073:4d3a43351904 7091:a8ea2f110d87
476 } 476 }
477 477
478 bool SparsePRT::add_card(RegionIdx_t region_id, CardIdx_t card_index) { 478 bool SparsePRT::add_card(RegionIdx_t region_id, CardIdx_t card_index) {
479 #if SPARSE_PRT_VERBOSE 479 #if SPARSE_PRT_VERBOSE
480 gclog_or_tty->print_cr(" Adding card %d from region %d to region %u sparse.", 480 gclog_or_tty->print_cr(" Adding card %d from region %d to region %u sparse.",
481 card_index, region_id, _hr->hrs_index()); 481 card_index, region_id, _hr->hrm_index());
482 #endif 482 #endif
483 if (_next->occupied_entries() * 2 > _next->capacity()) { 483 if (_next->occupied_entries() * 2 > _next->capacity()) {
484 expand(); 484 expand();
485 } 485 }
486 return _next->add_card(region_id, card_index); 486 return _next->add_card(region_id, card_index);
528 RSHashTable* last = _next; 528 RSHashTable* last = _next;
529 _next = new RSHashTable(last->capacity() * 2); 529 _next = new RSHashTable(last->capacity() * 2);
530 530
531 #if SPARSE_PRT_VERBOSE 531 #if SPARSE_PRT_VERBOSE
532 gclog_or_tty->print_cr(" Expanded sparse table for %u to %d.", 532 gclog_or_tty->print_cr(" Expanded sparse table for %u to %d.",
533 _hr->hrs_index(), _next->capacity()); 533 _hr->hrm_index(), _next->capacity());
534 #endif 534 #endif
535 for (size_t i = 0; i < last->capacity(); i++) { 535 for (size_t i = 0; i < last->capacity(); i++) {
536 SparsePRTEntry* e = last->entry((int)i); 536 SparsePRTEntry* e = last->entry((int)i);
537 if (e->valid_entry()) { 537 if (e->valid_entry()) {
538 #if SPARSE_PRT_VERBOSE 538 #if SPARSE_PRT_VERBOSE

mercurial