< prev index next >

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

Print this page
rev 9431 : dihop-changes
rev 9433 : imported patch erik-jmasa-review
rev 9435 : [mq]: mikael-erik-review

*** 1014,1024 **** // Given that humongous objects are not allocated in young // regions, we'll first try to do the allocation without doing a // collection hoping that there's enough space in the heap. result = humongous_obj_allocate(word_size, AllocationContext::current()); if (result != NULL) { ! g1_policy()->add_last_old_allocated_bytes(humongous_obj_size_in_regions(word_size) * HeapRegion::GrainBytes); return result; } if (GC_locker::is_active_and_needs_gc()) { should_try_gc = false; --- 1014,1025 ---- // Given that humongous objects are not allocated in young // regions, we'll first try to do the allocation without doing a // collection hoping that there's enough space in the heap. result = humongous_obj_allocate(word_size, AllocationContext::current()); if (result != NULL) { ! size_t size_in_regions = humongous_obj_size_in_regions(word_size); ! g1_policy()->add_bytes_allocated_in_old_since_last_gc(size_in_regions * HeapRegion::GrainBytes); return result; } if (GC_locker::is_active_and_needs_gc()) { should_try_gc = false;
*** 5238,5248 **** DerivedPointerTable::update_pointers(); #endif } void G1CollectedHeap::record_obj_copy_mem_stats() { ! g1_policy()->add_last_old_allocated_bytes(_old_evac_stats.allocated() * HeapWordSize); _gc_tracer_stw->report_evacuation_statistics(create_g1_evac_summary(&_survivor_evac_stats), create_g1_evac_summary(&_old_evac_stats)); } --- 5239,5249 ---- DerivedPointerTable::update_pointers(); #endif } void G1CollectedHeap::record_obj_copy_mem_stats() { ! g1_policy()->add_bytes_allocated_in_old_since_last_gc(_old_evac_stats.allocated() * HeapWordSize); _gc_tracer_stw->report_evacuation_statistics(create_g1_evac_summary(&_survivor_evac_stats), create_g1_evac_summary(&_old_evac_stats)); }
*** 5630,5640 **** // there. This is in addition to any already evacuated objects. Notify the // policy about that. // Old gen regions do not cause an additional allocation: both the objects // still in the region and the ones already moved are accounted for elsewhere. if (cur->is_young()) { ! policy->add_last_old_allocated_bytes(HeapRegion::GrainBytes); } // The region is now considered to be old. cur->set_old(); // Do some allocation statistics accounting. Regions that failed evacuation // are always made old, so there is no need to update anything in the young --- 5631,5641 ---- // there. This is in addition to any already evacuated objects. Notify the // policy about that. // Old gen regions do not cause an additional allocation: both the objects // still in the region and the ones already moved are accounted for elsewhere. if (cur->is_young()) { ! policy->add_bytes_allocated_in_old_since_last_gc(HeapRegion::GrainBytes); } // The region is now considered to be old. cur->set_old(); // Do some allocation statistics accounting. Regions that failed evacuation // are always made old, so there is no need to update anything in the young
< prev index next >