< prev index next >

src/hotspot/share/gc/parallel/psParallelCompact.cpp

Print this page

1095                                           space->bottom(), space->top(), nullptr,
1096                                           space->bottom(), space->end(), nta);
1097     assert(result, "space must fit into itself");
1098     _space_info[i].set_dense_prefix(space->bottom());
1099   }
1100 }
1101 
1102 void PSParallelCompact::fill_dense_prefix_end(SpaceId id) {
1103   // Comparing two sizes to decide if filling is required:
1104   //
1105   // The size of the filler (min-obj-size) is 2 heap words with the default
1106   // MinObjAlignment, since both markword and klass take 1 heap word.
1107   //
1108   // The size of the gap (if any) right before dense-prefix-end is
1109   // MinObjAlignment.
1110   //
1111   // Need to fill in the gap only if it's smaller than min-obj-size, and the
1112   // filler obj will extend to next region.
1113 
1114   // Note: If min-fill-size decreases to 1, this whole method becomes redundant.




1115   assert(CollectedHeap::min_fill_size() >= 2, "inv");
1116 #ifndef _LP64
1117   // In 32-bit system, each heap word is 4 bytes, so MinObjAlignment == 2.
1118   // The gap is always equal to min-fill-size, so nothing to do.
1119   return;
1120 #endif
1121   if (MinObjAlignment > 1) {
1122     return;
1123   }
1124   assert(CollectedHeap::min_fill_size() == 2, "inv");
1125   HeapWord* const dense_prefix_end = dense_prefix(id);
1126   RegionData* const region_after_dense_prefix = _summary_data.addr_to_region_ptr(dense_prefix_end);
1127   idx_t const dense_prefix_bit = _mark_bitmap.addr_to_bit(dense_prefix_end);
1128 
1129   if (region_after_dense_prefix->partial_obj_size() != 0 ||
1130       _mark_bitmap.is_obj_beg(dense_prefix_bit)) {
1131     // The region after the dense prefix starts with live bytes.
1132     return;
1133   }
1134 

1095                                           space->bottom(), space->top(), nullptr,
1096                                           space->bottom(), space->end(), nta);
1097     assert(result, "space must fit into itself");
1098     _space_info[i].set_dense_prefix(space->bottom());
1099   }
1100 }
1101 
1102 void PSParallelCompact::fill_dense_prefix_end(SpaceId id) {
1103   // Comparing two sizes to decide if filling is required:
1104   //
1105   // The size of the filler (min-obj-size) is 2 heap words with the default
1106   // MinObjAlignment, since both markword and klass take 1 heap word.
1107   //
1108   // The size of the gap (if any) right before dense-prefix-end is
1109   // MinObjAlignment.
1110   //
1111   // Need to fill in the gap only if it's smaller than min-obj-size, and the
1112   // filler obj will extend to next region.
1113 
1114   // Note: If min-fill-size decreases to 1, this whole method becomes redundant.
1115   if (UseCompactObjectHeaders) {
1116     // The gap is always equal to min-fill-size, so nothing to do.
1117     return;
1118   }
1119   assert(CollectedHeap::min_fill_size() >= 2, "inv");
1120 #ifndef _LP64
1121   // In 32-bit system, each heap word is 4 bytes, so MinObjAlignment == 2.
1122   // The gap is always equal to min-fill-size, so nothing to do.
1123   return;
1124 #endif
1125   if (MinObjAlignment > 1) {
1126     return;
1127   }
1128   assert(CollectedHeap::min_fill_size() == 2, "inv");
1129   HeapWord* const dense_prefix_end = dense_prefix(id);
1130   RegionData* const region_after_dense_prefix = _summary_data.addr_to_region_ptr(dense_prefix_end);
1131   idx_t const dense_prefix_bit = _mark_bitmap.addr_to_bit(dense_prefix_end);
1132 
1133   if (region_after_dense_prefix->partial_obj_size() != 0 ||
1134       _mark_bitmap.is_obj_beg(dense_prefix_bit)) {
1135     // The region after the dense prefix starts with live bytes.
1136     return;
1137   }
1138 
< prev index next >