Deleted Added
sdiff udiff text old ( 8869:ad916ca3715b ) new ( 8870:57093b085a8f )
full compact
1/*
2 * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *

--- 3746 unchanged lines hidden (view full) ---

3755 cl.total_humongous(),
3756 cl.candidate_humongous());
3757 _has_humongous_reclaim_candidates = cl.candidate_humongous() > 0;
3758
3759 // Finally flush all remembered set entries to re-check into the global DCQS.
3760 cl.flush_rem_set_entries();
3761}
3762
3763void
3764G1CollectedHeap::setup_surviving_young_words() {
3765 assert(_surviving_young_words == NULL, "pre-condition");
3766 uint array_length = g1_policy()->young_cset_region_length();
3767 _surviving_young_words = NEW_C_HEAP_ARRAY(size_t, (size_t) array_length, mtGC);
3768 if (_surviving_young_words == NULL) {
3769 vm_exit_out_of_memory(sizeof(size_t) * array_length, OOM_MALLOC_ERROR,
3770 "Not enough space for young surv words summary.");
3771 }
3772 memset(_surviving_young_words, 0, (size_t) array_length * sizeof(size_t));
3773#ifdef ASSERT
3774 for (uint i = 0; i < array_length; ++i) {
3775 assert( _surviving_young_words[i] == 0, "memset above" );
3776 }
3777#endif // !ASSERT
3778}
3779
3780void
3781G1CollectedHeap::update_surviving_young_words(size_t* surv_young_words) {
3782 MutexLockerEx x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag);
3783 uint array_length = g1_policy()->young_cset_region_length();
3784 for (uint i = 0; i < array_length; ++i) {
3785 _surviving_young_words[i] += surv_young_words[i];
3786 }
3787}
3788
3789void
3790G1CollectedHeap::cleanup_surviving_young_words() {
3791 guarantee( _surviving_young_words != NULL, "pre-condition" );
3792 FREE_C_HEAP_ARRAY(size_t, _surviving_young_words);
3793 _surviving_young_words = NULL;
3794}
3795
3796#ifdef ASSERT
3797class VerifyCSetClosure: public HeapRegionClosure {
3798public:

--- 801 unchanged lines hidden (view full) ---

4600 evac_term_attempts = evac.term_attempts();
4601 term_sec = evac.term_time();
4602 double elapsed_sec = os::elapsedTime() - start;
4603 _g1h->g1_policy()->phase_times()->add_time_secs(G1GCPhaseTimes::ObjCopy, worker_id, elapsed_sec - term_sec);
4604 _g1h->g1_policy()->phase_times()->record_time_secs(G1GCPhaseTimes::Termination, worker_id, term_sec);
4605 _g1h->g1_policy()->phase_times()->record_thread_work_item(G1GCPhaseTimes::Termination, worker_id, evac_term_attempts);
4606 }
4607
4608 // Flush any statistics.
4609 _g1h->g1_policy()->record_thread_age_table(pss->age_table());
4610 _g1h->update_surviving_young_words(pss->surviving_young_words());
4611
4612 assert(pss->queue_is_empty(), "should be empty");
4613
4614 if (PrintTerminationStats) {
4615 MutexLockerEx x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag);
4616 size_t lab_waste;
4617 size_t lab_undo_waste;
4618 pss->waste(lab_waste, lab_undo_waste);
4619 _g1h->print_termination_stats(gclog_or_tty,

--- 2180 unchanged lines hidden ---