equal
deleted
inserted
replaced
1277 // Reset bitmap |
1277 // Reset bitmap |
1278 _aux_bit_map.clear(); |
1278 _aux_bit_map.clear(); |
1279 |
1279 |
1280 Stack<oop,mtGC> oop_stack; |
1280 Stack<oop,mtGC> oop_stack; |
1281 |
1281 |
1282 // First, we process all GC roots. This populates the work stack with initial objects. |
1282 // First, we process GC roots according to current GC cycle. This populates the work stack with initial objects. |
1283 ShenandoahAllRootScanner rp(1, ShenandoahPhaseTimings::_num_phases); |
1283 ShenandoahHeapIterationRootScanner rp; |
1284 ObjectIterateScanRootClosure oops(&_aux_bit_map, &oop_stack); |
1284 ObjectIterateScanRootClosure oops(&_aux_bit_map, &oop_stack); |
1285 |
1285 |
1286 if (unload_classes()) { |
1286 if (unload_classes()) { |
1287 rp.strong_roots_do_unchecked(&oops); |
1287 rp.strong_roots_do(&oops); |
1288 } else { |
1288 } else { |
1289 rp.roots_do_unchecked(&oops); |
1289 rp.roots_do(&oops); |
1290 } |
1290 } |
1291 |
1291 |
1292 // Work through the oop stack to traverse heap. |
1292 // Work through the oop stack to traverse heap. |
1293 while (! oop_stack.is_empty()) { |
1293 while (! oop_stack.is_empty()) { |
1294 oop obj = oop_stack.pop(); |
1294 oop obj = oop_stack.pop(); |
1585 free_set()->recycle_trash(); |
1585 free_set()->recycle_trash(); |
1586 } |
1586 } |
1587 |
1587 |
1588 class ShenandoahConcurrentRootsEvacUpdateTask : public AbstractGangTask { |
1588 class ShenandoahConcurrentRootsEvacUpdateTask : public AbstractGangTask { |
1589 private: |
1589 private: |
1590 ShenandoahJNIHandleRoots<true /*concurrent*/> _jni_roots; |
1590 ShenandoahJNIHandleRoots<true /*concurrent*/> _jni_roots; |
1591 |
1591 |
1592 public: |
1592 public: |
1593 ShenandoahConcurrentRootsEvacUpdateTask() : |
1593 ShenandoahConcurrentRootsEvacUpdateTask() : |
1594 AbstractGangTask("Shenandoah Evacuate/Update Concurrent Roots Task") { |
1594 AbstractGangTask("Shenandoah Evacuate/Update Concurrent Roots Task") { |
1595 } |
1595 } |