Mercurial > hg > graal-compiler
diff src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp @ 1571:2d127394260e
6916623: Align object to 16 bytes to use Compressed Oops with java heap up to 64Gb
Summary: Added new product ObjectAlignmentInBytes flag to control object alignment.
Reviewed-by: twisti, ysr, iveresov
author | kvn |
---|---|
date | Thu, 27 May 2010 18:01:56 -0700 |
parents | cff162798819 |
children | e9ff18c4ace7 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp Thu May 27 09:54:07 2010 -0700 +++ b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp Thu May 27 18:01:56 2010 -0700 @@ -711,6 +711,7 @@ // object in the region. if (region_ptr->data_size() == RegionSize) { result += pointer_delta(addr, region_addr); + DEBUG_ONLY(PSParallelCompact::check_new_location(addr, result);) return result; } @@ -1487,13 +1488,14 @@ space->set_top_for_allocations(); } - size_t obj_len = 8; + size_t min_size = CollectedHeap::min_fill_size(); + size_t obj_len = min_size; while (b + obj_len <= t) { CollectedHeap::fill_with_object(b, obj_len); mark_bitmap()->mark_obj(b, obj_len); summary_data().add_obj(b, obj_len); b += obj_len; - obj_len = (obj_len & 0x18) + 8; // 8 16 24 32 8 16 24 32 ... + obj_len = (obj_len & (min_size*3)) + min_size; // 8 16 24 32 8 16 24 32 ... } if (b < t) { // The loop didn't completely fill to t (top); adjust top downward. @@ -1680,11 +1682,13 @@ // +-------+ // Initially assume case a, c or e will apply. - size_t obj_len = (size_t)oopDesc::header_size(); + size_t obj_len = CollectedHeap::min_fill_size(); HeapWord* obj_beg = dense_prefix_end - obj_len; #ifdef _LP64 - if (_mark_bitmap.is_obj_end(dense_prefix_bit - 2)) { + if (MinObjAlignment > 1) { // object alignment > heap word size + // Cases a, c or e. + } else if (_mark_bitmap.is_obj_end(dense_prefix_bit - 2)) { // Case b above. obj_beg = dense_prefix_end - 1; } else if (!_mark_bitmap.is_obj_end(dense_prefix_bit - 3) &&