< prev index next >

src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp

Print this page
*** 159,11 ***
                                                                 markWord test_mark) {
    assert(should_scavenge(&o), "Sanity");
  
    oop new_obj = NULL;
    bool new_obj_is_tenured = false;
!   size_t new_obj_size = o->size();
  
    // 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();
  
--- 159,11 ---
                                                                 markWord test_mark) {
    assert(should_scavenge(&o), "Sanity");
  
    oop new_obj = NULL;
    bool new_obj_is_tenured = false;
!   size_t new_obj_size = o->compact_size();
  
    // 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();
  

*** 248,11 ***
    }
  
    assert(new_obj != NULL, "allocation should have succeeded");
  
    // Copy obj
!   Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(o), cast_from_oop<HeapWord*>(new_obj), new_obj_size);
  
    // Now we have to CAS in the header.
    // Make copy visible to threads reading the forwardee.
    oop forwardee = o->forward_to_atomic(new_obj, test_mark, memory_order_release);
    if (forwardee == NULL) {  // forwardee is NULL when forwarding is successful
--- 248,11 ---
    }
  
    assert(new_obj != NULL, "allocation should have succeeded");
  
    // Copy obj
!   o->copy_disjoint_compact(cast_from_oop<HeapWord*>(new_obj), new_obj_size);
  
    // Now we have to CAS in the header.
    // Make copy visible to threads reading the forwardee.
    oop forwardee = o->forward_to_atomic(new_obj, test_mark, memory_order_release);
    if (forwardee == NULL) {  // forwardee is NULL when forwarding is successful
< prev index next >