< prev index next > src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp
Print this page
assert(!test_mark.is_forwarded(), "precondition");
Klass* klass = UseCompactObjectHeaders
? test_mark.klass()
: o->klass();
- size_t new_obj_size = o->size_given_klass(klass);
+ size_t old_obj_size = o->size_given_mark_and_klass(test_mark, klass);
+ size_t new_obj_size = o->copy_size(old_obj_size, test_mark);
// Find the objects age, MT safe.
uint age = (test_mark.has_displaced_mark_helper() /* o->has_displaced_mark() */) ?
test_mark.displaced_mark_helper().age() : test_mark.age();
}
assert(new_obj_addr != nullptr, "allocation should have succeeded");
// Copy obj
- Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(o), new_obj_addr, new_obj_size);
+ Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(o), new_obj_addr, old_obj_size);
// Now we have to CAS in the header.
// Because the forwarding is done with memory_order_relaxed there is no
// ordering with the above copy. Clients that get the forwardee must not
// examine its contents without other synchronization, since the contents
if (!new_obj_is_tenured) {
new_obj->incr_age();
assert(young_space()->contains(new_obj), "Attempt to push non-promoted obj");
}
+ new_obj->initialize_hash_if_necessary(o);
+
ContinuationGCSupport::transform_stack_chunk(new_obj);
// Do the size comparison first with new_obj_size, which we
// already have. Hopefully, only a few objects are larger than
// _min_array_size_for_chunking, and most of them will be arrays.
< prev index next >