Skip to content
Permalink
Browse files
8252889: Obsolete -XX:+InsertMemBarAfterArraycopy
Reviewed-by: shade, adityam
  • Loading branch information
TobiHartmann committed Sep 10, 2020
1 parent f933961 commit f78f7805707f49033530acc66ba4c625847c2918
Showing with 2 additions and 16 deletions.
  1. +0 −3 src/hotspot/share/opto/c2_globals.hpp
  2. +1 −13 src/hotspot/share/opto/macroArrayCopy.cpp
  3. +1 −0 src/hotspot/share/runtime/arguments.cpp
@@ -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.") \
@@ -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);
}

@@ -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);
@@ -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;
}

@@ -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.

1 comment on commit f78f780

@bridgekeeper

This comment has been minimized.

Copy link

@bridgekeeper bridgekeeper bot commented on f78f780 Sep 10, 2020

Review

Issues

Please sign in to comment.