comparison src/share/vm/gc_implementation/g1/concurrentMark.hpp @ 2538:23d434c6290d

7055073: G1: code cleanup in the concurrentMark.* files Summary: Only cosmetic changes to make the concurrentMark.* more consistent, code-style-wise, with the rest of the codebase. Reviewed-by: johnc, ysr
author tonyp
date Mon, 20 Jun 2011 22:03:13 -0400
parents 6747fd0512e0
children ff53346271fe
comparison
equal deleted inserted replaced
22:ea00d458c3e8 23:66ea1186e2e7
603 return true; 603 return true;
604 } 604 }
605 void mark_stack_pop(oop* arr, int max, int* n) { 605 void mark_stack_pop(oop* arr, int max, int* n) {
606 _markStack.par_pop_arr(arr, max, n); 606 _markStack.par_pop_arr(arr, max, n);
607 } 607 }
608 size_t mark_stack_size() { return _markStack.size(); } 608 size_t mark_stack_size() { return _markStack.size(); }
609 size_t partial_mark_stack_size_target() { return _markStack.maxElems()/3; } 609 size_t partial_mark_stack_size_target() { return _markStack.maxElems()/3; }
610 bool mark_stack_overflow() { return _markStack.overflow(); } 610 bool mark_stack_overflow() { return _markStack.overflow(); }
611 bool mark_stack_empty() { return _markStack.isEmpty(); } 611 bool mark_stack_empty() { return _markStack.isEmpty(); }
612 612
613 // (Lock-free) Manipulation of the region stack 613 // (Lock-free) Manipulation of the region stack
614 bool region_stack_push_lock_free(MemRegion mr) { 614 bool region_stack_push_lock_free(MemRegion mr) {
615 // Currently we only call the lock-free version during evacuation 615 // Currently we only call the lock-free version during evacuation
616 // pauses. 616 // pauses.
831 // max_finger is the highest heap region end of the regions currently 831 // max_finger is the highest heap region end of the regions currently
832 // contained in the collection set. If this value is larger than 832 // contained in the collection set. If this value is larger than
833 // _min_finger then we need to gray objects. 833 // _min_finger then we need to gray objects.
834 // This routine is like registerCSetRegion but for an entire 834 // This routine is like registerCSetRegion but for an entire
835 // collection of regions. 835 // collection of regions.
836 if (max_finger > _min_finger) 836 if (max_finger > _min_finger) {
837 _should_gray_objects = true; 837 _should_gray_objects = true;
838 }
838 } 839 }
839 840
840 // Returns "true" if at least one mark has been completed. 841 // Returns "true" if at least one mark has been completed.
841 bool at_least_one_mark_complete() { return _at_least_one_mark_complete; } 842 bool at_least_one_mark_complete() { return _at_least_one_mark_complete; }
842 843
878 void print_worker_threads_on(outputStream* st) const; 879 void print_worker_threads_on(outputStream* st) const;
879 880
880 // The following indicate whether a given verbose level has been 881 // The following indicate whether a given verbose level has been
881 // set. Notice that anything above stats is conditional to 882 // set. Notice that anything above stats is conditional to
882 // _MARKING_VERBOSE_ having been set to 1 883 // _MARKING_VERBOSE_ having been set to 1
883 bool verbose_stats() 884 bool verbose_stats() {
884 { return _verbose_level >= stats_verbose; } 885 return _verbose_level >= stats_verbose;
885 bool verbose_low() 886 }
886 { return _MARKING_VERBOSE_ && _verbose_level >= low_verbose; } 887 bool verbose_low() {
887 bool verbose_medium() 888 return _MARKING_VERBOSE_ && _verbose_level >= low_verbose;
888 { return _MARKING_VERBOSE_ && _verbose_level >= medium_verbose; } 889 }
889 bool verbose_high() 890 bool verbose_medium() {
890 { return _MARKING_VERBOSE_ && _verbose_level >= high_verbose; } 891 return _MARKING_VERBOSE_ && _verbose_level >= medium_verbose;
892 }
893 bool verbose_high() {
894 return _MARKING_VERBOSE_ && _verbose_level >= high_verbose;
895 }
891 }; 896 };
892 897
893 // A class representing a marking task. 898 // A class representing a marking task.
894 class CMTask : public TerminatorTerminator { 899 class CMTask : public TerminatorTerminator {
895 private: 900 private:
1061 void decrease_limits(); 1066 void decrease_limits();
1062 // it checks whether the words scanned or refs visited reached their 1067 // it checks whether the words scanned or refs visited reached their
1063 // respective limit and calls reached_limit() if they have 1068 // respective limit and calls reached_limit() if they have
1064 void check_limits() { 1069 void check_limits() {
1065 if (_words_scanned >= _words_scanned_limit || 1070 if (_words_scanned >= _words_scanned_limit ||
1066 _refs_reached >= _refs_reached_limit) 1071 _refs_reached >= _refs_reached_limit) {
1067 reached_limit(); 1072 reached_limit();
1073 }
1068 } 1074 }
1069 // this is supposed to be called regularly during a marking step as 1075 // this is supposed to be called regularly during a marking step as
1070 // it checks a bunch of conditions that might cause the marking step 1076 // it checks a bunch of conditions that might cause the marking step
1071 // to abort 1077 // to abort
1072 void regular_clock_call(); 1078 void regular_clock_call();