1308 rp.roots_do(&oops);
1309 }
1310
1311 // Work through the oop stack to traverse heap.
1312 while (! oop_stack.is_empty()) {
1313 oop obj = oop_stack.pop();
1314 assert(oopDesc::is_oop(obj), "must be a valid oop");
1315 cl->do_object(obj);
1316 obj->oop_iterate(&oops);
1317 }
1318
1319 assert(oop_stack.is_empty(), "should be empty");
1320
1321 if (!_aux_bitmap_region_special && !os::uncommit_memory((char*)_aux_bitmap_region.start(), _aux_bitmap_region.byte_size())) {
1322 log_warning(gc)("Could not uncommit native memory for auxiliary marking bitmap for heap iteration");
1323 }
1324 }
1325
1326 // Keep alive an object that was loaded with AS_NO_KEEPALIVE.
1327 void ShenandoahHeap::keep_alive(oop obj) {
1328 if (is_concurrent_mark_in_progress()) {
1329 ShenandoahBarrierSet::barrier_set()->enqueue(obj);
1330 }
1331 }
1332
1333 void ShenandoahHeap::heap_region_iterate(ShenandoahHeapRegionClosure* blk) const {
1334 for (size_t i = 0; i < num_regions(); i++) {
1335 ShenandoahHeapRegion* current = get_region(i);
1336 blk->heap_region_do(current);
1337 }
1338 }
1339
1340 class ShenandoahParallelHeapRegionTask : public AbstractGangTask {
1341 private:
1342 ShenandoahHeap* const _heap;
1343 ShenandoahHeapRegionClosure* const _blk;
1344
1345 shenandoah_padding(0);
1346 volatile size_t _index;
1347 shenandoah_padding(1);
1348
|
1308 rp.roots_do(&oops);
1309 }
1310
1311 // Work through the oop stack to traverse heap.
1312 while (! oop_stack.is_empty()) {
1313 oop obj = oop_stack.pop();
1314 assert(oopDesc::is_oop(obj), "must be a valid oop");
1315 cl->do_object(obj);
1316 obj->oop_iterate(&oops);
1317 }
1318
1319 assert(oop_stack.is_empty(), "should be empty");
1320
1321 if (!_aux_bitmap_region_special && !os::uncommit_memory((char*)_aux_bitmap_region.start(), _aux_bitmap_region.byte_size())) {
1322 log_warning(gc)("Could not uncommit native memory for auxiliary marking bitmap for heap iteration");
1323 }
1324 }
1325
1326 // Keep alive an object that was loaded with AS_NO_KEEPALIVE.
1327 void ShenandoahHeap::keep_alive(oop obj) {
1328 if (is_concurrent_mark_in_progress() && (obj != NULL)) {
1329 ShenandoahBarrierSet::barrier_set()->enqueue(obj);
1330 }
1331 }
1332
1333 void ShenandoahHeap::heap_region_iterate(ShenandoahHeapRegionClosure* blk) const {
1334 for (size_t i = 0; i < num_regions(); i++) {
1335 ShenandoahHeapRegion* current = get_region(i);
1336 blk->heap_region_do(current);
1337 }
1338 }
1339
1340 class ShenandoahParallelHeapRegionTask : public AbstractGangTask {
1341 private:
1342 ShenandoahHeap* const _heap;
1343 ShenandoahHeapRegionClosure* const _blk;
1344
1345 shenandoah_padding(0);
1346 volatile size_t _index;
1347 shenandoah_padding(1);
1348
|