annotate src/hotspot/cpu/x86/globals_x86.hpp @ 54526:ee29b516a36a

revert changes
author jlaskey
date Wed, 23 Jan 2019 16:09:20 -0400
parents f1bb77833b59
children 3a3e4e473622
rev   line source
duke@1 1 /*
coleenp@54304 2 * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
duke@1 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1 4 *
duke@1 5 * This code is free software; you can redistribute it and/or modify it
duke@1 6 * under the terms of the GNU General Public License version 2 only, as
duke@1 7 * published by the Free Software Foundation.
duke@1 8 *
duke@1 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@1 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@1 13 * accompanied this code).
duke@1 14 *
duke@1 15 * You should have received a copy of the GNU General Public License version
duke@1 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@1 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1 18 *
trims@5547 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@5547 20 * or visit www.oracle.com if you need additional information or have any
trims@5547 21 * questions.
duke@1 22 *
duke@1 23 */
duke@1 24
coleenp@54304 25 #ifndef CPU_X86_GLOBALS_X86_HPP
coleenp@54304 26 #define CPU_X86_GLOBALS_X86_HPP
stefank@7397 27
stefank@7397 28 #include "utilities/globalDefinitions.hpp"
stefank@7397 29 #include "utilities/macros.hpp"
stefank@7397 30
duke@1 31 // Sets the default values for platform dependent flags used by the runtime system.
duke@1 32 // (see globals.hpp)
duke@1 33
phh@4434 34 define_pd_global(bool, ShareVtableStubs, true);
phh@4434 35 define_pd_global(bool, NeedsDeoptSuspend, false); // only register window machines need this
duke@1 36
phh@4434 37 define_pd_global(bool, ImplicitNullChecks, true); // Generate code for implicit null checks
goetz@22856 38 define_pd_global(bool, TrapBasedNullChecks, false); // Not needed on x86.
goetz@22856 39 define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap NULLs passed to check cast
duke@1 40
goetz@42062 41 define_pd_global(uintx, CodeCacheSegmentSize, 64 TIERED_ONLY(+64)); // Tiered compilation has large code-entry alignment.
duke@1 42 // See 4827828 for this change. There is no globals_core_i486.hpp. I can't
duke@1 43 // assign a different value for C2 without touching a number of files. Use
duke@1 44 // #ifdef to minimize the change as it's late in Mantis. -- FIXME.
duke@1 45 // c1 doesn't have this problem because the fix to 4858033 assures us
duke@1 46 // the the vep is aligned at CodeEntryAlignment whereas c2 only aligns
duke@1 47 // the uep and the vep doesn't get real alignment but just slops on by
duke@1 48 // only assured that the entry instruction meets the 5 byte size requirement.
jcm@47980 49 #if COMPILER2_OR_JVMCI
phh@4434 50 define_pd_global(intx, CodeEntryAlignment, 32);
duke@1 51 #else
phh@4434 52 define_pd_global(intx, CodeEntryAlignment, 16);
jcm@47980 53 #endif // COMPILER2_OR_JVMCI
kvn@5249 54 define_pd_global(intx, OptoLoopAlignment, 16);
phh@4434 55 define_pd_global(intx, InlineFrequencyCount, 100);
phh@4434 56 define_pd_global(intx, InlineSmallCode, 1000);
duke@1 57
gziemski@33222 58 #define DEFAULT_STACK_YELLOW_PAGES (NOT_WINDOWS(2) WINDOWS_ONLY(3))
gziemski@33222 59 #define DEFAULT_STACK_RED_PAGES (1)
fparain@35071 60 #define DEFAULT_STACK_RESERVED_PAGES (NOT_WINDOWS(1) WINDOWS_ONLY(0))
gziemski@33222 61
gziemski@33222 62 #define MIN_STACK_YELLOW_PAGES DEFAULT_STACK_YELLOW_PAGES
gziemski@33222 63 #define MIN_STACK_RED_PAGES DEFAULT_STACK_RED_PAGES
fparain@35071 64 #define MIN_STACK_RESERVED_PAGES (0)
gziemski@33222 65
goetz@42906 66 #ifdef _LP64
goetz@42906 67 // Java_java_net_SocketOutputStream_socketWrite0() uses a 64k buffer on the
goetz@42906 68 // stack if compiled for unix and LP64. To pass stack overflow tests we need
goetz@42906 69 // 20 shadow pages.
fparain@40926 70 #define DEFAULT_STACK_SHADOW_PAGES (NOT_WIN64(20) WIN64_ONLY(7) DEBUG_ONLY(+2))
gziemski@33222 71 // For those clients that do not use write socket, we allow
gziemski@33222 72 // the min range value to be below that of the default
fparain@40926 73 #define MIN_STACK_SHADOW_PAGES (NOT_WIN64(10) WIN64_ONLY(7) DEBUG_ONLY(+2))
duke@1 74 #else
gziemski@33222 75 #define DEFAULT_STACK_SHADOW_PAGES (4 DEBUG_ONLY(+5))
gziemski@33222 76 #define MIN_STACK_SHADOW_PAGES DEFAULT_STACK_SHADOW_PAGES
goetz@42906 77 #endif // _LP64
duke@1 78
gziemski@33222 79 define_pd_global(intx, StackYellowPages, DEFAULT_STACK_YELLOW_PAGES);
gziemski@33222 80 define_pd_global(intx, StackRedPages, DEFAULT_STACK_RED_PAGES);
gziemski@33222 81 define_pd_global(intx, StackShadowPages, DEFAULT_STACK_SHADOW_PAGES);
fparain@35071 82 define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
gziemski@33222 83
duke@1 84 define_pd_global(bool, RewriteBytecodes, true);
duke@1 85 define_pd_global(bool, RewriteFrequentPairs, true);
bobv@6965 86
ysr@8687 87 // GC Ergo Flags
jwilhelm@29697 88 define_pd_global(size_t, CMSYoungGenPerWorker, 64*M); // default max size of CMS young gen, per GC worker thread
twisti@13521 89
roland@21095 90 define_pd_global(uintx, TypeProfileLevel, 111);
roland@20702 91
thartmann@33628 92 define_pd_global(bool, CompactStrings, true);
thartmann@33628 93
zmajo@30305 94 define_pd_global(bool, PreserveFramePointer, false);
zmajo@30305 95
shade@36554 96 define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
shade@36554 97
mdoerr@49458 98 #if defined(_LP64) || defined(_WINDOWS)
rehn@48069 99 define_pd_global(bool, ThreadLocalHandshakes, true);
rehn@48069 100 #else
mdoerr@49458 101 // get_thread() is slow on linux 32 bit, therefore off by default
rehn@48069 102 define_pd_global(bool, ThreadLocalHandshakes, false);
rehn@48069 103 #endif
rehn@48069 104
gziemski@38273 105 #define ARCH_FLAGS(develop, \
gziemski@38273 106 product, \
gziemski@38273 107 diagnostic, \
gziemski@38273 108 experimental, \
gziemski@38273 109 notproduct, \
gziemski@38273 110 range, \
gziemski@38273 111 constraint, \
gziemski@38273 112 writeable) \
twisti@13521 113 \
twisti@13521 114 develop(bool, IEEEPrecision, true, \
twisti@13521 115 "Enables IEEE precision (for INTEL only)") \
twisti@13521 116 \
twisti@13521 117 product(bool, UseStoreImmI16, true, \
twisti@13521 118 "Use store immediate 16-bits value instruction on x86") \
twisti@13521 119 \
kvn@52657 120 product(intx, UseAVX, 3, \
twisti@13521 121 "Highest supported AVX instructions set on x86/x64") \
zmajo@33163 122 range(0, 99) \
twisti@13521 123 \
drchase@18507 124 product(bool, UseCLMUL, false, \
drchase@18507 125 "Control whether CLMUL instructions can be used on x86/x64") \
drchase@18507 126 \
twisti@13521 127 diagnostic(bool, UseIncDec, true, \
twisti@13521 128 "Use INC, DEC instructions on x86") \
twisti@13521 129 \
twisti@13521 130 product(bool, UseNewLongLShift, false, \
twisti@13521 131 "Use optimized bitwise shift left") \
twisti@13521 132 \
twisti@13521 133 product(bool, UseAddressNop, false, \
twisti@13521 134 "Use '0F 1F [addr]' NOP instructions on x86 cpus") \
twisti@13521 135 \
twisti@13521 136 product(bool, UseXmmLoadAndClearUpper, true, \
twisti@13521 137 "Load low part of XMM register and clear upper part") \
twisti@13521 138 \
twisti@13521 139 product(bool, UseXmmRegToRegMoveAll, false, \
twisti@13521 140 "Copy all XMM register bits when moving value between registers") \
twisti@13521 141 \
twisti@13521 142 product(bool, UseXmmI2D, false, \
twisti@13521 143 "Use SSE2 CVTDQ2PD instruction to convert Integer to Double") \
twisti@13521 144 \
twisti@13521 145 product(bool, UseXmmI2F, false, \
twisti@13521 146 "Use SSE2 CVTDQ2PS instruction to convert Integer to Float") \
twisti@13521 147 \
twisti@13521 148 product(bool, UseUnalignedLoadStores, false, \
twisti@13521 149 "Use SSE2 MOVDQU instruction for Arraycopy") \
twisti@13521 150 \
kvn@51147 151 product(bool, UseXMMForObjInit, false, \
kvn@51147 152 "Use XMM/YMM MOVDQU instruction for Object Initialization") \
kvn@51147 153 \
kvn@15114 154 product(bool, UseFastStosb, false, \
kvn@15114 155 "Use fast-string operation for zeroing: rep stosb") \
kvn@15114 156 \
kvn@23491 157 /* Use Restricted Transactional Memory for lock eliding */ \
kvn@23491 158 product(bool, UseRTMLocking, false, \
kvn@23491 159 "Enable RTM lock eliding for inflated locks in compiled code") \
kvn@23491 160 \
kvn@23491 161 experimental(bool, UseRTMForStackLocks, false, \
kvn@23491 162 "Enable RTM lock eliding for stack locks in compiled code") \
kvn@23491 163 \
kvn@23491 164 product(bool, UseRTMDeopt, false, \
kvn@23491 165 "Perform deopt and recompilation based on RTM abort ratio") \
kvn@23491 166 \
lucy@46494 167 product(int, RTMRetryCount, 5, \
kvn@23491 168 "Number of RTM retries on lock abort or busy") \
lucy@46494 169 range(0, max_jint) \
kvn@23491 170 \
lucy@46494 171 experimental(int, RTMSpinLoopCount, 100, \
kvn@23491 172 "Spin count for lock to become free before RTM retry") \
lucy@46494 173 range(0, max_jint) \
kvn@23491 174 \
lucy@46494 175 experimental(int, RTMAbortThreshold, 1000, \
kvn@23491 176 "Calculate abort ratio after this number of aborts") \
lucy@46494 177 range(0, max_jint) \
kvn@23491 178 \
lucy@46494 179 experimental(int, RTMLockingThreshold, 10000, \
kvn@23491 180 "Lock count at which to do RTM lock eliding without " \
kvn@23491 181 "abort ratio calculation") \
lucy@46494 182 range(0, max_jint) \
kvn@23491 183 \
lucy@46494 184 experimental(int, RTMAbortRatio, 50, \
kvn@23491 185 "Lock abort ratio at which to stop use RTM lock eliding") \
goetz@46698 186 range(0, 100) /* natural range */ \
kvn@23491 187 \
lucy@46494 188 experimental(int, RTMTotalCountIncrRate, 64, \
kvn@23491 189 "Increment total RTM attempted lock count once every n times") \
lucy@46494 190 range(1, max_jint) \
goetz@46698 191 constraint(RTMTotalCountIncrRateConstraintFunc,AfterErgo) \
kvn@23491 192 \
kvn@23491 193 experimental(intx, RTMLockingCalculationDelay, 0, \
kvn@23491 194 "Number of milliseconds to wait before start calculating aborts " \
kvn@23491 195 "for RTM locking") \
kvn@23491 196 \
kvn@23847 197 experimental(bool, UseRTMXendForLockBusy, true, \
kvn@23491 198 "Use RTM Xend instead of Xabort when lock busy") \
kvn@23491 199 \
twisti@13521 200 /* assembler */ \
twisti@13521 201 product(bool, UseCountLeadingZerosInstruction, false, \
twisti@13521 202 "Use count leading zeros instruction") \
iveresov@23220 203 \
iveresov@23220 204 product(bool, UseCountTrailingZerosInstruction, false, \
iveresov@23220 205 "Use count trailing zeros instruction") \
iveresov@23220 206 \
simonis@35581 207 product(bool, UseSSE42Intrinsics, false, \
simonis@35581 208 "SSE4.2 versions of intrinsics") \
simonis@35581 209 \
iveresov@23220 210 product(bool, UseBMI1Instructions, false, \
kvn@26434 211 "Use BMI1 instructions") \
kvn@26434 212 \
kvn@26434 213 product(bool, UseBMI2Instructions, false, \
vdeshpande@35540 214 "Use BMI2 instructions") \
vdeshpande@35540 215 \
vdeshpande@38018 216 diagnostic(bool, UseLibmIntrinsic, true, \
vdeshpande@38018 217 "Use Libm Intrinsics")
coleenp@54304 218 #endif // CPU_X86_GLOBALS_X86_HPP