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

changeset 6398
b7e42ada4898
parent 6397
d60ecdb2773e
child 6402
191174b49bec
equal deleted inserted replaced
6397:d60ecdb2773e 6398:b7e42ada4898
4741 Prefetch::write(obj_ptr, PrefetchCopyIntervalInBytes); 4741 Prefetch::write(obj_ptr, PrefetchCopyIntervalInBytes);
4742 4742
4743 oop forward_ptr = old->forward_to_atomic(obj); 4743 oop forward_ptr = old->forward_to_atomic(obj);
4744 if (forward_ptr == NULL) { 4744 if (forward_ptr == NULL) {
4745 Copy::aligned_disjoint_words((HeapWord*) old, obj_ptr, word_sz); 4745 Copy::aligned_disjoint_words((HeapWord*) old, obj_ptr, word_sz);
4746
4747 // alloc_purpose is just a hint to allocate() above, recheck the type of region
4748 // we actually allocated from and update alloc_purpose accordingly
4749 HeapRegion* to_region = _g1h->heap_region_containing_raw(obj_ptr);
4750 alloc_purpose = to_region->is_young() ? GCAllocForSurvived : GCAllocForTenured;
4751
4746 if (g1p->track_object_age(alloc_purpose)) { 4752 if (g1p->track_object_age(alloc_purpose)) {
4747 // We could simply do obj->incr_age(). However, this causes a 4753 // We could simply do obj->incr_age(). However, this causes a
4748 // performance issue. obj->incr_age() will first check whether 4754 // performance issue. obj->incr_age() will first check whether
4749 // the object has a displaced mark by checking its mark word; 4755 // the object has a displaced mark by checking its mark word;
4750 // getting the mark word from the new location of the object 4756 // getting the mark word from the new location of the object

mercurial