< prev index next >

src/share/vm/gc/g1/g1CollectedHeap.cpp

Print this page




4372   // the pending list.
4373   if (!rp->processing_is_mt()) {
4374     // Serial reference processing...
4375     rp->enqueue_discovered_references();
4376   } else {
4377     // Parallel reference enqueueing
4378 
4379     uint n_workers = workers()->active_workers();
4380 
4381     assert(n_workers <= rp->max_num_q(),
4382            "Mismatch between the number of GC workers %u and the maximum number of Reference process queues %u",
4383            n_workers,  rp->max_num_q());
4384 
4385     G1STWRefProcTaskExecutor par_task_executor(this, per_thread_states, workers(), _task_queues, n_workers);
4386     rp->enqueue_discovered_references(&par_task_executor);
4387   }
4388 
4389   rp->verify_no_references_recorded();
4390   assert(!rp->discovery_enabled(), "should have been disabled");
4391 









4392   // FIXME
4393   // CM's reference processing also cleans up the string and symbol tables.
4394   // Should we do that here also? We could, but it is a serial operation
4395   // and could significantly increase the pause time.
4396 
4397   double ref_enq_time = os::elapsedTime() - ref_enq_start;
4398   g1_policy()->phase_times()->record_ref_enq_time(ref_enq_time * 1000.0);
4399 }
4400 
4401 void G1CollectedHeap::merge_per_thread_state_info(G1ParScanThreadStateSet* per_thread_states) {
4402   double merge_pss_time_start = os::elapsedTime();
4403   per_thread_states->flush();
4404   g1_policy()->phase_times()->record_merge_pss_time_ms((os::elapsedTime() - merge_pss_time_start) * 1000.0);
4405 }
4406 
4407 void G1CollectedHeap::pre_evacuate_collection_set() {
4408   _expand_heap_after_alloc_failure = true;
4409   _evacuation_failed = false;
4410 
4411   // Disable the hot card cache.




4372   // the pending list.
4373   if (!rp->processing_is_mt()) {
4374     // Serial reference processing...
4375     rp->enqueue_discovered_references();
4376   } else {
4377     // Parallel reference enqueueing
4378 
4379     uint n_workers = workers()->active_workers();
4380 
4381     assert(n_workers <= rp->max_num_q(),
4382            "Mismatch between the number of GC workers %u and the maximum number of Reference process queues %u",
4383            n_workers,  rp->max_num_q());
4384 
4385     G1STWRefProcTaskExecutor par_task_executor(this, per_thread_states, workers(), _task_queues, n_workers);
4386     rp->enqueue_discovered_references(&par_task_executor);
4387   }
4388 
4389   rp->verify_no_references_recorded();
4390   assert(!rp->discovery_enabled(), "should have been disabled");
4391 
4392   // If during an initial mark pause we install a pending list head which is not otherwise reachable
4393   // ensure that it is marked in the bitmap for concurrent marking to discover.
4394   if (collector_state()->during_initial_mark_pause()) {
4395     oop pll_head = Universe::reference_pending_list();
4396     if (pll_head != NULL) {
4397       _cm->grayRoot(pll_head);
4398     }
4399   }
4400 
4401   // FIXME
4402   // CM's reference processing also cleans up the string and symbol tables.
4403   // Should we do that here also? We could, but it is a serial operation
4404   // and could significantly increase the pause time.
4405 
4406   double ref_enq_time = os::elapsedTime() - ref_enq_start;
4407   g1_policy()->phase_times()->record_ref_enq_time(ref_enq_time * 1000.0);
4408 }
4409 
4410 void G1CollectedHeap::merge_per_thread_state_info(G1ParScanThreadStateSet* per_thread_states) {
4411   double merge_pss_time_start = os::elapsedTime();
4412   per_thread_states->flush();
4413   g1_policy()->phase_times()->record_merge_pss_time_ms((os::elapsedTime() - merge_pss_time_start) * 1000.0);
4414 }
4415 
4416 void G1CollectedHeap::pre_evacuate_collection_set() {
4417   _expand_heap_after_alloc_failure = true;
4418   _evacuation_failed = false;
4419 
4420   // Disable the hot card cache.


< prev index next >