File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/hotspot/share/classfile Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -644,10 +644,16 @@ void FieldLayoutBuilder::compute_regular_layout() {
644644 if (!_contended_groups.is_empty ()) {
645645 for (int i = 0 ; i < _contended_groups.length (); i++) {
646646 FieldGroup* cg = _contended_groups.at (i);
647- LayoutRawBlock* padding = insert_contended_padding (_layout->last_block ());
647+ LayoutRawBlock* start = _layout->last_block ();
648+ LayoutRawBlock* padding = insert_contended_padding (start);
649+
648650 // Do not insert fields past the padding block.
649- _layout->add (cg->primitive_fields (), padding);
650- _layout->add (cg->oop_fields (), padding);
651+ if (padding != nullptr ) {
652+ start = padding;
653+ }
654+
655+ _layout->add (cg->primitive_fields (), start);
656+ _layout->add (cg->oop_fields (), start);
651657 need_tail_padding = true ;
652658 }
653659 }
You can’t perform that action at this time.
0 commit comments