< prev index next >

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

Print this page
rev 7903 : imported patch skip_stale
   1 /*
   2  * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


1040   double                      _interval_start_time_ms;
1041 
1042   int                         _aborted;
1043   int                         _aborted_overflow;
1044   int                         _aborted_cm_aborted;
1045   int                         _aborted_yield;
1046   int                         _aborted_timed_out;
1047   int                         _aborted_satb;
1048   int                         _aborted_termination;
1049 
1050   int                         _steal_attempts;
1051   int                         _steals;
1052 
1053   int                         _clock_due_to_marking;
1054   int                         _clock_due_to_scanning;
1055 
1056   int                         _local_pushes;
1057   int                         _local_pops;
1058   int                         _local_max_size;
1059   int                         _objs_scanned;

1060 
1061   int                         _global_pushes;
1062   int                         _global_pops;
1063   int                         _global_max_size;
1064 
1065   int                         _global_transfers_to;
1066   int                         _global_transfers_from;
1067 
1068   int                         _regions_claimed;
1069   int                         _objs_found_on_bitmap;
1070 
1071   int                         _satb_buffers_processed;
1072 #endif // _MARKING_STATS_
1073 
1074   // it updates the local fields after this task has claimed
1075   // a new region to scan
1076   void setup_for_region(HeapRegion* hr);
1077   // it brings up-to-date the limit of the region
1078   void update_region_limit();
1079 


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();


   1 /*
   2  * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


1040   double                      _interval_start_time_ms;
1041 
1042   int                         _aborted;
1043   int                         _aborted_overflow;
1044   int                         _aborted_cm_aborted;
1045   int                         _aborted_yield;
1046   int                         _aborted_timed_out;
1047   int                         _aborted_satb;
1048   int                         _aborted_termination;
1049 
1050   int                         _steal_attempts;
1051   int                         _steals;
1052 
1053   int                         _clock_due_to_marking;
1054   int                         _clock_due_to_scanning;
1055 
1056   int                         _local_pushes;
1057   int                         _local_pops;
1058   int                         _local_max_size;
1059   int                         _objs_scanned;
1060   int                         _stale_humongous_queue_entries;
1061 
1062   int                         _global_pushes;
1063   int                         _global_pops;
1064   int                         _global_max_size;
1065 
1066   int                         _global_transfers_to;
1067   int                         _global_transfers_from;
1068 
1069   int                         _regions_claimed;
1070   int                         _objs_found_on_bitmap;
1071 
1072   int                         _satb_buffers_processed;
1073 #endif // _MARKING_STATS_
1074 
1075   // it updates the local fields after this task has claimed
1076   // a new region to scan
1077   void setup_for_region(HeapRegion* hr);
1078   // it brings up-to-date the limit of the region
1079   void update_region_limit();
1080 


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


< prev index next >