提交 5c729e95 编写于 作者: K kvn

6821700: tune VM flags for peak performance

Summary: Tune C2 flags default values for performance.
Reviewed-by: never, phh, iveresov, jmasa, ysr
上级 72dd5a7a
...@@ -46,6 +46,7 @@ define_pd_global(uintx, TLABSize, 0); ...@@ -46,6 +46,7 @@ define_pd_global(uintx, TLABSize, 0);
define_pd_global(uintx, NewSize, ScaleForWordSize((2048 * K) + (2 * (64 * K)))); define_pd_global(uintx, NewSize, ScaleForWordSize((2048 * K) + (2 * (64 * K))));
define_pd_global(intx, SurvivorRatio, 8); define_pd_global(intx, SurvivorRatio, 8);
define_pd_global(intx, InlineFrequencyCount, 50); // we can use more inlining on the SPARC define_pd_global(intx, InlineFrequencyCount, 50); // we can use more inlining on the SPARC
define_pd_global(intx, InlineSmallCode, 1500);
#ifdef _LP64 #ifdef _LP64
// Stack slots are 2X larger in LP64 than in the 32 bit VM. // Stack slots are 2X larger in LP64 than in the 32 bit VM.
define_pd_global(intx, ThreadStackSize, 1024); define_pd_global(intx, ThreadStackSize, 1024);
......
...@@ -62,7 +62,7 @@ void VM_Version::initialize() { ...@@ -62,7 +62,7 @@ void VM_Version::initialize() {
if (is_niagara1()) { if (is_niagara1()) {
// Indirect branch is the same cost as direct // Indirect branch is the same cost as direct
if (FLAG_IS_DEFAULT(UseInlineCaches)) { if (FLAG_IS_DEFAULT(UseInlineCaches)) {
UseInlineCaches = false; FLAG_SET_DEFAULT(UseInlineCaches, false);
} }
#ifdef _LP64 #ifdef _LP64
// Single issue niagara1 is slower for CompressedOops // Single issue niagara1 is slower for CompressedOops
...@@ -79,15 +79,19 @@ void VM_Version::initialize() { ...@@ -79,15 +79,19 @@ void VM_Version::initialize() {
#ifdef COMPILER2 #ifdef COMPILER2
// Indirect branch is the same cost as direct // Indirect branch is the same cost as direct
if (FLAG_IS_DEFAULT(UseJumpTables)) { if (FLAG_IS_DEFAULT(UseJumpTables)) {
UseJumpTables = true; FLAG_SET_DEFAULT(UseJumpTables, true);
} }
// Single-issue, so entry and loop tops are // Single-issue, so entry and loop tops are
// aligned on a single instruction boundary // aligned on a single instruction boundary
if (FLAG_IS_DEFAULT(InteriorEntryAlignment)) { if (FLAG_IS_DEFAULT(InteriorEntryAlignment)) {
InteriorEntryAlignment = 4; FLAG_SET_DEFAULT(InteriorEntryAlignment, 4);
} }
if (FLAG_IS_DEFAULT(OptoLoopAlignment)) { if (FLAG_IS_DEFAULT(OptoLoopAlignment)) {
OptoLoopAlignment = 4; FLAG_SET_DEFAULT(OptoLoopAlignment, 4);
}
if (is_niagara1_plus() && FLAG_IS_DEFAULT(AllocatePrefetchDistance)) {
// Use smaller prefetch distance on N2
FLAG_SET_DEFAULT(AllocatePrefetchDistance, 256);
} }
#endif #endif
} }
...@@ -95,7 +99,7 @@ void VM_Version::initialize() { ...@@ -95,7 +99,7 @@ void VM_Version::initialize() {
// Use hardware population count instruction if available. // Use hardware population count instruction if available.
if (has_hardware_popc()) { if (has_hardware_popc()) {
if (FLAG_IS_DEFAULT(UsePopCountInstruction)) { if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
UsePopCountInstruction = true; FLAG_SET_DEFAULT(UsePopCountInstruction, true);
} }
} }
......
...@@ -60,6 +60,7 @@ define_pd_global(uintx, NewSize, 1024 * K); ...@@ -60,6 +60,7 @@ define_pd_global(uintx, NewSize, 1024 * K);
define_pd_global(intx, StackShadowPages, 3 DEBUG_ONLY(+1)); define_pd_global(intx, StackShadowPages, 3 DEBUG_ONLY(+1));
#endif // AMD64 #endif // AMD64
define_pd_global(intx, InlineFrequencyCount, 100); define_pd_global(intx, InlineFrequencyCount, 100);
define_pd_global(intx, InlineSmallCode, 1000);
define_pd_global(intx, PreInflateSpin, 10); define_pd_global(intx, PreInflateSpin, 10);
define_pd_global(intx, StackYellowPages, 2); define_pd_global(intx, StackYellowPages, 2);
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
template(java_lang_Class, "java/lang/Class") \ template(java_lang_Class, "java/lang/Class") \
template(java_lang_String, "java/lang/String") \ template(java_lang_String, "java/lang/String") \
template(java_lang_StringValue, "java/lang/StringValue") \ template(java_lang_StringValue, "java/lang/StringValue") \
template(java_lang_StringCache, "java/lang/StringValue$StringCache") \
template(java_lang_Thread, "java/lang/Thread") \ template(java_lang_Thread, "java/lang/Thread") \
template(java_lang_ThreadGroup, "java/lang/ThreadGroup") \ template(java_lang_ThreadGroup, "java/lang/ThreadGroup") \
template(java_lang_Cloneable, "java/lang/Cloneable") \ template(java_lang_Cloneable, "java/lang/Cloneable") \
...@@ -286,6 +287,7 @@ ...@@ -286,6 +287,7 @@
template(frontCacheEnabled_name, "frontCacheEnabled") \ template(frontCacheEnabled_name, "frontCacheEnabled") \
template(stringCacheEnabled_name, "stringCacheEnabled") \ template(stringCacheEnabled_name, "stringCacheEnabled") \
template(bitCount_name, "bitCount") \ template(bitCount_name, "bitCount") \
template(profile_name, "profile") \
\ \
/* non-intrinsic name/signature pairs: */ \ /* non-intrinsic name/signature pairs: */ \
template(register_method_name, "register") \ template(register_method_name, "register") \
......
...@@ -232,6 +232,14 @@ const char* InlineTree::shouldNotInline(ciMethod *callee_method, ciMethod* calle ...@@ -232,6 +232,14 @@ const char* InlineTree::shouldNotInline(ciMethod *callee_method, ciMethod* calle
return "disallowed by CompilerOracle"; return "disallowed by CompilerOracle";
} }
if (UseStringCache) {
// Do not inline StringCache::profile() method used only at the beginning.
if (callee_method->name() == ciSymbol::profile_name() &&
callee_method->holder()->name() == ciSymbol::java_lang_StringCache()) {
return "profiling method";
}
}
return NULL; return NULL;
} }
......
...@@ -47,6 +47,7 @@ define_pd_global(intx, Tier4BackEdgeThreshold, 0); ...@@ -47,6 +47,7 @@ define_pd_global(intx, Tier4BackEdgeThreshold, 0);
define_pd_global(intx, OnStackReplacePercentage, 0); define_pd_global(intx, OnStackReplacePercentage, 0);
define_pd_global(bool, ResizeTLAB, false); define_pd_global(bool, ResizeTLAB, false);
define_pd_global(intx, FreqInlineSize, 0); define_pd_global(intx, FreqInlineSize, 0);
define_pd_global(intx, InlineSmallCode, 0);
define_pd_global(intx, NewSizeThreadIncrease, 4*K); define_pd_global(intx, NewSizeThreadIncrease, 4*K);
define_pd_global(intx, NewRatio, 4); define_pd_global(intx, NewRatio, 4);
define_pd_global(intx, InlineClassNatives, true); define_pd_global(intx, InlineClassNatives, true);
...@@ -2616,7 +2617,7 @@ class CommandLineFlags { ...@@ -2616,7 +2617,7 @@ class CommandLineFlags {
develop(intx, MaxRecursiveInlineLevel, 1, \ develop(intx, MaxRecursiveInlineLevel, 1, \
"maximum number of nested recursive calls that are inlined") \ "maximum number of nested recursive calls that are inlined") \
\ \
product(intx, InlineSmallCode, 1000, \ product_pd(intx, InlineSmallCode, \
"Only inline already compiled methods if their code size is " \ "Only inline already compiled methods if their code size is " \
"less than this") \ "less than this") \
\ \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册