mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-26 07:40:09 +00:00
8238961: Assertion failure in new field layout code when ContendedPaddingWidth == 0
Reviewed-by: hseigel, coleenp
This commit is contained in:
parent
a4616a7b49
commit
30707f8007
@ -353,7 +353,7 @@ void FieldLayout::fill_holes(const InstanceKlass* super_klass) {
|
||||
// If the super class has @Contended annotation, a padding block is
|
||||
// inserted at the end to ensure that fields from the subclasses won't share
|
||||
// the cache line of the last field of the contended class
|
||||
if (super_klass->has_contended_annotations()) {
|
||||
if (super_klass->has_contended_annotations() && ContendedPaddingWidth > 0) {
|
||||
LayoutRawBlock* p = new LayoutRawBlock(LayoutRawBlock::PADDING, ContendedPaddingWidth);
|
||||
p->set_offset(b->offset() + b->size());
|
||||
b->set_next_block(p);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user