1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu Feb 06 14:12:43 2014 +0100 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Mon Mar 17 15:18:38 2014 +0100 1.3 @@ -4743,6 +4743,12 @@ 1.4 oop forward_ptr = old->forward_to_atomic(obj); 1.5 if (forward_ptr == NULL) { 1.6 Copy::aligned_disjoint_words((HeapWord*) old, obj_ptr, word_sz); 1.7 + 1.8 + // alloc_purpose is just a hint to allocate() above, recheck the type of region 1.9 + // we actually allocated from and update alloc_purpose accordingly 1.10 + HeapRegion* to_region = _g1h->heap_region_containing_raw(obj_ptr); 1.11 + alloc_purpose = to_region->is_young() ? GCAllocForSurvived : GCAllocForTenured; 1.12 + 1.13 if (g1p->track_object_age(alloc_purpose)) { 1.14 // We could simply do obj->incr_age(). However, this causes a 1.15 // performance issue. obj->incr_age() will first check whether