< prev index next >

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

Print this page
rev 7994 : [mq]: filter


1082   void reached_limit();
1083   // recalculates the words scanned and refs visited limits
1084   void recalculate_limits();
1085   // decreases the words scanned and refs visited limits when we reach
1086   // an expensive operation
1087   void decrease_limits();
1088   // it checks whether the words scanned or refs visited reached their
1089   // respective limit and calls reached_limit() if they have
1090   void check_limits() {
1091     if (_words_scanned >= _words_scanned_limit ||
1092         _refs_reached >= _refs_reached_limit) {
1093       reached_limit();
1094     }
1095   }
1096   // this is supposed to be called regularly during a marking step as
1097   // it checks a bunch of conditions that might cause the marking step
1098   // to abort
1099   void regular_clock_call();
1100   bool concurrent() { return _concurrent; }
1101 


1102 public:
1103   // It resets the task; it should be called right at the beginning of
1104   // a marking phase.
1105   void reset(CMBitMap* _nextMarkBitMap);
1106   // it clears all the fields that correspond to a claimed region.
1107   void clear_region_fields();
1108 
1109   void set_concurrent(bool concurrent) { _concurrent = concurrent; }
1110 
1111   // The main method of this class which performs a marking step
1112   // trying not to exceed the given duration. However, it might exit
1113   // prematurely, according to some conditions (i.e. SATB buffers are
1114   // available for processing).
1115   void do_marking_step(double target_ms,
1116                        bool do_termination,
1117                        bool is_serial);
1118 
1119   // These two calls start and stop the timer
1120   void record_start_time() {
1121     _elapsed_time_ms = os::elapsedTime() * 1000.0;


1134   // Resets the local region fields after a task has finished scanning a
1135   // region; or when they have become stale as a result of the region
1136   // being evacuated.
1137   void giveup_current_region();
1138 
1139   HeapWord* finger()            { return _finger; }
1140 
1141   bool has_aborted()            { return _has_aborted; }
1142   void set_has_aborted()        { _has_aborted = true; }
1143   void clear_has_aborted()      { _has_aborted = false; }
1144   bool has_timed_out()          { return _has_timed_out; }
1145   bool claimed()                { return _claimed; }
1146 
1147   void set_cm_oop_closure(G1CMOopClosure* cm_oop_closure);
1148 
1149   // It grays the object by marking it and, if necessary, pushing it
1150   // on the local queue
1151   inline void deal_with_reference(oop obj);
1152 
1153   // It scans an object and visits its children.
1154   void scan_object(oop obj);
1155 
1156   // It pushes an object on the local queue.
1157   inline void push(oop obj);
1158 
1159   // These two move entries to/from the global stack.
1160   void move_entries_to_global_stack();
1161   void get_entries_from_global_stack();
1162 
1163   // It pops and scans objects from the local queue. If partially is
1164   // true, then it stops when the queue size is of a given limit. If
1165   // partially is false, then it stops when the queue is empty.
1166   void drain_local_queue(bool partially);
1167   // It moves entries from the global stack to the local queue and
1168   // drains the local queue. If partially is true, then it stops when
1169   // both the global stack and the local queue reach a given size. If
1170   // partially if false, it tries to empty them totally.
1171   void drain_global_stack(bool partially);
1172   // It keeps picking SATB buffers and processing them until no SATB
1173   // buffers are available.
1174   void drain_satb_buffers();




1082   void reached_limit();
1083   // recalculates the words scanned and refs visited limits
1084   void recalculate_limits();
1085   // decreases the words scanned and refs visited limits when we reach
1086   // an expensive operation
1087   void decrease_limits();
1088   // it checks whether the words scanned or refs visited reached their
1089   // respective limit and calls reached_limit() if they have
1090   void check_limits() {
1091     if (_words_scanned >= _words_scanned_limit ||
1092         _refs_reached >= _refs_reached_limit) {
1093       reached_limit();
1094     }
1095   }
1096   // this is supposed to be called regularly during a marking step as
1097   // it checks a bunch of conditions that might cause the marking step
1098   // to abort
1099   void regular_clock_call();
1100   bool concurrent() { return _concurrent; }
1101 
1102   template<bool scan> void process_grey_object(oop obj);
1103 
1104 public:
1105   // It resets the task; it should be called right at the beginning of
1106   // a marking phase.
1107   void reset(CMBitMap* _nextMarkBitMap);
1108   // it clears all the fields that correspond to a claimed region.
1109   void clear_region_fields();
1110 
1111   void set_concurrent(bool concurrent) { _concurrent = concurrent; }
1112 
1113   // The main method of this class which performs a marking step
1114   // trying not to exceed the given duration. However, it might exit
1115   // prematurely, according to some conditions (i.e. SATB buffers are
1116   // available for processing).
1117   void do_marking_step(double target_ms,
1118                        bool do_termination,
1119                        bool is_serial);
1120 
1121   // These two calls start and stop the timer
1122   void record_start_time() {
1123     _elapsed_time_ms = os::elapsedTime() * 1000.0;


1136   // Resets the local region fields after a task has finished scanning a
1137   // region; or when they have become stale as a result of the region
1138   // being evacuated.
1139   void giveup_current_region();
1140 
1141   HeapWord* finger()            { return _finger; }
1142 
1143   bool has_aborted()            { return _has_aborted; }
1144   void set_has_aborted()        { _has_aborted = true; }
1145   void clear_has_aborted()      { _has_aborted = false; }
1146   bool has_timed_out()          { return _has_timed_out; }
1147   bool claimed()                { return _claimed; }
1148 
1149   void set_cm_oop_closure(G1CMOopClosure* cm_oop_closure);
1150 
1151   // It grays the object by marking it and, if necessary, pushing it
1152   // on the local queue
1153   inline void deal_with_reference(oop obj);
1154 
1155   // It scans an object and visits its children.
1156   void scan_object(oop obj) { process_grey_object<true>(obj); }
1157 
1158   // It pushes an object on the local queue.
1159   inline void push(oop obj);
1160 
1161   // These two move entries to/from the global stack.
1162   void move_entries_to_global_stack();
1163   void get_entries_from_global_stack();
1164 
1165   // It pops and scans objects from the local queue. If partially is
1166   // true, then it stops when the queue size is of a given limit. If
1167   // partially is false, then it stops when the queue is empty.
1168   void drain_local_queue(bool partially);
1169   // It moves entries from the global stack to the local queue and
1170   // drains the local queue. If partially is true, then it stops when
1171   // both the global stack and the local queue reach a given size. If
1172   // partially if false, it tries to empty them totally.
1173   void drain_global_stack(bool partially);
1174   // It keeps picking SATB buffers and processing them until no SATB
1175   // buffers are available.
1176   void drain_satb_buffers();


< prev index next >