< prev index next >

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

Print this page

        

*** 158,170 **** // The from card cache is not the memory that is actually committed. So we cannot // take advantage of the zero_filled parameter. reset_from_card_cache(start_idx, num_regions); } ! Tickspan G1CollectedHeap::run_task(AbstractGangTask* task) { ! Ticks start = Ticks::now(); workers()->run_task(task, workers()->active_workers()); return Ticks::now() - start; } HeapRegion* G1CollectedHeap::new_heap_region(uint hrs_index, MemRegion mr) { --- 158,174 ---- // The from card cache is not the memory that is actually committed. So we cannot // take advantage of the zero_filled parameter. reset_from_card_cache(start_idx, num_regions); } ! void G1CollectedHeap::run_task(AbstractGangTask* task) { workers()->run_task(task, workers()->active_workers()); + } + + Tickspan G1CollectedHeap::run_task_timed(AbstractGangTask* task) { + Ticks start = Ticks::now(); + run_task(task); return Ticks::now() - start; } HeapRegion* G1CollectedHeap::new_heap_region(uint hrs_index, MemRegion mr) {
*** 3765,3775 **** phase_times()->record_prepare_heap_roots_time_ms((Ticks::now() - start).seconds() * 1000.0); } { G1PrepareEvacuationTask g1_prep_task(this); ! Tickspan task_time = run_task(&g1_prep_task); phase_times()->record_register_regions(task_time.seconds() * 1000.0, g1_prep_task.humongous_total(), g1_prep_task.humongous_candidates()); } --- 3769,3779 ---- phase_times()->record_prepare_heap_roots_time_ms((Ticks::now() - start).seconds() * 1000.0); } { G1PrepareEvacuationTask g1_prep_task(this); ! Tickspan task_time = run_task_timed(&g1_prep_task); phase_times()->record_register_regions(task_time.seconds() * 1000.0, g1_prep_task.humongous_total(), g1_prep_task.humongous_candidates()); }
*** 3912,3922 **** Ticks start_processing = Ticks::now(); { G1RootProcessor root_processor(this, num_workers); G1EvacuateRegionsTask g1_par_task(this, per_thread_states, _task_queues, &root_processor, num_workers); ! task_time = run_task(&g1_par_task); // Closing the inner scope will execute the destructor for the G1RootProcessor object. // To extract its code root fixup time we measure total time of this scope and // subtract from the time the WorkGang task took. } Tickspan total_processing = Ticks::now() - start_processing; --- 3916,3926 ---- Ticks start_processing = Ticks::now(); { G1RootProcessor root_processor(this, num_workers); G1EvacuateRegionsTask g1_par_task(this, per_thread_states, _task_queues, &root_processor, num_workers); ! task_time = run_task_timed(&g1_par_task); // Closing the inner scope will execute the destructor for the G1RootProcessor object. // To extract its code root fixup time we measure total time of this scope and // subtract from the time the WorkGang task took. } Tickspan total_processing = Ticks::now() - start_processing;
*** 3951,3961 **** Ticks start_processing = Ticks::now(); { G1MarkScope code_mark_scope; G1EvacuateOptionalRegionsTask task(per_thread_states, _task_queues, workers()->active_workers()); ! task_time = run_task(&task); // See comment in evacuate_collection_set() for the reason of the scope. } Tickspan total_processing = Ticks::now() - start_processing; G1GCPhaseTimes* p = phase_times(); --- 3955,3965 ---- Ticks start_processing = Ticks::now(); { G1MarkScope code_mark_scope; G1EvacuateOptionalRegionsTask task(per_thread_states, _task_queues, workers()->active_workers()); ! task_time = run_task_timed(&task); // See comment in evacuate_collection_set() for the reason of the scope. } Tickspan total_processing = Ticks::now() - start_processing; G1GCPhaseTimes* p = phase_times();
< prev index next >