< prev index next >
./42c9c92d320a.export
Print this page
*** 22,37 ****
- g1_policy()->phase_times()->record_update_rs_processed_buffers(worker_i, n_completed_buffers);
+ g1_policy()->phase_times()->record_thread_work_item(G1GCPhaseTimes::UpdateRS, worker_i, n_completed_buffers);
dcqs.clear_n_completed_buffers();
assert(!dcqs.completed_buffers_exist_dirty(), "Completed buffers exist!");
}
! @@ -3751,9 +3751,9 @@
TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty);
! - int active_workers = workers()->active_workers();
! + uint active_workers = workers()->active_workers();
double pause_start_sec = os::elapsedTime();
- g1_policy()->phase_times()->note_gc_start(active_workers);
+ g1_policy()->phase_times()->note_gc_start(active_workers, mark_in_progress());
log_gc_header();
--- 22,38 ----
- g1_policy()->phase_times()->record_update_rs_processed_buffers(worker_i, n_completed_buffers);
+ g1_policy()->phase_times()->record_thread_work_item(G1GCPhaseTimes::UpdateRS, worker_i, n_completed_buffers);
dcqs.clear_n_completed_buffers();
assert(!dcqs.completed_buffers_exist_dirty(), "Completed buffers exist!");
}
! @@ -3751,10 +3751,10 @@
TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty);
! - int active_workers = (G1CollectedHeap::use_parallel_gc_threads() ?
! + uint active_workers = (G1CollectedHeap::use_parallel_gc_threads() ?
! workers()->active_workers() : 1);
double pause_start_sec = os::elapsedTime();
- g1_policy()->phase_times()->note_gc_start(active_workers);
+ g1_policy()->phase_times()->note_gc_start(active_workers, mark_in_progress());
log_gc_header();
*** 106,125 ****
}
- g1_policy()->phase_times()->record_satb_filtering_time(worker_i, satb_filtering_ms);
// Now scan the complement of the collection set.
G1CodeBlobClosure scavenge_cs_nmethods(scan_non_heap_weak_roots);
! @@ -5073,14 +5064,13 @@
G1RedirtyLoggedCardsTask(DirtyCardQueueSet* queue) : AbstractGangTask("Redirty Cards"), _queue(queue) { }
virtual void work(uint worker_id) {
- double start_time = os::elapsedTime();
+ G1GCPhaseTimes* phase_times = G1CollectedHeap::heap()->g1_policy()->phase_times();
+ G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::RedirtyCards, worker_id);
RedirtyLoggedCardTableEntryClosure cl;
_queue->par_apply_closure_to_all_completed_buffers(&cl);
- G1GCPhaseTimes* timer = G1CollectedHeap::heap()->g1_policy()->phase_times();
- timer->record_redirty_logged_cards_time_ms(worker_id, (os::elapsedTime() - start_time) * 1000.0);
- timer->record_redirty_logged_cards_processed_cards(worker_id, cl.num_processed());
+ phase_times->record_thread_work_item(G1GCPhaseTimes::RedirtyCards, worker_id, cl.num_processed());
--- 107,130 ----
}
- g1_policy()->phase_times()->record_satb_filtering_time(worker_i, satb_filtering_ms);
// Now scan the complement of the collection set.
G1CodeBlobClosure scavenge_cs_nmethods(scan_non_heap_weak_roots);
! @@ -5073,18 +5064,17 @@
G1RedirtyLoggedCardsTask(DirtyCardQueueSet* queue) : AbstractGangTask("Redirty Cards"), _queue(queue) { }
virtual void work(uint worker_id) {
- double start_time = os::elapsedTime();
+ G1GCPhaseTimes* phase_times = G1CollectedHeap::heap()->g1_policy()->phase_times();
+ G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::RedirtyCards, worker_id);
RedirtyLoggedCardTableEntryClosure cl;
+ if (G1CollectedHeap::heap()->use_parallel_gc_threads()) {
_queue->par_apply_closure_to_all_completed_buffers(&cl);
+ } else {
+ _queue->apply_closure_to_all_completed_buffers(&cl);
+ }
- G1GCPhaseTimes* timer = G1CollectedHeap::heap()->g1_policy()->phase_times();
- timer->record_redirty_logged_cards_time_ms(worker_id, (os::elapsedTime() - start_time) * 1000.0);
- timer->record_redirty_logged_cards_processed_cards(worker_id, cl.num_processed());
+ phase_times->record_thread_work_item(G1GCPhaseTimes::RedirtyCards, worker_id, cl.num_processed());
*** 340,350 ****
- if (G1Log::finest()) {
- buf.append(" ");
- buf.append(_print_format, val);
- }
+ ~WorkerDataArray() {
! + FREE_C_HEAP_ARRAY(T, _data);
}
- if (G1Log::finest()) {
- buf.append_and_print_cr("%s", "");
+ void link_thread_work_items(WorkerDataArray<size_t>* thread_work_items) {
--- 345,355 ----
- if (G1Log::finest()) {
- buf.append(" ");
- buf.append(_print_format, val);
- }
+ ~WorkerDataArray() {
! + FREE_C_HEAP_ARRAY(T, _data, mtGC);
}
- if (G1Log::finest()) {
- buf.append_and_print_cr("%s", "");
+ void link_thread_work_items(WorkerDataArray<size_t>* thread_work_items) {
*** 831,841 ****
- if (G1Log::finest()) {
- _last_redirty_logged_cards_time_ms.print(3, "Parallel Redirty");
- _last_redirty_logged_cards_processed_cards.print(3, "Redirtied Cards");
- }
+ par_phase_printer.print(RedirtyCards);
! if (G1EagerReclaimHumongousObjects) {
print_stats(2, "Humongous Register", _cur_fast_reclaim_humongous_register_time_ms);
if (G1Log::finest()) {
@@ -366,3 +559,17 @@
print_stats(2, "Verify After", _cur_verify_after_time_ms);
}
--- 836,846 ----
- if (G1Log::finest()) {
- _last_redirty_logged_cards_time_ms.print(3, "Parallel Redirty");
- _last_redirty_logged_cards_processed_cards.print(3, "Redirtied Cards");
- }
+ par_phase_printer.print(RedirtyCards);
! if (G1ReclaimDeadHumongousObjectsAtYoungGC) {
print_stats(2, "Humongous Register", _cur_fast_reclaim_humongous_register_time_ms);
if (G1Log::finest()) {
@@ -366,3 +559,17 @@
print_stats(2, "Verify After", _cur_verify_after_time_ms);
}
*** 887,897 ****
- assert(length > 0, "Must have some workers to store data for");
- _data = NEW_C_HEAP_ARRAY(T, _length, mtGC);
- }
-
- ~WorkerDataArray() {
! - FREE_C_HEAP_ARRAY(T, _data);
- }
-
- void set(uint worker_i, T value) {
- assert(worker_i < _length, err_msg("Worker %d is greater than max: %d", worker_i, _length));
- assert(_data[worker_i] == (T)-1, err_msg("Overwriting data for worker %d", worker_i));
--- 892,902 ----
- assert(length > 0, "Must have some workers to store data for");
- _data = NEW_C_HEAP_ARRAY(T, _length, mtGC);
- }
-
- ~WorkerDataArray() {
! - FREE_C_HEAP_ARRAY(T, _data, mtGC);
- }
-
- void set(uint worker_i, T value) {
- assert(worker_i < _length, err_msg("Worker %d is greater than max: %d", worker_i, _length));
- assert(_data[worker_i] == (T)-1, err_msg("Overwriting data for worker %d", worker_i));
*** 1245,1255 ****
- unlink_or_oops_do(NULL, keep_alive);
+ unlink_or_oops_do(NULL, keep_alive, true /* allow_resize_and_rehash */);
}
void G1StringDedup::unlink(BoolObjectClosure* is_alive) {
! @@ -123,45 +123,39 @@
class G1StringDedupUnlinkOrOopsDoTask : public AbstractGangTask {
private:
G1StringDedupUnlinkOrOopsDoClosure _cl;
+ G1GCPhaseTimes* _phase_times;
--- 1250,1260 ----
- unlink_or_oops_do(NULL, keep_alive);
+ unlink_or_oops_do(NULL, keep_alive, true /* allow_resize_and_rehash */);
}
void G1StringDedup::unlink(BoolObjectClosure* is_alive) {
! @@ -123,49 +123,43 @@
class G1StringDedupUnlinkOrOopsDoTask : public AbstractGangTask {
private:
G1StringDedupUnlinkOrOopsDoClosure _cl;
+ G1GCPhaseTimes* _phase_times;
*** 1297,1310 ****
--- 1302,1319 ----
- g1p->phase_times()->note_string_dedup_fixup_start();
- double fixup_start = os::elapsedTime();
- G1StringDedupUnlinkOrOopsDoTask task(is_alive, keep_alive, allow_resize_and_rehash);
+ G1StringDedupUnlinkOrOopsDoTask task(is_alive, keep_alive, allow_resize_and_rehash, phase_times);
+ if (G1CollectedHeap::use_parallel_gc_threads()) {
G1CollectedHeap* g1h = G1CollectedHeap::heap();
g1h->set_par_threads();
g1h->workers()->run_task(&task);
g1h->set_par_threads(0);
+ } else {
+ task.work(0);
+ }
-
- double fixup_time_ms = (os::elapsedTime() - fixup_start) * 1000.0;
- g1p->phase_times()->record_string_dedup_fixup_time(fixup_time_ms);
- g1p->phase_times()->note_string_dedup_fixup_end();
}
< prev index next >