1 /*
   2  * Copyright (c) 2013, Red Hat Inc.
   3  * Copyright (c) 2000, 2011, Oracle and/or its affiliates.
   4  * All rights reserved.
   5  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   6  *
   7  * This code is free software; you can redistribute it and/or modify it
   8  * under the terms of the GNU General Public License version 2 only, as
   9  * published by the Free Software Foundation.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  *
  25  */
  26 
  27 #ifndef CPU_AARCH64_VM_GLOBALS_AARCH64_HPP
  28 #define CPU_AARCH64_VM_GLOBALS_AARCH64_HPP
  29 
  30 #include "utilities/globalDefinitions.hpp"
  31 #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 define_pd_global(bool, ConvertSleepToYield,      true);
  37 define_pd_global(bool, ShareVtableStubs,         true);
  38 define_pd_global(bool, CountInterpCalls,         true);
  39 define_pd_global(bool, NeedsDeoptSuspend,        false); // only register window machines need this
  40 
  41 define_pd_global(bool, ImplicitNullChecks,       true);  // Generate code for implicit null checks
  42 define_pd_global(bool, TrapBasedNullChecks,  false);
  43 define_pd_global(bool, UncommonNullCast,         true);  // Uncommon-trap NULLs passed to check cast
  44 
  45 // See 4827828 for this change. There is no globals_core_i486.hpp. I can't
  46 // assign a different value for C2 without touching a number of files. Use
  47 // #ifdef to minimize the change as it's late in Mantis. -- FIXME.
  48 // c1 doesn't have this problem because the fix to 4858033 assures us
  49 // the the vep is aligned at CodeEntryAlignment whereas c2 only aligns
  50 // the uep and the vep doesn't get real alignment but just slops on by
  51 // only assured that the entry instruction meets the 5 byte size requirement.
  52 define_pd_global(intx, CodeEntryAlignment,       64);
  53 define_pd_global(intx, OptoLoopAlignment,        16);
  54 define_pd_global(intx, InlineFrequencyCount,     100);
  55 
  56 define_pd_global(intx, StackYellowPages, 2);
  57 define_pd_global(intx, StackRedPages, 1);
  58 
  59 define_pd_global(intx, StackShadowPages, 4 DEBUG_ONLY(+5));
  60 
  61 define_pd_global(intx, PreInflateSpin,           10);
  62 
  63 define_pd_global(bool, RewriteBytecodes,     true);
  64 define_pd_global(bool, RewriteFrequentPairs, true);
  65 
  66 define_pd_global(bool, UseMembar,            true);
  67 
  68 define_pd_global(bool, PreserveFramePointer, false);
  69 
  70 // GC Ergo Flags
  71 define_pd_global(uintx, CMSYoungGenPerWorker, 64*M);  // default max size of CMS young gen, per GC worker thread
  72 
  73 define_pd_global(uintx, TypeProfileLevel, 111);
  74 
  75 #if defined(COMPILER1) || defined(COMPILER2)
  76 define_pd_global(intx, InlineSmallCode,          1000);
  77 #endif
  78 
  79 #ifdef BUILTIN_SIM
  80 #define UseBuiltinSim           true
  81 #define ARCH_FLAGS(develop, product, diagnostic, experimental, notproduct) \
  82                                                                         \
  83   product(bool, NotifySimulator, UseBuiltinSim,                         \
  84          "tell the AArch64 sim where we are in method code")            \
  85                                                                         \
  86   product(bool, UseSimulatorCache, false,                               \
  87          "tell sim to cache memory updates until exclusive op occurs")  \
  88                                                                         \
  89   product(bool, DisableBCCheck, true,                                   \
  90           "tell sim not to invoke bccheck callback")                    \
  91                                                                         \
  92   product(bool, NearCpool, true,                                        \
  93          "constant pool is close to instructions")                      \
  94                                                                         \
  95   product(bool, UseBarriersForVolatile, false,                          \
  96           "Use memory barriers to implement volatile accesses")         \
  97                                                                         \
  98   product(bool, UseCRC32, false,                                        \
  99           "Use CRC32 instructions for CRC32 computation")               \
 100   product(bool, UseLSE, false,                                          \
 101           "Use LSE instructions")                                       \
 102   product(bool, TraceTraps, false, "Trace all traps the signal handler")
 103 
 104 // Don't attempt to use Neon on builtin sim until builtin sim supports it
 105 #define UseNeon false
 106 #define UseSIMDForMemoryOps false
 107 #define AvoidUnalignedAcesses false
 108 
 109 #else
 110 #define UseBuiltinSim           false
 111 #define NotifySimulator         false
 112 #define UseSimulatorCache       false
 113 #define DisableBCCheck          true
 114 #define ARCH_FLAGS(develop, product, diagnostic, experimental, notproduct) \
 115                                                                         \
 116   product(bool, NearCpool, true,                                        \
 117          "constant pool is close to instructions")                      \
 118                                                                         \
 119   product(bool, UseBarriersForVolatile, false,                          \
 120           "Use memory barriers to implement volatile accesses")         \
 121   product(bool, UseNeon, false,                                         \
 122           "Use Neon for CRC32 computation")                             \
 123   product(bool, UseCRC32, false,                                        \
 124           "Use CRC32 instructions for CRC32 computation")               \
 125   product(bool, UseLSE, false,                                          \
 126           "Use LSE instructions")                                       \
 127   product(bool, UseSIMDForMemoryOps, false,                            \
 128           "Use SIMD instructions in generated memory move code")        \
 129   product(bool, AvoidUnalignedAccesses, false,                          \
 130           "Avoid generating unaligned memory accesses")                 \
 131   product(bool, UseBlockZeroing, true,                                  \
 132           "Use DC ZVA for block zeroing")                               \
 133   product(intx, BlockZeroingLowLimit, 256,                              \
 134           "Minimum size in bytes when block zeroing will be used")      \
 135   product(bool, TraceTraps, false, "Trace all traps the signal handler")
 136 
 137 #endif
 138 
 139 #endif // CPU_AARCH64_VM_GLOBALS_AARCH64_HPP