comparison src/share/vm/gc_implementation/g1/heapRegion.cpp @ 5174:05e7f9c0c822

8027756: assert(!hr->isHumongous()) failed: code root in humongous region? Summary: Change checks for isHumongous() to continuesHumongous() as installing a code root for a humongous object is valid, but not for continuations of humongous objects. Cleaned up asserts. Reviewed-by: jmasa, tamao
author tschatzl
date Thu, 19 Dec 2013 09:22:30 +0100
parents 0114a0a4434c
children b86041bd7b99
comparison
equal deleted inserted replaced
51:ee6c1c85ccac 52:ccb4fb2c8204
611 hrrs->remove_strong_code_root(nm); 611 hrrs->remove_strong_code_root(nm);
612 } 612 }
613 613
614 void HeapRegion::migrate_strong_code_roots() { 614 void HeapRegion::migrate_strong_code_roots() {
615 assert(in_collection_set(), "only collection set regions"); 615 assert(in_collection_set(), "only collection set regions");
616 assert(!isHumongous(), "not humongous regions"); 616 assert(!isHumongous(),
617 err_msg("humongous region "HR_FORMAT" should not have been added to collection set",
618 HR_FORMAT_PARAMS(this)));
617 619
618 HeapRegionRemSet* hrrs = rem_set(); 620 HeapRegionRemSet* hrrs = rem_set();
619 hrrs->migrate_strong_code_roots(); 621 hrrs->migrate_strong_code_roots();
620 } 622 }
621 623
732 *failures = true; 734 *failures = true;
733 } 735 }
734 return; 736 return;
735 } 737 }
736 738
737 // An H-region should have an empty strong code root list 739 if (continuesHumongous()) {
738 if (isHumongous()) {
739 if (strong_code_roots_length > 0) { 740 if (strong_code_roots_length > 0) {
740 gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] is humongous " 741 gclog_or_tty->print_cr("region "HR_FORMAT" is a continuation of a humongous "
741 "but has "INT32_FORMAT" code root entries", 742 "region but has "INT32_FORMAT" code root entries",
742 bottom(), end(), strong_code_roots_length); 743 HR_FORMAT_PARAMS(this), strong_code_roots_length);
743 *failures = true; 744 *failures = true;
744 } 745 }
745 return; 746 return;
746 } 747 }
747 748