Skip to content

Commit

Permalink
8252889: Obsolete -XX:+InsertMemBarAfterArraycopy
Browse files Browse the repository at this point in the history
Reviewed-by: shade, adityam
  • Loading branch information
TobiHartmann committed Sep 10, 2020
1 parent f933961 commit f78f780
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
3 changes: 0 additions & 3 deletions src/hotspot/share/opto/c2_globals.hpp
Expand Up @@ -384,9 +384,6 @@
product(bool, UseOnlyInlinedBimorphic, true, \
"Don't use BimorphicInlining if can't inline a second method") \
\
product(bool, InsertMemBarAfterArraycopy, true, \
"Insert memory barrier after arraycopy call") \
\
develop(bool, SubsumeLoads, true, \
"Attempt to compile while subsuming loads into machine " \
"instructions.") \
Expand Down
14 changes: 1 addition & 13 deletions src/hotspot/share/opto/macroArrayCopy.cpp
Expand Up @@ -711,7 +711,7 @@ Node* PhaseMacroExpand::generate_arraycopy(ArrayCopyNode *ac, AllocateArrayNode*
// a subsequent store that would make this object accessible by
// other threads.
insert_mem_bar(ctrl, &out_mem, Op_MemBarStoreStore);
} else if (InsertMemBarAfterArraycopy) {
} else {
insert_mem_bar(ctrl, &out_mem, Op_MemBarCPUOrder);
}

Expand Down Expand Up @@ -1101,9 +1101,6 @@ void PhaseMacroExpand::expand_arraycopy_node(ArrayCopyNode *ac) {
merge_mem = MergeMemNode::make(mem);
transform_later(merge_mem);

RegionNode* slow_region = new RegionNode(1);
transform_later(slow_region);

AllocateArrayNode* alloc = NULL;
if (ac->is_alloc_tightly_coupled()) {
alloc = AllocateArrayNode::Ideal_array_allocation(dest, &_igvn);
Expand Down Expand Up @@ -1176,15 +1173,6 @@ void PhaseMacroExpand::expand_arraycopy_node(ArrayCopyNode *ac) {
// If a negative length guard was generated for the ArrayCopyNode,
// the length of the array can never be negative.
false, ac->has_negative_length_guard());

// Do not let reads from the destination float above the arraycopy.
// Since we cannot type the arrays, we don't know which slices
// might be affected. We could restrict this barrier only to those
// memory slices which pertain to array elements--but don't bother.
if (!InsertMemBarAfterArraycopy) {
// (If InsertMemBarAfterArraycopy, there is already one in place.)
insert_mem_bar(&ctrl, &mem, Op_MemBarCPUOrder);
}
return;
}

Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/runtime/arguments.cpp
Expand Up @@ -553,6 +553,7 @@ static SpecialFlag const special_jvm_flags[] = {
{ "UseNewFieldLayout", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
{ "UseSemaphoreGCThreadsSynchronization", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
{ "ForceNUMA", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
{ "InsertMemBarAfterArraycopy", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },

#ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
// These entries will generate build errors. Their purpose is to test the macros.
Expand Down

1 comment on commit f78f780

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on f78f780 Sep 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Issues

Please sign in to comment.