< prev index next >

src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp

Print this page




 365     size_t young_gen_used_before = young_gen->used_in_bytes();
 366 
 367     // Reset our survivor overflow.
 368     set_survivor_overflow(false);
 369 
 370     // We need to save the old top values before
 371     // creating the promotion_manager. We pass the top
 372     // values to the card_table, to prevent it from
 373     // straying into the promotion labs.
 374     HeapWord* old_top = old_gen->object_space()->top();
 375 
 376     // Release all previously held resources
 377     gc_task_manager()->release_all_resources();
 378 
 379     // Set the number of GC threads to be used in this collection
 380     gc_task_manager()->set_active_gang();
 381     gc_task_manager()->task_idle_workers();
 382     // Get the active number of workers here and use that value
 383     // throughout the methods.
 384     uint active_workers = gc_task_manager()->active_workers();
 385     heap->set_par_threads(active_workers);
 386 
 387     PSPromotionManager::pre_scavenge();
 388 
 389     // We'll use the promotion manager again later.
 390     PSPromotionManager* promotion_manager = PSPromotionManager::vm_thread_promotion_manager();
 391     {
 392       GCTraceTime tm("Scavenge", false, false, &_gc_timer, _gc_tracer.gc_id());
 393       ParallelScavengeHeap::ParStrongRootsScope psrs;
 394 
 395       GCTaskQueue* q = GCTaskQueue::create();
 396 
 397       if (!old_gen->object_space()->is_empty()) {
 398         // There are only old-to-young pointers if there are objects
 399         // in the old gen.
 400         uint stripe_total = active_workers;
 401         for(uint i=0; i < stripe_total; i++) {
 402           q->enqueue(new OldToYoungRootsTask(old_gen, old_top, i, stripe_total));
 403         }
 404       }
 405 




 365     size_t young_gen_used_before = young_gen->used_in_bytes();
 366 
 367     // Reset our survivor overflow.
 368     set_survivor_overflow(false);
 369 
 370     // We need to save the old top values before
 371     // creating the promotion_manager. We pass the top
 372     // values to the card_table, to prevent it from
 373     // straying into the promotion labs.
 374     HeapWord* old_top = old_gen->object_space()->top();
 375 
 376     // Release all previously held resources
 377     gc_task_manager()->release_all_resources();
 378 
 379     // Set the number of GC threads to be used in this collection
 380     gc_task_manager()->set_active_gang();
 381     gc_task_manager()->task_idle_workers();
 382     // Get the active number of workers here and use that value
 383     // throughout the methods.
 384     uint active_workers = gc_task_manager()->active_workers();

 385 
 386     PSPromotionManager::pre_scavenge();
 387 
 388     // We'll use the promotion manager again later.
 389     PSPromotionManager* promotion_manager = PSPromotionManager::vm_thread_promotion_manager();
 390     {
 391       GCTraceTime tm("Scavenge", false, false, &_gc_timer, _gc_tracer.gc_id());
 392       ParallelScavengeHeap::ParStrongRootsScope psrs;
 393 
 394       GCTaskQueue* q = GCTaskQueue::create();
 395 
 396       if (!old_gen->object_space()->is_empty()) {
 397         // There are only old-to-young pointers if there are objects
 398         // in the old gen.
 399         uint stripe_total = active_workers;
 400         for(uint i=0; i < stripe_total; i++) {
 401           q->enqueue(new OldToYoungRootsTask(old_gen, old_top, i, stripe_total));
 402         }
 403       }
 404 


< prev index next >