Mercurial > hg > truffle
diff src/cpu/sparc/vm/vm_version_sparc.cpp @ 13423:eae426d683f6
8029190: VM_Version::determine_features() asserts on Fujitsu Sparc64 CPUs
Summary: fix code to allow testing on Fujitsu Sparc64 CPUs
Reviewed-by: kvn
author | simonis |
---|---|
date | Mon, 02 Dec 2013 11:12:32 +0100 |
parents | 46c544b8fbfc |
children | de6a9e811145 |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/vm_version_sparc.cpp Fri Nov 22 15:26:37 2013 +0100 +++ b/src/cpu/sparc/vm/vm_version_sparc.cpp Mon Dec 02 11:12:32 2013 +0100 @@ -89,6 +89,27 @@ _supports_cx8 = has_v9(); _supports_atomic_getset4 = true; // swap instruction + // There are Fujitsu Sparc64 CPUs which support blk_init as well so + // we have to take this check out of the 'is_niagara()' block below. + if (has_blk_init()) { + // When using CMS or G1, we cannot use memset() in BOT updates + // because the sun4v/CMT version in libc_psr uses BIS which + // exposes "phantom zeros" to concurrent readers. See 6948537. + if (FLAG_IS_DEFAULT(UseMemSetInBOT) && (UseConcMarkSweepGC || UseG1GC)) { + FLAG_SET_DEFAULT(UseMemSetInBOT, false); + } + // Issue a stern warning if the user has explicitly set + // UseMemSetInBOT (it is known to cause issues), but allow + // use for experimentation and debugging. + if (UseConcMarkSweepGC || UseG1GC) { + if (UseMemSetInBOT) { + assert(!FLAG_IS_DEFAULT(UseMemSetInBOT), "Error"); + warning("Experimental flag -XX:+UseMemSetInBOT is known to cause instability" + " on sun4v; please understand that you are using at your own risk!"); + } + } + } + if (is_niagara()) { // Indirect branch is the same cost as direct if (FLAG_IS_DEFAULT(UseInlineCaches)) { @@ -98,12 +119,6 @@ if (FLAG_IS_DEFAULT(OptoLoopAlignment)) { FLAG_SET_DEFAULT(OptoLoopAlignment, 4); } - // When using CMS or G1, we cannot use memset() in BOT updates - // because the sun4v/CMT version in libc_psr uses BIS which - // exposes "phantom zeros" to concurrent readers. See 6948537. - if (FLAG_IS_DEFAULT(UseMemSetInBOT) && (UseConcMarkSweepGC || UseG1GC)) { - FLAG_SET_DEFAULT(UseMemSetInBOT, false); - } #ifdef _LP64 // 32-bit oops don't make sense for the 64-bit VM on sparc // since the 32-bit VM has the same registers and smaller objects.