hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
changeset 30155 a3a254791703
parent 30153 596ed88949ad
child 30173 13cf7580b000
equal deleted inserted replaced
30154:39cd4e2ccf1c 30155:a3a254791703
   594   GenCollectedHeap* gch = GenCollectedHeap::heap();
   594   GenCollectedHeap* gch = GenCollectedHeap::heap();
   595   // Since this is being done in a separate thread, need new resource
   595   // Since this is being done in a separate thread, need new resource
   596   // and handle marks.
   596   // and handle marks.
   597   ResourceMark rm;
   597   ResourceMark rm;
   598   HandleMark hm;
   598   HandleMark hm;
   599   // We would need multiple old-gen queues otherwise.
       
   600   assert(gch->n_gens() == 2, "Par young collection currently only works with one older gen.");
       
   601 
   599 
   602   ParScanThreadState& par_scan_state = _state_set->thread_state(worker_id);
   600   ParScanThreadState& par_scan_state = _state_set->thread_state(worker_id);
   603   assert(_state_set->is_valid(worker_id), "Should not have been called");
   601   assert(_state_set->is_valid(worker_id), "Should not have been called");
   604 
   602 
   605   par_scan_state.set_young_old_boundary(_young_old_boundary);
   603   par_scan_state.set_young_old_boundary(_young_old_boundary);
   920   int active_workers =
   918   int active_workers =
   921       AdaptiveSizePolicy::calc_active_workers(workers->total_workers(),
   919       AdaptiveSizePolicy::calc_active_workers(workers->total_workers(),
   922                                    workers->active_workers(),
   920                                    workers->active_workers(),
   923                                    Threads::number_of_non_daemon_threads());
   921                                    Threads::number_of_non_daemon_threads());
   924   workers->set_active_workers(active_workers);
   922   workers->set_active_workers(active_workers);
   925   assert(gch->n_gens() == 2,
       
   926          "Par collection currently only works with single older gen.");
       
   927   _old_gen = gch->old_gen();
   923   _old_gen = gch->old_gen();
   928 
   924 
   929   // If the next generation is too full to accommodate worst-case promotion
   925   // If the next generation is too full to accommodate worst-case promotion
   930   // from this generation, pass on collection; let the next generation
   926   // from this generation, pass on collection; let the next generation
   931   // do it.
   927   // do it.