575 if (is_continues_humongous()) { 576 if (strong_code_roots_length > 0) { 577 gclog_or_tty->print_cr("region " HR_FORMAT " is a continuation of a humongous " 578 "region but has " SIZE_FORMAT " code root entries", 579 HR_FORMAT_PARAMS(this), strong_code_roots_length); 580 *failures = true; 581 } 582 return; 583 } 584 585 VerifyStrongCodeRootCodeBlobClosure cb_cl(this); 586 strong_code_roots_do(&cb_cl); 587 588 if (cb_cl.failures()) { 589 *failures = true; 590 } 591 } 592 593 void HeapRegion::print() const { print_on(gclog_or_tty); } 594 void HeapRegion::print_on(outputStream* st) const { 595 st->print("AC%4u", allocation_context()); 596 597 st->print(" %2s", get_short_type_str()); 598 if (in_collection_set()) 599 st->print(" CS"); 600 else 601 st->print(" "); 602 st->print(" TS %5d", _gc_time_stamp); 603 st->print(" PTAMS " PTR_FORMAT " NTAMS " PTR_FORMAT, 604 p2i(prev_top_at_mark_start()), p2i(next_top_at_mark_start())); 605 G1OffsetTableContigSpace::print_on(st); 606 } 607 608 class VerifyLiveClosure: public OopClosure { 609 private: 610 G1CollectedHeap* _g1h; 611 CardTableModRefBS* _bs; 612 oop _containing_obj; 613 bool _failures; 614 int _n_failures; 615 VerifyOption _vo; 616 public: 617 // _vo == UsePrevMarking -> use "prev" marking information, 618 // _vo == UseNextMarking -> use "next" marking information, 619 // _vo == UseMarkWord -> use mark word from object header. 620 VerifyLiveClosure(G1CollectedHeap* g1h, VerifyOption vo) : 621 _g1h(g1h), _bs(barrier_set_cast<CardTableModRefBS>(g1h->barrier_set())), 622 _containing_obj(NULL), _failures(false), _n_failures(0), _vo(vo) 623 { } 624 625 void set_containing_obj(oop obj) { | 575 if (is_continues_humongous()) { 576 if (strong_code_roots_length > 0) { 577 gclog_or_tty->print_cr("region " HR_FORMAT " is a continuation of a humongous " 578 "region but has " SIZE_FORMAT " code root entries", 579 HR_FORMAT_PARAMS(this), strong_code_roots_length); 580 *failures = true; 581 } 582 return; 583 } 584 585 VerifyStrongCodeRootCodeBlobClosure cb_cl(this); 586 strong_code_roots_do(&cb_cl); 587 588 if (cb_cl.failures()) { 589 *failures = true; 590 } 591 } 592 593 void HeapRegion::print() const { print_on(gclog_or_tty); } 594 void HeapRegion::print_on(outputStream* st) const { 595 st->print("|%4u", this->_hrm_index); 596 st->print("|" PTR_FORMAT ", " PTR_FORMAT ", " PTR_FORMAT, 597 p2i(bottom()), p2i(top()), p2i(end())); 598 st->print("|%3d%%", (int) ((double) used() * 100 / capacity())); 599 st->print("|%2s", get_short_type_str()); 600 if (in_collection_set()) { 601 st->print("|CS"); 602 } else { 603 st->print("| "); 604 } 605 st->print("|TS%3u", _gc_time_stamp); 606 st->print("|AC%3u", allocation_context()); 607 st->print_cr("|TAMS " PTR_FORMAT ", " PTR_FORMAT "|", 608 p2i(prev_top_at_mark_start()), p2i(next_top_at_mark_start())); 609 } 610 611 class VerifyLiveClosure: public OopClosure { 612 private: 613 G1CollectedHeap* _g1h; 614 CardTableModRefBS* _bs; 615 oop _containing_obj; 616 bool _failures; 617 int _n_failures; 618 VerifyOption _vo; 619 public: 620 // _vo == UsePrevMarking -> use "prev" marking information, 621 // _vo == UseNextMarking -> use "next" marking information, 622 // _vo == UseMarkWord -> use mark word from object header. 623 VerifyLiveClosure(G1CollectedHeap* g1h, VerifyOption vo) : 624 _g1h(g1h), _bs(barrier_set_cast<CardTableModRefBS>(g1h->barrier_set())), 625 _containing_obj(NULL), _failures(false), _n_failures(0), _vo(vo) 626 { } 627 628 void set_containing_obj(oop obj) { |