1136 void reset_after_compaction(); |
1136 void reset_after_compaction(); |
1137 |
1137 |
1138 // Allocation support |
1138 // Allocation support |
1139 HeapWord* allocate(size_t size, bool tlab); |
1139 HeapWord* allocate(size_t size, bool tlab); |
1140 HeapWord* have_lock_and_allocate(size_t size, bool tlab); |
1140 HeapWord* have_lock_and_allocate(size_t size, bool tlab); |
1141 oop promote(oop obj, size_t obj_size, oop* ref); |
1141 oop promote(oop obj, size_t obj_size); |
1142 HeapWord* par_allocate(size_t size, bool tlab) { |
1142 HeapWord* par_allocate(size_t size, bool tlab) { |
1143 return allocate(size, tlab); |
1143 return allocate(size, tlab); |
1144 } |
1144 } |
1145 |
1145 |
1146 // Incremental mode triggering. |
1146 // Incremental mode triggering. |
1299 // |
1299 // |
1300 |
1300 |
1301 // This closure is used to check that a certain set of oops is empty. |
1301 // This closure is used to check that a certain set of oops is empty. |
1302 class FalseClosure: public OopClosure { |
1302 class FalseClosure: public OopClosure { |
1303 public: |
1303 public: |
1304 void do_oop(oop* p) { |
1304 void do_oop(oop* p) { guarantee(false, "Should be an empty set"); } |
1305 guarantee(false, "Should be an empty set"); |
1305 void do_oop(narrowOop* p) { guarantee(false, "Should be an empty set"); } |
1306 } |
|
1307 }; |
1306 }; |
1308 |
1307 |
1309 // This closure is used to do concurrent marking from the roots |
1308 // This closure is used to do concurrent marking from the roots |
1310 // following the first checkpoint. |
1309 // following the first checkpoint. |
1311 class MarkFromRootsClosure: public BitMapClosure { |
1310 class MarkFromRootsClosure: public BitMapClosure { |
1378 CMSCollector* _collector; |
1377 CMSCollector* _collector; |
1379 MemRegion _span; |
1378 MemRegion _span; |
1380 CMSBitMap* _verification_bm; |
1379 CMSBitMap* _verification_bm; |
1381 CMSBitMap* _cms_bm; |
1380 CMSBitMap* _cms_bm; |
1382 CMSMarkStack* _mark_stack; |
1381 CMSMarkStack* _mark_stack; |
|
1382 protected: |
|
1383 void do_oop(oop p); |
|
1384 template <class T> inline void do_oop_work(T *p) { |
|
1385 oop obj = oopDesc::load_decode_heap_oop_not_null(p); |
|
1386 do_oop(obj); |
|
1387 } |
1383 public: |
1388 public: |
1384 PushAndMarkVerifyClosure(CMSCollector* cms_collector, |
1389 PushAndMarkVerifyClosure(CMSCollector* cms_collector, |
1385 MemRegion span, |
1390 MemRegion span, |
1386 CMSBitMap* verification_bm, |
1391 CMSBitMap* verification_bm, |
1387 CMSBitMap* cms_bm, |
1392 CMSBitMap* cms_bm, |
1388 CMSMarkStack* mark_stack); |
1393 CMSMarkStack* mark_stack); |
1389 void do_oop(oop* p); |
1394 void do_oop(oop* p); |
|
1395 void do_oop(narrowOop* p); |
1390 // Deal with a stack overflow condition |
1396 // Deal with a stack overflow condition |
1391 void handle_stack_overflow(HeapWord* lost); |
1397 void handle_stack_overflow(HeapWord* lost); |
1392 }; |
1398 }; |
1393 |
1399 |
1394 class MarkFromRootsVerifyClosure: public BitMapClosure { |
1400 class MarkFromRootsVerifyClosure: public BitMapClosure { |