530 inline void note_end_of_marking();
531
532 // Notify the region that we are about to start processing
533 // self-forwarded objects during evac failure handling.
534 void note_self_forwarding_removal_start(bool during_initial_mark,
535 bool during_conc_mark);
536
537 // Notify the region that we have finished processing self-forwarded
538 // objects during evac failure handling.
539 void note_self_forwarding_removal_end(size_t marked_bytes);
540
541 void reset_during_compaction() {
542 assert(is_humongous(),
543 "should only be called for humongous regions");
544
545 zero_marked_bytes();
546 init_top_at_mark_start();
547 }
548
549 void calc_gc_efficiency(void);
550 double gc_efficiency() { return _gc_efficiency;}
551
552 uint index_in_opt_cset() const { return _index_in_opt_cset; }
553 void set_index_in_opt_cset(uint index) { _index_in_opt_cset = index; }
554
555 int young_index_in_cset() const { return _young_index_in_cset; }
556 void set_young_index_in_cset(int index) {
557 assert( (index == -1) || is_young(), "pre-condition" );
558 _young_index_in_cset = index;
559 }
560
561 int age_in_surv_rate_group() {
562 assert( _surv_rate_group != NULL, "pre-condition" );
563 assert( _age_index > -1, "pre-condition" );
564 return _surv_rate_group->age_in_group(_age_index);
565 }
566
567 void record_surv_words_in_group(size_t words_survived) {
568 assert( _surv_rate_group != NULL, "pre-condition" );
569 assert( _age_index > -1, "pre-condition" );
570 int age_in_group = age_in_surv_rate_group();
688 // Currently, there is only one case where this is called with
689 // vo == UseNextMarking, which is to verify the "next" marking
690 // information at the end of remark.
691 // Currently there is only one place where this is called with
692 // vo == UseFullMarking, which is to verify the marking during a
693 // full GC.
694 void verify(VerifyOption vo, bool *failures) const;
695
696 // Override; it uses the "prev" marking information
697 virtual void verify() const;
698
699 void verify_rem_set(VerifyOption vo, bool *failures) const;
700 void verify_rem_set() const;
701 };
702
703 // HeapRegionClosure is used for iterating over regions.
704 // Terminates the iteration when the "do_heap_region" method returns "true".
705 class HeapRegionClosure : public StackObj {
706 friend class HeapRegionManager;
707 friend class G1CollectionSet;
708 friend class CollectionSetChooser;
709
710 bool _is_complete;
711 void set_incomplete() { _is_complete = false; }
712
713 public:
714 HeapRegionClosure(): _is_complete(true) {}
715
716 // Typically called on each region until it returns true.
717 virtual bool do_heap_region(HeapRegion* r) = 0;
718
719 // True after iteration if the closure was applied to all heap regions
720 // and returned "false" in all cases.
721 bool is_complete() { return _is_complete; }
722 };
723
724 #endif // SHARE_GC_G1_HEAPREGION_HPP
|
530 inline void note_end_of_marking();
531
532 // Notify the region that we are about to start processing
533 // self-forwarded objects during evac failure handling.
534 void note_self_forwarding_removal_start(bool during_initial_mark,
535 bool during_conc_mark);
536
537 // Notify the region that we have finished processing self-forwarded
538 // objects during evac failure handling.
539 void note_self_forwarding_removal_end(size_t marked_bytes);
540
541 void reset_during_compaction() {
542 assert(is_humongous(),
543 "should only be called for humongous regions");
544
545 zero_marked_bytes();
546 init_top_at_mark_start();
547 }
548
549 void calc_gc_efficiency(void);
550 double gc_efficiency() const { return _gc_efficiency;}
551
552 uint index_in_opt_cset() const { return _index_in_opt_cset; }
553 void set_index_in_opt_cset(uint index) { _index_in_opt_cset = index; }
554
555 int young_index_in_cset() const { return _young_index_in_cset; }
556 void set_young_index_in_cset(int index) {
557 assert( (index == -1) || is_young(), "pre-condition" );
558 _young_index_in_cset = index;
559 }
560
561 int age_in_surv_rate_group() {
562 assert( _surv_rate_group != NULL, "pre-condition" );
563 assert( _age_index > -1, "pre-condition" );
564 return _surv_rate_group->age_in_group(_age_index);
565 }
566
567 void record_surv_words_in_group(size_t words_survived) {
568 assert( _surv_rate_group != NULL, "pre-condition" );
569 assert( _age_index > -1, "pre-condition" );
570 int age_in_group = age_in_surv_rate_group();
688 // Currently, there is only one case where this is called with
689 // vo == UseNextMarking, which is to verify the "next" marking
690 // information at the end of remark.
691 // Currently there is only one place where this is called with
692 // vo == UseFullMarking, which is to verify the marking during a
693 // full GC.
694 void verify(VerifyOption vo, bool *failures) const;
695
696 // Override; it uses the "prev" marking information
697 virtual void verify() const;
698
699 void verify_rem_set(VerifyOption vo, bool *failures) const;
700 void verify_rem_set() const;
701 };
702
703 // HeapRegionClosure is used for iterating over regions.
704 // Terminates the iteration when the "do_heap_region" method returns "true".
705 class HeapRegionClosure : public StackObj {
706 friend class HeapRegionManager;
707 friend class G1CollectionSet;
708 friend class G1CollectionSetCandidates;
709
710 bool _is_complete;
711 void set_incomplete() { _is_complete = false; }
712
713 public:
714 HeapRegionClosure(): _is_complete(true) {}
715
716 // Typically called on each region until it returns true.
717 virtual bool do_heap_region(HeapRegion* r) = 0;
718
719 // True after iteration if the closure was applied to all heap regions
720 // and returned "false" in all cases.
721 bool is_complete() { return _is_complete; }
722 };
723
724 #endif // SHARE_GC_G1_HEAPREGION_HPP
|