mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-12 06:29:37 +00:00
8278289: Drop G1BlockOffsetTablePart::_object_can_span
Reviewed-by: tschatzl, sjohanss, mli
This commit is contained in:
parent
b2638e5efd
commit
44fcee3830
@ -75,7 +75,6 @@ void G1BlockOffsetTable::check_index(size_t index, const char* msg) const {
|
||||
|
||||
G1BlockOffsetTablePart::G1BlockOffsetTablePart(G1BlockOffsetTable* array, HeapRegion* hr) :
|
||||
_next_offset_threshold(NULL),
|
||||
DEBUG_ONLY(_object_can_span(false) COMMA)
|
||||
_bot(array),
|
||||
_hr(hr)
|
||||
{
|
||||
@ -331,12 +330,6 @@ void G1BlockOffsetTablePart::verify() const {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
void G1BlockOffsetTablePart::set_object_can_span(bool can_span) {
|
||||
_object_can_span = can_span;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT
|
||||
void G1BlockOffsetTablePart::print_on(outputStream* out) {
|
||||
size_t from_index = _bot->index_for(_hr->bottom());
|
||||
|
||||
@ -114,9 +114,6 @@ private:
|
||||
// allocation boundary at which offset array must be updated
|
||||
HeapWord* _next_offset_threshold;
|
||||
|
||||
// Indicates if an object can span into this G1BlockOffsetTablePart.
|
||||
debug_only(bool _object_can_span;)
|
||||
|
||||
// This is the global BlockOffsetTable.
|
||||
G1BlockOffsetTable* _bot;
|
||||
|
||||
@ -212,7 +209,6 @@ public:
|
||||
}
|
||||
|
||||
void set_for_starts_humongous(HeapWord* obj_top, size_t fill_size);
|
||||
void set_object_can_span(bool can_span) NOT_DEBUG_RETURN;
|
||||
|
||||
void print_on(outputStream* out) PRODUCT_RETURN;
|
||||
};
|
||||
|
||||
@ -113,9 +113,14 @@ inline size_t G1BlockOffsetTablePart::block_size(const HeapWord* p) const {
|
||||
}
|
||||
|
||||
inline HeapWord* G1BlockOffsetTablePart::block_at_or_preceding(const void* addr) const {
|
||||
assert(_object_can_span || _bot->offset_array(_bot->index_for(_hr->bottom())) == 0,
|
||||
"Object crossed region boundary, found offset %u instead of 0",
|
||||
(uint) _bot->offset_array(_bot->index_for(_hr->bottom())));
|
||||
#ifdef ASSERT
|
||||
if (!_hr->is_continues_humongous()) {
|
||||
// For non-ContinuesHumongous regions, the first obj always starts from bottom.
|
||||
u_char offset = _bot->offset_array(_bot->index_for(_hr->bottom()));
|
||||
assert(offset == 0, "Found offset %u instead of 0 for region %u %s",
|
||||
offset, _hr->hrm_index(), _hr->get_short_type_str());
|
||||
}
|
||||
#endif
|
||||
|
||||
size_t index = _bot->index_for(addr);
|
||||
|
||||
|
||||
@ -214,8 +214,6 @@ void HeapRegion::set_continues_humongous(HeapRegion* first_hr) {
|
||||
report_region_type_change(G1HeapRegionTraceType::ContinuesHumongous);
|
||||
_type.set_continues_humongous();
|
||||
_humongous_start_region = first_hr;
|
||||
|
||||
_bot_part.set_object_can_span(true);
|
||||
}
|
||||
|
||||
void HeapRegion::clear_humongous() {
|
||||
@ -223,8 +221,6 @@ void HeapRegion::clear_humongous() {
|
||||
|
||||
assert(capacity() == HeapRegion::GrainBytes, "pre-condition");
|
||||
_humongous_start_region = NULL;
|
||||
|
||||
_bot_part.set_object_can_span(false);
|
||||
}
|
||||
|
||||
HeapRegion::HeapRegion(uint hrm_index,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user