--- old/src/share/vm/gc/g1/g1BlockOffsetTable.cpp 2017-02-22 14:36:06.338757002 +0100 +++ new/src/share/vm/gc/g1/g1BlockOffsetTable.cpp 2017-02-22 14:36:06.214752180 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -78,9 +78,10 @@ _bot(array), _space(gsp), _next_offset_threshold(NULL), - _next_offset_index(0), - _object_can_span(false) -{ } + _next_offset_index(0) +{ + debug_only(_object_can_span = false;) +} // The arguments follow the normal convention of denoting // a right-open interval: [start, end) @@ -366,6 +367,10 @@ } #ifndef PRODUCT +void G1BlockOffsetTablePart::set_object_can_span(bool can_span) { + _object_can_span = can_span; +} + void G1BlockOffsetTablePart::print_on(outputStream* out) { size_t from_index = _bot->index_for(_space->bottom()); @@ -420,7 +425,3 @@ alloc_block(obj_top, fill_size); } } - -void G1BlockOffsetTablePart::set_continues_humongous(bool is_humongous) { - _object_can_span = is_humongous; -} --- old/src/share/vm/gc/g1/g1BlockOffsetTable.hpp 2017-02-22 14:36:06.990782354 +0100 +++ new/src/share/vm/gc/g1/g1BlockOffsetTable.hpp 2017-02-22 14:36:06.858777221 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -116,7 +116,9 @@ // allocation boundary at which offset array must be updated HeapWord* _next_offset_threshold; size_t _next_offset_index; // index corresponding to that boundary - bool _object_can_span; // Set for continues humongous + + // Indicates if an object can span into this G1BlockOffsetTablePart. + debug_only(bool _object_can_span;) // This is the global BlockOffsetTable. G1BlockOffsetTable* _bot; @@ -225,7 +227,7 @@ } void set_for_starts_humongous(HeapWord* obj_top, size_t fill_size); - void set_continues_humongous(bool is_humongous); + void set_object_can_span(bool can_span) PRODUCT_RETURN; void print_on(outputStream* out) PRODUCT_RETURN; }; --- old/src/share/vm/gc/g1/g1BlockOffsetTable.inline.hpp 2017-02-22 14:36:07.658808329 +0100 +++ new/src/share/vm/gc/g1/g1BlockOffsetTable.inline.hpp 2017-02-22 14:36:07.534803507 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -108,7 +108,8 @@ bool has_max_index, size_t max_index) const { assert(_object_can_span || _bot->offset_array(_bot->index_for(_space->bottom())) == 0, - "normal objects can't cross region boundaries"); + "Object crossed region boundary, found offset %u instead of 0", + (uint) _bot->offset_array(_bot->index_for(_space->bottom()))); size_t index = _bot->index_for(addr); // We must make sure that the offset table entry we use is valid. If // "addr" is past the end, start at the last known one and go forward. --- old/src/share/vm/gc/g1/heapRegion.cpp 2017-02-22 14:36:08.314833837 +0100 +++ new/src/share/vm/gc/g1/heapRegion.cpp 2017-02-22 14:36:08.178828549 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -268,7 +268,7 @@ _type.set_continues_humongous(); _humongous_start_region = first_hr; - _bot_part.set_continues_humongous(true); + _bot_part.set_object_can_span(true); } void HeapRegion::clear_humongous() { @@ -277,7 +277,7 @@ assert(capacity() == HeapRegion::GrainBytes, "pre-condition"); _humongous_start_region = NULL; - _bot_part.set_continues_humongous(false); + _bot_part.set_object_can_span(false); } HeapRegion::HeapRegion(uint hrm_index,