< prev index next >

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

Print this page
@@ -175,11 +175,12 @@
    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();
  

@@ -277,10 +278,12 @@
      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 >