src/cpu/mips/vm/globals_mips.hpp

Tue, 28 Mar 2017 16:09:10 -0400

author
fujie
date
Tue, 28 Mar 2017 16:09:10 -0400
changeset 389
76857a2c3534
parent 382
a0d5defa38f5
child 397
1e8b8bc62356
permissions
-rw-r--r--

Add UseCodeCacheAllocOpt for MIPS.

     1 /*
     2  * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright (c) 2015, 2016, Loongson Technology. All rights reserved.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5  *
     6  * This code is free software; you can redistribute it and/or modify it
     7  * under the terms of the GNU General Public License version 2 only, as
     8  * published by the Free Software Foundation.
     9  *
    10  * This code is distributed in the hope that it will be useful, but WITHOUT
    11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    13  * version 2 for more details (a copy is included in the LICENSE file that
    14  * accompanied this code).
    15  *
    16  * You should have received a copy of the GNU General Public License version
    17  * 2 along with this work; if not, write to the Free Software Foundation,
    18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    19  *
    20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    21  * or visit www.oracle.com if you need additional information or have any
    22  * questions.
    23  *
    24  */
    26 #ifndef CPU_MIPS_VM_GLOBALS_MIPS_HPP
    27 #define CPU_MIPS_VM_GLOBALS_MIPS_HPP
    29 #include "utilities/globalDefinitions.hpp"
    30 #include "utilities/macros.hpp"
    32 //
    33 // Sets the default values for platform dependent flags used by the runtime system.
    34 // (see globals.hpp)
    35 //
    36 #ifdef CORE
    37 define_pd_global(bool,  UseSSE,      0);
    38 #endif /* CORE */
    39 define_pd_global(bool,  ConvertSleepToYield,      true);
    40 define_pd_global(bool,  ShareVtableStubs,         true);
    41 define_pd_global(bool,  CountInterpCalls,         true);
    43 define_pd_global(bool, ImplicitNullChecks,          true);  // Generate code for implicit null checks
    44 define_pd_global(bool, TrapBasedNullChecks,      false); // Not needed on x86.
    45 define_pd_global(bool, UncommonNullCast,         true);  // Uncommon-trap NULLs passed to check cast
    46 define_pd_global(bool, NeedsDeoptSuspend,           false); // only register window machines need this
    48 // See 4827828 for this change. There is no globals_core_i486.hpp. I can't
    49 // assign a different value for C2 without touching a number of files. Use 
    50 // #ifdef to minimize the change as it's late in Mantis. -- FIXME.
    51 // c1 doesn't have this problem because the fix to 4858033 assures us
    52 // the the vep is aligned at CodeEntryAlignment whereas c2 only aligns
    53 // the uep and the vep doesn't get real alignment but just slops on by
    54 // only assured that the entry instruction meets the 5 byte size requirement.
    55 define_pd_global(intx,  CodeEntryAlignment,       32); 
    56 define_pd_global(intx, OptoLoopAlignment,        16);
    57 define_pd_global(intx, InlineFrequencyCount,     100);
    58 define_pd_global(intx, InlineSmallCode,          4000); // 2016/5/11 Jin: MIPS generates 3x instructions than X86
    60 define_pd_global(uintx, TLABSize,                 0); 
    61 define_pd_global(uintx, NewSize,                  1024 * K);
    62 define_pd_global(intx,  PreInflateSpin,		  10);
    64 define_pd_global(intx, PrefetchCopyIntervalInBytes, -1);
    65 define_pd_global(intx, PrefetchScanIntervalInBytes, -1);
    66 define_pd_global(intx, PrefetchFieldsAhead,         -1);
    68 define_pd_global(intx, StackYellowPages, 2);
    69 define_pd_global(intx, StackRedPages, 1);
    70 define_pd_global(intx, StackShadowPages, 3 DEBUG_ONLY(+1));
    72 define_pd_global(bool, RewriteBytecodes,     true);
    73 define_pd_global(bool, RewriteFrequentPairs, true);
    74 #ifdef _ALLBSD_SOURCE
    75 define_pd_global(bool, UseMembar,            true);
    76 #else
    77 define_pd_global(bool, UseMembar,            false);
    78 #endif
    79 // GC Ergo Flags
    80 define_pd_global(intx, CMSYoungGenPerWorker, 64*M);  // default max size of CMS young gen, per GC worker thread
    82 define_pd_global(uintx, TypeProfileLevel, 111);
    84 // Only c2 cares about this at the moment
    85 define_pd_global(intx, AllocatePrefetchStyle,        2);
    86 define_pd_global(intx, AllocatePrefetchDistance,     -1);
    88 #define ARCH_FLAGS(develop, product, diagnostic, experimental, notproduct) \
    89                                                                             \
    90   product(bool, UseLoongsonISA, false,                                       \
    91                 "Use LoongsonISA on Loongson CPUs")                         \
    92                                                                             \
    93   product(bool, Use3A2000, false,                                            \
    94                 "Use Loongson 3A2000 CPU")                                  \
    95                                                                             \
    96   product(bool, UseCodeCacheAllocOpt, true,                                 \
    97                 "Allocate code cache within 32-bit memory address space")   \
    98                                                                             \
    99   product(intx, UseSyncLevel, 1000,                                         \
   100                 "The sync level on Loongson CPUs"                           \
   101                 "for GS464E, UseSyncLevel >= 2000"                          \
   102                 "others, UseSyncLevel <= 1000")                             \
   103                                                                             \
   104   develop(bool, UseBoundCheckInstruction, false,                            \
   105                 "Use bound check instruction")                              \
   106                                                                             \
   107   product(intx, SetFSFOFN, 999,                                             \
   108           "Set the FS/FO/FN bits in FCSR"                                   \
   109           "999 means FS/FO/FN will not be changed"                          \
   110           "=XYZ, with X:FS, Y:FO, Z:FN, X, Y and Z in 0=off, 1=on")         \
   111                                                                             \
   112   develop(bool, IEEEPrecision, true,                                        \
   113           "Enables IEEE precision (for INTEL only)")                        \
   114                                                                             \
   115   product(intx, FenceInstruction, 0,                                        \
   116           "(Unsafe,Unstable) Experimental")                                 \
   117                                                                             \
   118   product(intx,  ReadPrefetchInstr, 0,                                      \
   119           "Prefetch instruction to prefetch ahead")                         \
   120                                                                             \
   121   product(bool, UseStoreImmI16, true,                                       \
   122           "Use store immediate 16-bits value instruction on x86")           \
   123                                                                             \
   124   product(intx, UseAVX, 99,                                                 \
   125           "Highest supported AVX instructions set on x86/x64")              \
   126                                                                             \
   127   diagnostic(bool, UseIncDec, true,                                         \
   128           "Use INC, DEC instructions on x86")                               \
   129                                                                             \
   130   product(bool, UseNewLongLShift, false,                                    \
   131           "Use optimized bitwise shift left")                               \
   132                                                                             \
   133   product(bool, UseAddressNop, false,                                       \
   134           "Use '0F 1F [addr]' NOP instructions on x86 cpus")                \
   135                                                                             \
   136   product(bool, UseXmmLoadAndClearUpper, true,                              \
   137           "Load low part of XMM register and clear upper part")             \
   138                                                                             \
   139   product(bool, UseXmmRegToRegMoveAll, false,                               \
   140           "Copy all XMM register bits when moving value between registers") \
   141                                                                             \
   142   product(bool, UseXmmI2D, false,                                           \
   143           "Use SSE2 CVTDQ2PD instruction to convert Integer to Double")     \
   144                                                                             \
   145   product(bool, UseXmmI2F, false,                                           \
   146           "Use SSE2 CVTDQ2PS instruction to convert Integer to Float")      \
   147                                                                             \
   148   product(bool, UseUnalignedLoadStores, false,                              \
   149           "Use SSE2 MOVDQU instruction for Arraycopy")                      \
   150                                                                             \
   151   /* assembler */                                                           \
   152   product(bool, Use486InstrsOnly, false,                                    \
   153           "Use 80486 Compliant instruction subset")                         \
   154                                                                             \
   155   product(bool, UseCountLeadingZerosInstruction, true,                      \
   156           "Use count leading zeros instruction")                            \
   157                                                                             \
   158   /* Use Restricted Transactional Memory for lock eliding */                \
   159   experimental(bool, UseRTMLocking, false,                                  \
   160           "Enable RTM lock eliding for inflated locks in compiled code")    \
   161                                                                             \
   162   experimental(bool, UseRTMForStackLocks, false,                            \
   163           "Enable RTM lock eliding for stack locks in compiled code")       \
   164                                                                             \
   165   experimental(bool, UseRTMDeopt, false,                                    \
   166           "Perform deopt and recompilation based on RTM abort ratio")       \
   167                                                                             \
   168   experimental(uintx, RTMRetryCount, 5,                                     \
   169           "Number of RTM retries on lock abort or busy")                    \
   170                                                                             \
   171   experimental(intx, RTMSpinLoopCount, 100,                                 \
   172           "Spin count for lock to become free before RTM retry")            \
   173                                                                             \
   174   experimental(intx, RTMAbortThreshold, 1000,                               \
   175           "Calculate abort ratio after this number of aborts")              \
   176                                                                             \
   177   experimental(intx, RTMLockingThreshold, 10000,                            \
   178           "Lock count at which to do RTM lock eliding without "             \
   179           "abort ratio calculation")                                        \
   180                                                                             \
   181   experimental(intx, RTMAbortRatio, 50,                                     \
   182           "Lock abort ratio at which to stop use RTM lock eliding")         \
   183                                                                             \
   184   experimental(intx, RTMTotalCountIncrRate, 64,                             \
   185           "Increment total RTM attempted lock count once every n times")    \
   186                                                                             \
   187   experimental(intx, RTMLockingCalculationDelay, 0,                         \
   188           "Number of milliseconds to wait before start calculating aborts " \
   189           "for RTM locking")                                                \
   190                                                                             \
   191   experimental(bool, UseRTMXendForLockBusy, true,                           \
   192           "Use RTM Xend instead of Xabort when lock busy")                  \
   193                                                                             \
   194   product(bool, UseCountTrailingZerosInstruction, false,                    \
   195           "Use count trailing zeros instruction")                           \
   196                                                                             \
   197   product(bool, UseBMI1Instructions, false,                                 \
   198           "Use BMI instructions")
   200 #endif // CPU_MIPS_VM_GLOBALS_MIPS_HPP

mercurial