< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Print this page
rev 60584 : imported patch 8245511-ihop
@@ -875,11 +875,11 @@
// collection hoping that there's enough space in the heap.
result = humongous_obj_allocate(word_size);
if (result != NULL) {
size_t size_in_regions = humongous_obj_size_in_regions(word_size);
policy()->old_gen_alloc_tracker()->
- add_allocated_bytes_since_last_gc(size_in_regions * HeapRegion::GrainBytes);
+ add_allocated_humongous_bytes_since_last_gc(size_in_regions * HeapRegion::GrainBytes);
return result;
}
// Only try a GC if the GCLocker does not signal the need for a GC. Wait until
// the GCLocker initiated GC has been performed and then retry. This includes
@@ -895,10 +895,13 @@
GCCause::_g1_humongous_allocation);
if (result != NULL) {
assert(succeeded, "only way to get back a non-NULL result");
log_trace(gc, alloc)("%s: Successfully scheduled collection returning " PTR_FORMAT,
Thread::current()->name(), p2i(result));
+ size_t size_in_regions = humongous_obj_size_in_regions(word_size);
+ policy()->old_gen_alloc_tracker()->
+ record_collection_pause_humongous_allocation(size_in_regions * HeapRegion::GrainBytes);
return result;
}
if (succeeded) {
// We successfully scheduled a collection which failed to allocate. No
< prev index next >