< prev index next >

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

Print this page

        

*** 4224,4234 **** G1CollectedHeap* g1h = G1CollectedHeap::heap(); HeapRegion* r = g1h->region_at(region_idx); assert(!g1h->is_on_master_free_list(r), "sanity"); ! Atomic::add(r->rem_set()->occupied_locked(), &_rs_length); if (!is_young) { g1h->hot_card_cache()->reset_card_counts(r); } --- 4224,4234 ---- G1CollectedHeap* g1h = G1CollectedHeap::heap(); HeapRegion* r = g1h->region_at(region_idx); assert(!g1h->is_on_master_free_list(r), "sanity"); ! Atomic::add(&_rs_length, r->rem_set()->occupied_locked()); if (!is_young) { g1h->hot_card_cache()->reset_card_counts(r); }
*** 4288,4298 **** virtual void work(uint worker_id) { G1GCPhaseTimes* timer = G1CollectedHeap::heap()->phase_times(); // Claim serial work. if (_serial_work_claim == 0) { ! jint value = Atomic::add(1, &_serial_work_claim) - 1; if (value == 0) { double serial_time = os::elapsedTime(); do_serial_work(); timer->record_serial_free_cset_time_ms((os::elapsedTime() - serial_time) * 1000.0); } --- 4288,4298 ---- virtual void work(uint worker_id) { G1GCPhaseTimes* timer = G1CollectedHeap::heap()->phase_times(); // Claim serial work. if (_serial_work_claim == 0) { ! jint value = Atomic::add(&_serial_work_claim, 1) - 1; if (value == 0) { double serial_time = os::elapsedTime(); do_serial_work(); timer->record_serial_free_cset_time_ms((os::elapsedTime() - serial_time) * 1000.0); }
*** 4303,4313 **** bool has_young_time = false; double non_young_time = 0.0; bool has_non_young_time = false; while (true) { ! size_t end = Atomic::add(chunk_size(), &_parallel_work_claim); size_t cur = end - chunk_size(); if (cur >= _num_work_items) { break; } --- 4303,4313 ---- bool has_young_time = false; double non_young_time = 0.0; bool has_non_young_time = false; while (true) { ! size_t end = Atomic::add(&_parallel_work_claim, chunk_size()); size_t cur = end - chunk_size(); if (cur >= _num_work_items) { break; }
< prev index next >