-
Bug
-
Resolution: Duplicate
-
P3
-
hs25, 8
-
b16
if specified ContendedPaddingWidth isn't quite correct, in the annotated by @Contended class fields will be not aligned.
excerpts from output 'runtime/8003985/Test8003985' with -XX:+PrintFieldLayout and XX:ContendedPaddingWidth=257:
Test8003985$Test7: field layout
@269 --- instance fields start ---
@269 "int1" I
@273 "int2" I
@269 --- instance fields end ---
@536 --- instance ends ---
@ 88 --- static fields start ---
@608 --- static fields end ---
Test7.int2 isn't aligned.
suggested fix:
'ContendedPaddingWidth' value must be corrected during starting
excerpts from output 'runtime/8003985/Test8003985' with -XX:+PrintFieldLayout and XX:ContendedPaddingWidth=257:
Test8003985$Test7: field layout
@269 --- instance fields start ---
@269 "int1" I
@273 "int2" I
@269 --- instance fields end ---
@536 --- instance ends ---
@ 88 --- static fields start ---
@608 --- static fields end ---
Test7.int2 isn't aligned.
suggested fix:
'ContendedPaddingWidth' value must be corrected during starting
- duplicates
-
JDK-8006997 ContendedPaddingWidth should be range-checked
- Closed
- relates to
-
JDK-8006997 ContendedPaddingWidth should be range-checked
- Closed
-
JDK-8003985 Support @Contended Annotation - JEP 142
- Closed