< prev index next >

src/share/vm/gc/cms/parNewGeneration.cpp

Print this page




 884 
 885   // If the next generation is too full to accommodate worst-case promotion
 886   // from this generation, pass on collection; let the next generation
 887   // do it.
 888   if (!collection_attempt_is_safe()) {
 889     gch->set_incremental_collection_failed();  // slight lie, in that we did not even attempt one
 890     return;
 891   }
 892   assert(to()->is_empty(), "Else not collection_attempt_is_safe");
 893 
 894   _gc_tracer.report_gc_start(gch->gc_cause(), _gc_timer->gc_start());
 895   gch->trace_heap_before_gc(gc_tracer());
 896 
 897   init_assuming_no_promotion_failure();
 898 
 899   if (UseAdaptiveSizePolicy) {
 900     set_survivor_overflow(false);
 901     size_policy->minor_collection_begin();
 902   }
 903 
 904   GCTraceTime(Trace, gc) t1("ParNew", NULL, gch->gc_cause());
 905 
 906   age_table()->clear();
 907   to()->clear(SpaceDecorator::Mangle);
 908 
 909   gch->save_marks();
 910 
 911   // Set the correct parallelism (number of queues) in the reference processor
 912   ref_processor()->set_active_mt_degree(active_workers);
 913 
 914   // Need to initialize the preserved marks before the ThreadStateSet c'tor.
 915   _preserved_marks_set.init(active_workers);
 916 
 917   // Always set the terminator for the active number of workers
 918   // because only those workers go through the termination protocol.
 919   ParallelTaskTerminator _term(active_workers, task_queues());
 920   ParScanThreadStateSet thread_state_set(active_workers,
 921                                          *to(), *this, *_old_gen, *task_queues(),
 922                                          _overflow_stacks, _preserved_marks_set,
 923                                          desired_plab_sz(), _term);
 924 




 884 
 885   // If the next generation is too full to accommodate worst-case promotion
 886   // from this generation, pass on collection; let the next generation
 887   // do it.
 888   if (!collection_attempt_is_safe()) {
 889     gch->set_incremental_collection_failed();  // slight lie, in that we did not even attempt one
 890     return;
 891   }
 892   assert(to()->is_empty(), "Else not collection_attempt_is_safe");
 893 
 894   _gc_tracer.report_gc_start(gch->gc_cause(), _gc_timer->gc_start());
 895   gch->trace_heap_before_gc(gc_tracer());
 896 
 897   init_assuming_no_promotion_failure();
 898 
 899   if (UseAdaptiveSizePolicy) {
 900     set_survivor_overflow(false);
 901     size_policy->minor_collection_begin();
 902   }
 903 
 904   GCTraceTime(Trace, gc, phases) t1("ParNew", NULL, gch->gc_cause());
 905 
 906   age_table()->clear();
 907   to()->clear(SpaceDecorator::Mangle);
 908 
 909   gch->save_marks();
 910 
 911   // Set the correct parallelism (number of queues) in the reference processor
 912   ref_processor()->set_active_mt_degree(active_workers);
 913 
 914   // Need to initialize the preserved marks before the ThreadStateSet c'tor.
 915   _preserved_marks_set.init(active_workers);
 916 
 917   // Always set the terminator for the active number of workers
 918   // because only those workers go through the termination protocol.
 919   ParallelTaskTerminator _term(active_workers, task_queues());
 920   ParScanThreadStateSet thread_state_set(active_workers,
 921                                          *to(), *this, *_old_gen, *task_queues(),
 922                                          _overflow_stacks, _preserved_marks_set,
 923                                          desired_plab_sz(), _term);
 924 


< prev index next >