Skip to content
Permalink
Browse files
8267710: [lworld][lw3] Hook AlwaysAtomicAccesses to primitive classes…
… atomicity rules

Reviewed-by: fparain
  • Loading branch information
shipilev authored and TobiHartmann committed May 31, 2021
1 parent 25983c7 commit 0f1c33c725e4baa23c1d90029301553a1fde38db
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/hotspot/share/classfile/fieldLayoutBuilder.cpp
@@ -652,7 +652,7 @@ void FieldLayoutBuilder::regular_field_sorting() {
InlineKlass* vk = InlineKlass::cast(klass);
bool too_big_to_flatten = (InlineFieldMaxFlatSize >= 0 &&
(vk->size_helper() * HeapWordSize) > InlineFieldMaxFlatSize);
bool too_atomic_to_flatten = vk->is_declared_atomic();
bool too_atomic_to_flatten = vk->is_declared_atomic() || AlwaysAtomicAccesses;
bool too_volatile_to_flatten = fs.access_flags().is_volatile();
if (vk->is_naturally_atomic()) {
too_atomic_to_flatten = false;
@@ -753,7 +753,7 @@ void FieldLayoutBuilder::inline_class_field_sorting(TRAPS) {
InlineKlass* vk = InlineKlass::cast(klass);
bool too_big_to_flatten = (InlineFieldMaxFlatSize >= 0 &&
(vk->size_helper() * HeapWordSize) > InlineFieldMaxFlatSize);
bool too_atomic_to_flatten = vk->is_declared_atomic();
bool too_atomic_to_flatten = vk->is_declared_atomic() || AlwaysAtomicAccesses;
bool too_volatile_to_flatten = fs.access_flags().is_volatile();
if (vk->is_naturally_atomic()) {
too_atomic_to_flatten = false;

0 comments on commit 0f1c33c

Please sign in to comment.