src/share/vm/gc_implementation/g1/heapRegion.hpp

Print this page
rev 4802 : imported patch optimize-nmethod-scanning
rev 4803 : imported patch thomas-comments


 786   }
 787 
 788   void set_predicted_elapsed_time_ms(double ms) {
 789     _predicted_elapsed_time_ms = ms;
 790   }
 791 
 792   void set_predicted_bytes_to_copy(size_t bytes) {
 793     _predicted_bytes_to_copy = bytes;
 794   }
 795 
 796 #define HeapRegion_OOP_SINCE_SAVE_MARKS_DECL(OopClosureType, nv_suffix)  \
 797   virtual void oop_since_save_marks_iterate##nv_suffix(OopClosureType* cl);
 798   SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(HeapRegion_OOP_SINCE_SAVE_MARKS_DECL)
 799 
 800   virtual CompactibleSpace* next_compaction_space() const;
 801 
 802   virtual void reset_after_compaction();
 803 
 804   // Routines for managing the list of code roots that point into
 805   // this heap region.
 806   void push_strong_code_root(nmethod* nm);
 807   void remove_strong_code_root(nmethod* nm);
 808 
 809   GrowableArray<nmethod*>* strong_code_root_list() {
 810     return _strong_code_root_list;
 811   }
 812 
 813   // During a collection, migrate strong code roots attached to
 814   // this region to the new regions the regions they ppoint into.


 815   void migrate_strong_code_roots();
 816 
 817   // Applied blk->do_code_blob() to each of the entries in
 818   // the strong code roots list;
 819   void strong_code_roots_do(CodeBlobClosure* blk) const;
 820 
 821   // Verify that the entries on the strong code root list are live and
 822   // include at lease one pointer into this region.
 823   // Returns the number of failures.
 824   void verify_strong_code_roots(VerifyOption vo, bool* failures) const;
 825 
 826   void print() const;
 827   void print_on(outputStream* st) const;
 828 
 829   // vo == UsePrevMarking  -> use "prev" marking information,
 830   // vo == UseNextMarking -> use "next" marking information
 831   // vo == UseMarkWord    -> use the mark word in the object header
 832   //
 833   // NOTE: Only the "prev" marking information is guaranteed to be
 834   // consistent most of the time, so most calls to this should use
 835   // vo == UsePrevMarking.
 836   // Currently, there is only one case where this is called with
 837   // vo == UseNextMarking, which is to verify the "next" marking
 838   // information at the end of remark.
 839   // Currently there is only one place where this is called with
 840   // vo == UseMarkWord, which is to verify the marking during a
 841   // full GC.
 842   void verify(VerifyOption vo, bool *failures) const;
 843 




 786   }
 787 
 788   void set_predicted_elapsed_time_ms(double ms) {
 789     _predicted_elapsed_time_ms = ms;
 790   }
 791 
 792   void set_predicted_bytes_to_copy(size_t bytes) {
 793     _predicted_bytes_to_copy = bytes;
 794   }
 795 
 796 #define HeapRegion_OOP_SINCE_SAVE_MARKS_DECL(OopClosureType, nv_suffix)  \
 797   virtual void oop_since_save_marks_iterate##nv_suffix(OopClosureType* cl);
 798   SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(HeapRegion_OOP_SINCE_SAVE_MARKS_DECL)
 799 
 800   virtual CompactibleSpace* next_compaction_space() const;
 801 
 802   virtual void reset_after_compaction();
 803 
 804   // Routines for managing the list of code roots that point into
 805   // this heap region.
 806   void add_strong_code_root(nmethod* nm);
 807   void remove_strong_code_root(nmethod* nm);
 808 
 809   GrowableArray<nmethod*>* strong_code_root_list() {
 810     return _strong_code_root_list;
 811   }
 812 
 813   // During a collection, migrate successfully evacuated strong
 814   // code roots attached to this region to the new regions that
 815   // they point into. Unsuccessfully evacuated code roots are
 816   // not migrated.
 817   void migrate_strong_code_roots();
 818 
 819   // Applies blk->do_code_blob() to each of the entries in
 820   // the strong code roots list;
 821   void strong_code_roots_do(CodeBlobClosure* blk) const;
 822 
 823   // Verify that the entries on the strong code root list are live and
 824   // include at least one pointer into this region.

 825   void verify_strong_code_roots(VerifyOption vo, bool* failures) const;
 826 
 827   void print() const;
 828   void print_on(outputStream* st) const;
 829 
 830   // vo == UsePrevMarking  -> use "prev" marking information,
 831   // vo == UseNextMarking -> use "next" marking information
 832   // vo == UseMarkWord    -> use the mark word in the object header
 833   //
 834   // NOTE: Only the "prev" marking information is guaranteed to be
 835   // consistent most of the time, so most calls to this should use
 836   // vo == UsePrevMarking.
 837   // Currently, there is only one case where this is called with
 838   // vo == UseNextMarking, which is to verify the "next" marking
 839   // information at the end of remark.
 840   // Currently there is only one place where this is called with
 841   // vo == UseMarkWord, which is to verify the marking during a
 842   // full GC.
 843   void verify(VerifyOption vo, bool *failures) const;
 844