8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_RUNTIME_GLOBALS_HPP
26 #define SHARE_VM_RUNTIME_GLOBALS_HPP
27
28 #include "utilities/debug.hpp"
29
30 // use this for flags that are true per default in the tiered build
31 // but false in non-tiered builds, and vice versa
32 #ifdef TIERED
33 #define trueInTiered true
34 #define falseInTiered false
35 #else
36 #define trueInTiered false
37 #define falseInTiered true
38 #endif
39
40 #ifdef TARGET_ARCH_x86
41 # include "globals_x86.hpp"
42 #endif
43 #ifdef TARGET_ARCH_sparc
44 # include "globals_sparc.hpp"
45 #endif
46 #ifdef TARGET_ARCH_zero
47 # include "globals_zero.hpp"
510 // but false in development builds, and vice versa
511 #ifdef PRODUCT
512 #define trueInProduct true
513 #define falseInProduct false
514 #else
515 #define trueInProduct false
516 #define falseInProduct true
517 #endif
518
519 #ifdef JAVASE_EMBEDDED
520 #define falseInEmbedded false
521 #else
522 #define falseInEmbedded true
523 #endif
524
525 // develop flags are settable / visible only during development and are constant in the PRODUCT version
526 // product flags are always settable / visible
527 // notproduct flags are settable / visible only during development and are not declared in the PRODUCT version
528
529 // A flag must be declared with one of the following types:
530 // bool, intx, uintx, size_t, ccstr, double, or uint64_t.
531 // The type "ccstr" is an alias for "const char*" and is used
532 // only in this file, because the macrology requires single-token type names.
533
534 // Note: Diagnostic options not meant for VM tuning or for product modes.
535 // They are to be used for VM quality assurance or field diagnosis
536 // of VM bugs. They are hidden so that users will not be encouraged to
537 // try them as if they were VM ordinary execution options. However, they
538 // are available in the product version of the VM. Under instruction
539 // from support engineers, VM customers can turn them on to collect
540 // diagnostic information about VM problems. To use a VM diagnostic
541 // option, you must first specify +UnlockDiagnosticVMOptions.
542 // (This master switch also affects the behavior of -Xprintflags.)
543 //
544 // experimental flags are in support of features that are not
545 // part of the officially supported product, but are available
546 // for experimenting with. They could, for example, be performance
547 // features that may not have undergone full or rigorous QA, but which may
548 // help performance in some cases and released for experimentation
549 // by the community of users and developers. This flag also allows one to
550 // be able to build a fully supported product that nonetheless also
683 "AdaptiveNUMAChunkSizing") \
684 range(0, 100) \
685 \
686 product(size_t, NUMASpaceResizeRate, 1*G, \
687 "Do not reallocate more than this amount per collection") \
688 \
689 product(bool, UseAdaptiveNUMAChunkSizing, true, \
690 "Enable adaptive chunk sizing for NUMA") \
691 \
692 product(bool, NUMAStats, false, \
693 "Print NUMA stats in detailed heap information") \
694 \
695 product(uintx, NUMAPageScanRate, 256, \
696 "Maximum number of pages to include in the page scan procedure") \
697 \
698 product_pd(bool, NeedsDeoptSuspend, \
699 "True for register window machines (sparc/ia64)") \
700 \
701 product(intx, UseSSE, 99, \
702 "Highest supported SSE instructions set on x86/x64") \
703 \
704 product(bool, UseAES, false, \
705 "Control whether AES instructions can be used on x86/x64") \
706 \
707 product(bool, UseSHA, false, \
708 "Control whether SHA instructions can be used " \
709 "on SPARC and on ARM") \
710 \
711 product(bool, UseGHASHIntrinsics, false, \
712 "Use intrinsics for GHASH versions of crypto") \
713 \
714 product(size_t, LargePageSizeInBytes, 0, \
715 "Large page size (0 to let VM choose the page size)") \
716 \
717 product(size_t, LargePageHeapSizeThreshold, 128*M, \
718 "Use large pages if maximum heap is at least this big") \
719 \
720 product(bool, ForceTimeHighResolution, false, \
721 "Using high time resolution (for Win32 only)") \
722 \
1231 product(bool, ConvertYieldToSleep, false, \
1232 "Convert yield to a sleep of MinSleepInterval to simulate Win32 " \
1233 "behavior") \
1234 \
1235 develop(bool, UseDetachedThreads, true, \
1236 "Use detached threads that are recycled upon termination " \
1237 "(for Solaris only)") \
1238 \
1239 product(bool, UseLWPSynchronization, true, \
1240 "Use LWP-based instead of libthread-based synchronization " \
1241 "(SPARC only)") \
1242 \
1243 experimental(ccstr, SyncKnobs, NULL, \
1244 "(Unstable) Various monitor synchronization tunables") \
1245 \
1246 experimental(intx, EmitSync, 0, \
1247 "(Unsafe, Unstable) " \
1248 "Control emission of inline sync fast-path code") \
1249 \
1250 product(intx, MonitorBound, 0, "Bound Monitor population") \
1251 \
1252 product(bool, MonitorInUseLists, false, "Track Monitors for Deflation") \
1253 \
1254 experimental(intx, SyncFlags, 0, "(Unsafe, Unstable) " \
1255 "Experimental Sync flags") \
1256 \
1257 experimental(intx, SyncVerbose, 0, "(Unstable)") \
1258 \
1259 diagnostic(bool, InlineNotify, true, "intrinsify subset of notify") \
1260 \
1261 experimental(intx, ClearFPUAtPark, 0, "(Unsafe, Unstable)") \
1262 \
1263 experimental(intx, hashCode, 5, \
1264 "(Unstable) select hashCode generation algorithm") \
1265 \
1266 experimental(intx, WorkAroundNPTLTimedWaitHang, 0, \
1267 "(Unstable, Linux-specific) " \
1268 "avoid NPTL-FUTEX hang pthread_cond_timedwait") \
1269 \
1270 product(bool, FilterSpuriousWakeups, true, \
2688 "Eagerly initialize classes if possible") \
2689 \
2690 diagnostic(bool, LogTouchedMethods, false, \
2691 "Log methods which have been ever touched in runtime") \
2692 \
2693 diagnostic(bool, PrintTouchedMethodsAtExit, false, \
2694 "Print all methods that have been ever touched in runtime") \
2695 \
2696 develop(bool, TraceMethodReplacement, false, \
2697 "Print when methods are replaced do to recompilation") \
2698 \
2699 develop(bool, PrintMethodFlushing, false, \
2700 "Print the nmethods being flushed") \
2701 \
2702 diagnostic(bool, PrintMethodFlushingStatistics, false, \
2703 "print statistics about method flushing") \
2704 \
2705 diagnostic(intx, HotMethodDetectionLimit, 100000, \
2706 "Number of compiled code invocations after which " \
2707 "the method is considered as hot by the flusher") \
2708 \
2709 diagnostic(intx, MinPassesBeforeFlush, 10, \
2710 "Minimum number of sweeper passes before an nmethod " \
2711 "can be flushed") \
2712 \
2713 product(bool, UseCodeAging, true, \
2714 "Insert counter to detect warm methods") \
2715 \
2716 diagnostic(bool, StressCodeAging, false, \
2717 "Start with counters compiled in") \
2718 \
2719 develop(bool, UseRelocIndex, false, \
2720 "Use an index to speed random access to relocations") \
2721 \
2722 develop(bool, StressCodeBuffers, false, \
2723 "Exercise code buffer expansion and other rare state changes") \
2724 \
2725 diagnostic(bool, DebugNonSafepoints, trueInDebug, \
2726 "Generate extra debugging information for non-safepoints in " \
2727 "nmethods") \
2846 "Trace queries of liveness analysis information") \
2847 \
2848 notproduct(bool, CollectIndexSetStatistics, false, \
2849 "Collect information about IndexSets") \
2850 \
2851 develop(bool, UseLoopSafepoints, true, \
2852 "Generate Safepoint nodes in every loop") \
2853 \
2854 develop(intx, FastAllocateSizeLimit, 128*K, \
2855 /* Note: This value is zero mod 1<<13 for a cheap sparc set. */ \
2856 "Inline allocations larger than this in doublewords must go slow")\
2857 \
2858 product(bool, AggressiveOpts, false, \
2859 "Enable aggressive optimizations - see arguments.cpp") \
2860 \
2861 product_pd(uintx, TypeProfileLevel, \
2862 "=XYZ, with Z: Type profiling of arguments at call; " \
2863 "Y: Type profiling of return value at call; " \
2864 "X: Type profiling of parameters to methods; " \
2865 "X, Y and Z in 0=off ; 1=jsr292 only; 2=all methods") \
2866 \
2867 product(intx, TypeProfileArgsLimit, 2, \
2868 "max number of call arguments to consider for type profiling") \
2869 \
2870 product(intx, TypeProfileParmsLimit, 2, \
2871 "max number of incoming parameters to consider for type profiling"\
2872 ", -1 for all") \
2873 \
2874 /* statistics */ \
2875 develop(bool, CountCompiledCalls, false, \
2876 "Count method invocations") \
2877 \
2878 notproduct(bool, CountRuntimeCalls, false, \
2879 "Count VM runtime calls") \
2880 \
2881 develop(bool, CountJNICalls, false, \
2882 "Count jni method invocations") \
2883 \
2884 notproduct(bool, CountJVMCalls, false, \
2885 "Count jvm method invocations") \
2886 \
2887 notproduct(bool, CountRemovableExceptions, false, \
2888 "Count exceptions that could be replaced by branches due to " \
2889 "inlining") \
2890 \
2891 notproduct(bool, ICMissHistogram, false, \
2892 "Produce histogram of IC misses") \
3011 \
3012 develop(intx, CounterHalfLifeTime, 30, \
3013 "Half-life time of invocation counters (in seconds)") \
3014 \
3015 develop(intx, CounterDecayMinIntervalLength, 500, \
3016 "The minimum interval (in milliseconds) between invocation of " \
3017 "CounterDecay") \
3018 \
3019 product(bool, AlwaysCompileLoopMethods, false, \
3020 "When using recompilation, never interpret methods " \
3021 "containing loops") \
3022 \
3023 product(bool, DontCompileHugeMethods, true, \
3024 "Do not compile methods > HugeMethodLimit") \
3025 \
3026 /* Bytecode escape analysis estimation. */ \
3027 product(bool, EstimateArgEscape, true, \
3028 "Analyze bytecodes to estimate escape state of arguments") \
3029 \
3030 product(intx, BCEATraceLevel, 0, \
3031 "How much tracing to do of bytecode escape analysis estimates") \
3032 \
3033 product(intx, MaxBCEAEstimateLevel, 5, \
3034 "Maximum number of nested calls that are analyzed by BC EA") \
3035 \
3036 product(intx, MaxBCEAEstimateSize, 150, \
3037 "Maximum bytecode size of a method to be analyzed by BC EA") \
3038 \
3039 product(intx, AllocatePrefetchStyle, 1, \
3040 "0 = no prefetch, " \
3041 "1 = prefetch instructions for each allocation, " \
3042 "2 = use TLAB watermark to gate allocation prefetch, " \
3043 "3 = use BIS instruction on Sparc for allocation prefetch") \
3044 range(0, 3) \
3045 \
3046 product(intx, AllocatePrefetchDistance, -1, \
3047 "Distance to prefetch ahead of allocation pointer") \
3048 \
3049 product(intx, AllocatePrefetchLines, 3, \
3050 "Number of lines to prefetch ahead of array allocation pointer") \
3051 \
3052 product(intx, AllocateInstancePrefetchLines, 1, \
3053 "Number of lines to prefetch ahead of instance allocation " \
3054 "pointer") \
3055 \
3056 product(intx, AllocatePrefetchStepSize, 16, \
3057 "Step size in bytes of sequential prefetch instructions") \
3058 \
3059 product(intx, AllocatePrefetchInstr, 0, \
3060 "Prefetch instruction to prefetch ahead of allocation pointer") \
3061 \
3062 /* deoptimization */ \
3063 develop(bool, TraceDeoptimization, false, \
3064 "Trace deoptimization") \
3065 \
3066 develop(bool, DebugDeoptimization, false, \
3067 "Tracing various information while debugging deoptimization") \
3068 \
3069 product(intx, SelfDestructTimer, 0, \
3070 "Will cause VM to terminate after a given time (in minutes) " \
3071 "(0 means off)") \
3072 \
3073 product(intx, MaxJavaStackTraceDepth, 1024, \
3074 "The maximum number of lines in the stack trace for Java " \
3075 "exceptions (0 means all)") \
3076 \
3077 NOT_EMBEDDED(diagnostic(intx, GuaranteedSafepointInterval, 1000, \
3078 "Guarantee a safepoint (at least) every so many milliseconds " \
3079 "(0 means none)")) \
3080 \
3107 \
3108 notproduct(size_t, HandleAllocationLimit, 1024, \
3109 "Threshold for HandleMark allocation when +TraceHandleAllocation "\
3110 "is used") \
3111 \
3112 develop(size_t, TotalHandleAllocationLimit, 1024, \
3113 "Threshold for total handle allocation when " \
3114 "+TraceHandleAllocation is used") \
3115 \
3116 develop(intx, StackPrintLimit, 100, \
3117 "number of stack frames to print in VM-level stack dump") \
3118 \
3119 notproduct(intx, MaxElementPrintSize, 256, \
3120 "maximum number of elements to print") \
3121 \
3122 notproduct(intx, MaxSubklassPrintSize, 4, \
3123 "maximum number of subklasses to print when printing klass") \
3124 \
3125 product(intx, MaxInlineLevel, 9, \
3126 "maximum number of nested calls that are inlined") \
3127 \
3128 product(intx, MaxRecursiveInlineLevel, 1, \
3129 "maximum number of nested recursive calls that are inlined") \
3130 \
3131 develop(intx, MaxForceInlineLevel, 100, \
3132 "maximum number of nested calls that are forced for inlining " \
3133 "(using CompileCommand or marked w/ @ForceInline)") \
3134 \
3135 product_pd(intx, InlineSmallCode, \
3136 "Only inline already compiled methods if their code size is " \
3137 "less than this") \
3138 \
3139 product(intx, MaxInlineSize, 35, \
3140 "The maximum bytecode size of a method to be inlined") \
3141 \
3142 product_pd(intx, FreqInlineSize, \
3143 "The maximum bytecode size of a frequent method to be inlined") \
3144 \
3145 product(intx, MaxTrivialSize, 6, \
3146 "The maximum bytecode size of a trivial method to be inlined") \
3147 \
3148 product(intx, MinInliningThreshold, 250, \
3149 "The minimum invocation count a method needs to have to be " \
3150 "inlined") \
3151 \
3152 develop(intx, MethodHistogramCutoff, 100, \
3153 "The cutoff value for method invocation histogram (+CountCalls)") \
3154 \
3155 develop(intx, ProfilerNumberOfInterpretedMethods, 25, \
3156 "Number of interpreted methods to show in profile") \
3157 \
3158 develop(intx, ProfilerNumberOfCompiledMethods, 25, \
3159 "Number of compiled methods to show in profile") \
3160 \
3161 develop(intx, ProfilerNumberOfStubMethods, 25, \
3162 "Number of stub methods to show in profile") \
3163 \
3164 develop(intx, ProfilerNumberOfRuntimeStubNodes, 25, \
3165 "Number of runtime stub nodes to show in profile") \
3166 \
3167 product(intx, ProfileIntervalsTicks, 100, \
3168 "Number of ticks between printing of interval profile " \
3169 "(+ProfileIntervals)") \
3170 \
3194 notproduct(intx, DeoptimizeALotInterval, 5, \
3195 "Number of exits until DeoptimizeALot kicks in") \
3196 \
3197 notproduct(intx, ZombieALotInterval, 5, \
3198 "Number of exits until ZombieALot kicks in") \
3199 \
3200 diagnostic(intx, MallocVerifyInterval, 0, \
3201 "If non-zero, verify C heap after every N calls to " \
3202 "malloc/realloc/free") \
3203 \
3204 diagnostic(intx, MallocVerifyStart, 0, \
3205 "If non-zero, start verifying C heap after Nth call to " \
3206 "malloc/realloc/free") \
3207 \
3208 diagnostic(uintx, MallocMaxTestWords, 0, \
3209 "If non-zero, maximum number of words that malloc/realloc can " \
3210 "allocate (for testing only)") \
3211 \
3212 product(intx, TypeProfileWidth, 2, \
3213 "Number of receiver types to record in call/cast profile") \
3214 \
3215 develop(intx, BciProfileWidth, 2, \
3216 "Number of return bci's to record in ret profile") \
3217 \
3218 product(intx, PerMethodRecompilationCutoff, 400, \
3219 "After recompiling N times, stay in the interpreter (-1=>'Inf')") \
3220 range(-1, max_intx) \
3221 \
3222 product(intx, PerBytecodeRecompilationCutoff, 200, \
3223 "Per-BCI limit on repeated recompilation (-1=>'Inf')") \
3224 range(-1, max_intx) \
3225 \
3226 product(intx, PerMethodTrapLimit, 100, \
3227 "Limit on traps (of one kind) in a method (includes inlines)") \
3228 \
3229 experimental(intx, PerMethodSpecTrapLimit, 5000, \
3230 "Limit on speculative traps (of one kind) in a method " \
3231 "(includes inlines)") \
3232 \
3233 product(intx, PerBytecodeTrapLimit, 4, \
3234 "Limit on traps (of one kind) at a particular BCI") \
3235 \
3236 experimental(intx, SpecTrapLimitExtraEntries, 3, \
3237 "Extra method data trap entries for speculation") \
3238 \
3239 develop(intx, InlineFrequencyRatio, 20, \
3240 "Ratio of call site execution to caller method invocation") \
3241 \
3242 develop_pd(intx, InlineFrequencyCount, \
3243 "Count of call site execution necessary to trigger frequent " \
3244 "inlining") \
3245 \
3246 develop(intx, InlineThrowCount, 50, \
3247 "Force inlining of interpreted methods that throw this often") \
3248 \
3249 develop(intx, InlineThrowMaxSize, 200, \
3250 "Force inlining of throwing methods smaller than this") \
3251 \
3252 develop(intx, ProfilerNodeSize, 1024, \
3253 "Size in K to allocate for the Profile Nodes of each thread") \
3254 \
3255 /* gc parameters */ \
3256 product(size_t, InitialHeapSize, 0, \
3257 "Initial heap size (in bytes); zero means use ergonomics") \
3258 \
3259 product(size_t, MaxHeapSize, ScaleForWordSize(96*M), \
3260 "Maximum heap size (in bytes)") \
3261 \
3262 product(size_t, OldSize, ScaleForWordSize(4*M), \
3263 "Initial tenured generation size (in bytes)") \
3264 \
3265 product(size_t, NewSize, ScaleForWordSize(1*M), \
3266 "Initial new generation size (in bytes)") \
3267 \
3268 product(size_t, MaxNewSize, max_uintx, \
3269 "Maximum new generation size (in bytes), max_uintx means set " \
3270 "ergonomically") \
3271 \
3272 product(size_t, PretenureSizeThreshold, 0, \
3273 "Maximum size in bytes of objects allocated in DefNew " \
3437 range(1, max_intx) \
3438 \
3439 product_pd(intx, StackRedPages, \
3440 "Number of red zone (unrecoverable overflows) pages") \
3441 range(1, max_intx) \
3442 \
3443 /* greater stack shadow pages can't generate instruction to bang stack */ \
3444 product_pd(intx, StackShadowPages, \
3445 "Number of shadow zone (for overflow checking) pages " \
3446 "this should exceed the depth of the VM and native call stack") \
3447 range(1, 50) \
3448 \
3449 product_pd(intx, ThreadStackSize, \
3450 "Thread Stack Size (in Kbytes)") \
3451 \
3452 product_pd(intx, VMThreadStackSize, \
3453 "Non-Java Thread Stack Size (in Kbytes)") \
3454 \
3455 product_pd(intx, CompilerThreadStackSize, \
3456 "Compiler Thread Stack Size (in Kbytes)") \
3457 \
3458 develop_pd(size_t, JVMInvokeMethodSlack, \
3459 "Stack space (bytes) required for JVM_InvokeMethod to complete") \
3460 \
3461 /* code cache parameters */ \
3462 /* ppc64/tiered compilation has large code-entry alignment. */ \
3463 develop(uintx, CodeCacheSegmentSize, 64 PPC64_ONLY(+64) NOT_PPC64(TIERED_ONLY(+64)),\
3464 "Code cache segment size (in bytes) - smallest unit of " \
3465 "allocation") \
3466 range(1, 1024) \
3467 \
3468 develop_pd(intx, CodeEntryAlignment, \
3469 "Code entry alignment for generated code (in bytes)") \
3470 \
3471 product_pd(intx, OptoLoopAlignment, \
3472 "Align inner loops to zero relative to this modulus") \
3473 \
3474 product_pd(uintx, InitialCodeCacheSize, \
3475 "Initial code cache size (in bytes)") \
3476 \
3477 develop_pd(uintx, CodeCacheMinimumUseSpace, \
3478 "Minimum code cache size (in bytes) required to start VM.") \
3479 \
3480 product(bool, SegmentedCodeCache, false, \
3481 "Use a segmented code cache") \
3482 \
3483 product_pd(uintx, ReservedCodeCacheSize, \
3484 "Reserved code cache size (in bytes) - maximum code cache size") \
3485 \
3486 product_pd(uintx, NonProfiledCodeHeapSize, \
3487 "Size of code heap with non-profiled methods (in bytes)") \
3488 \
3489 product_pd(uintx, ProfiledCodeHeapSize, \
3490 "Size of code heap with profiled methods (in bytes)") \
3491 \
3492 product_pd(uintx, NonNMethodCodeHeapSize, \
3493 "Size of code heap with non-nmethods (in bytes)") \
3494 \
3495 product_pd(uintx, CodeCacheExpansionSize, \
3496 "Code cache expansion size (in bytes)") \
3497 \
3498 develop_pd(uintx, CodeCacheMinBlockLength, \
3499 "Minimum number of segments in a code cache block") \
3500 range(1, 100) \
3501 \
3502 notproduct(bool, ExitOnFullCodeCache, false, \
3503 "Exit the VM if we fill the code cache") \
3504 \
3505 product(bool, UseCodeCacheFlushing, true, \
3506 "Remove cold/old nmethods from the code cache") \
3507 \
3508 product(uintx, StartAggressiveSweepingAt, 10, \
3509 "Start aggressive sweeping if X[%] of the code cache is free." \
3510 "Segmented code cache: X[%] of the non-profiled heap." \
3511 "Non-segmented code cache: X[%] of the total code cache") \
3512 range(0, 100) \
3513 \
3514 /* interpreter debugging */ \
3515 develop(intx, BinarySwitchThreshold, 5, \
3516 "Minimal number of lookupswitch entries for rewriting to binary " \
3606 " THREAD_PRIORITY_TIME_CRITICAL, as it may interfere with "\
3607 " system threads. On Linux thread priorities are ignored "\
3608 " because the OS does not support static priority in "\
3609 " SCHED_OTHER scheduling class which is the only choice for "\
3610 " non-root, non-realtime applications. "\
3611 "1 : Aggressive. "\
3612 " Java thread priorities map over to the entire range of "\
3613 " native thread priorities. Higher Java thread priorities map "\
3614 " to higher native thread priorities. This policy should be "\
3615 " used with care, as sometimes it can cause performance "\
3616 " degradation in the application and/or the entire system. On "\
3617 " Linux this policy requires root privilege.") \
3618 range(0, 1) \
3619 \
3620 product(bool, ThreadPriorityVerbose, false, \
3621 "Print priority changes") \
3622 \
3623 product(intx, CompilerThreadPriority, -1, \
3624 "The native priority at which compiler threads should run " \
3625 "(-1 means no change)") \
3626 \
3627 product(intx, VMThreadPriority, -1, \
3628 "The native priority at which the VM thread should run " \
3629 "(-1 means no change)") \
3630 \
3631 product(bool, CompilerThreadHintNoPreempt, true, \
3632 "(Solaris only) Give compiler threads an extra quanta") \
3633 \
3634 product(bool, VMThreadHintNoPreempt, false, \
3635 "(Solaris only) Give VM thread an extra quanta") \
3636 \
3637 product(intx, JavaPriority1_To_OSPriority, -1, \
3638 "Map Java priorities to OS priorities") \
3639 \
3640 product(intx, JavaPriority2_To_OSPriority, -1, \
3641 "Map Java priorities to OS priorities") \
3642 \
3643 product(intx, JavaPriority3_To_OSPriority, -1, \
3644 "Map Java priorities to OS priorities") \
3645 \
3678 "First class to consider when using +CompileTheWorld") \
3679 \
3680 notproduct(intx, CompileTheWorldStopAt, max_jint, \
3681 "Last class to consider when using +CompileTheWorld") \
3682 \
3683 develop(intx, NewCodeParameter, 0, \
3684 "Testing Only: Create a dedicated integer parameter before " \
3685 "putback") \
3686 \
3687 /* new oopmap storage allocation */ \
3688 develop(intx, MinOopMapAllocation, 8, \
3689 "Minimum number of OopMap entries in an OopMapSet") \
3690 \
3691 /* Background Compilation */ \
3692 develop(intx, LongCompileThreshold, 50, \
3693 "Used with +TraceLongCompiles") \
3694 \
3695 /* recompilation */ \
3696 product_pd(intx, CompileThreshold, \
3697 "number of interpreted method invocations before (re-)compiling") \
3698 \
3699 product(double, CompileThresholdScaling, 1.0, \
3700 "Factor to control when first compilation happens " \
3701 "(both with and without tiered compilation): " \
3702 "values greater than 1.0 delay counter overflow, " \
3703 "values between 0 and 1.0 rush counter overflow, " \
3704 "value of 1.0 leaves compilation thresholds unchanged " \
3705 "value of 0.0 is equivalent to -Xint. " \
3706 "" \
3707 "Flag can be set as per-method option. " \
3708 "If a value is specified for a method, compilation thresholds " \
3709 "for that method are scaled by both the value of the global flag "\
3710 "and the value of the per-method flag.") \
3711 \
3712 product(intx, Tier0InvokeNotifyFreqLog, 7, \
3713 "Interpreter (tier 0) invocation notification frequency") \
3714 \
3715 product(intx, Tier2InvokeNotifyFreqLog, 11, \
3716 "C1 without MDO (tier 2) invocation notification frequency") \
3717 \
3718 product(intx, Tier3InvokeNotifyFreqLog, 10, \
3719 "C1 with MDO profiling (tier 3) invocation notification " \
3720 "frequency") \
3721 \
3722 product(intx, Tier23InlineeNotifyFreqLog, 20, \
3723 "Inlinee invocation (tiers 2 and 3) notification frequency") \
3724 \
3725 product(intx, Tier0BackedgeNotifyFreqLog, 10, \
3726 "Interpreter (tier 0) invocation notification frequency") \
3727 \
3728 product(intx, Tier2BackedgeNotifyFreqLog, 14, \
3729 "C1 without MDO (tier 2) invocation notification frequency") \
3730 \
3731 product(intx, Tier3BackedgeNotifyFreqLog, 13, \
3732 "C1 with MDO profiling (tier 3) invocation notification " \
3733 "frequency") \
3734 \
3735 product(intx, Tier2CompileThreshold, 0, \
3736 "threshold at which tier 2 compilation is invoked") \
3737 \
3738 product(intx, Tier2BackEdgeThreshold, 0, \
3739 "Back edge threshold at which tier 2 compilation is invoked") \
3740 \
3741 product(intx, Tier3InvocationThreshold, 200, \
3742 "Compile if number of method invocations crosses this " \
3743 "threshold") \
3744 \
3745 product(intx, Tier3MinInvocationThreshold, 100, \
3746 "Minimum invocation to compile at tier 3") \
3747 \
3748 product(intx, Tier3CompileThreshold, 2000, \
3749 "Threshold at which tier 3 compilation is invoked (invocation " \
3750 "minimum must be satisfied") \
3751 \
3752 product(intx, Tier3BackEdgeThreshold, 60000, \
3753 "Back edge threshold at which tier 3 OSR compilation is invoked") \
3754 \
3755 product(intx, Tier4InvocationThreshold, 5000, \
3756 "Compile if number of method invocations crosses this " \
3757 "threshold") \
3758 \
3759 product(intx, Tier4MinInvocationThreshold, 600, \
3760 "Minimum invocation to compile at tier 4") \
3761 \
3762 product(intx, Tier4CompileThreshold, 15000, \
3763 "Threshold at which tier 4 compilation is invoked (invocation " \
3764 "minimum must be satisfied") \
3765 \
3766 product(intx, Tier4BackEdgeThreshold, 40000, \
3767 "Back edge threshold at which tier 4 OSR compilation is invoked") \
3768 \
3769 product(intx, Tier3DelayOn, 5, \
3770 "If C2 queue size grows over this amount per compiler thread " \
3771 "stop compiling at tier 3 and start compiling at tier 2") \
3772 \
3773 product(intx, Tier3DelayOff, 2, \
3774 "If C2 queue size is less than this amount per compiler thread " \
3775 "allow methods compiled at tier 2 transition to tier 3") \
3776 \
3777 product(intx, Tier3LoadFeedback, 5, \
3778 "Tier 3 thresholds will increase twofold when C1 queue size " \
3779 "reaches this amount per compiler thread") \
3780 \
3781 product(intx, Tier4LoadFeedback, 3, \
3782 "Tier 4 thresholds will increase twofold when C2 queue size " \
3783 "reaches this amount per compiler thread") \
3784 \
3785 product(intx, TieredCompileTaskTimeout, 50, \
3786 "Kill compile task if method was not used within " \
3787 "given timeout in milliseconds") \
3788 \
3789 product(intx, TieredStopAtLevel, 4, \
3790 "Stop at given compilation level") \
3791 \
3792 product(intx, Tier0ProfilingStartPercentage, 200, \
3793 "Start profiling in interpreter if the counters exceed tier 3 " \
3794 "thresholds by the specified percentage") \
3795 \
3796 product(uintx, IncreaseFirstTierCompileThresholdAt, 50, \
3797 "Increase the compile threshold for C1 compilation if the code " \
3798 "cache is filled by the specified percentage") \
3799 range(0, 99) \
3800 \
3801 product(intx, TieredRateUpdateMinTime, 1, \
3802 "Minimum rate sampling interval (in milliseconds)") \
3803 \
3804 product(intx, TieredRateUpdateMaxTime, 25, \
3805 "Maximum rate sampling interval (in milliseconds)") \
3806 \
3807 product_pd(bool, TieredCompilation, \
3808 "Enable tiered compilation") \
3809 \
3810 product(bool, PrintTieredEvents, false, \
3811 "Print tiered events notifications") \
3812 \
3813 product_pd(intx, OnStackReplacePercentage, \
3814 "NON_TIERED number of method invocations/branches (expressed as " \
3815 "% of CompileThreshold) before (re-)compiling OSR code") \
3816 \
3817 product(intx, InterpreterProfilePercentage, 33, \
3818 "NON_TIERED number of method invocations/branches (expressed as " \
3819 "% of CompileThreshold) before profiling in the interpreter") \
3820 range(0, 100) \
3821 \
3822 develop(intx, MaxRecompilationSearchLength, 10, \
3823 "The maximum number of frames to inspect when searching for " \
3824 "recompilee") \
3825 \
3826 develop(intx, MaxInterpretedSearchLength, 3, \
3827 "The maximum number of interpreted frames to skip when searching "\
3828 "for recompilee") \
3829 \
3830 develop(intx, DesiredMethodLimit, 8000, \
3831 "The desired maximum method size (in bytecodes) after inlining") \
3832 \
3833 develop(intx, HugeMethodLimit, 8000, \
3834 "Don't compile methods larger than this if " \
3835 "+DontCompileHugeMethods") \
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_RUNTIME_GLOBALS_HPP
26 #define SHARE_VM_RUNTIME_GLOBALS_HPP
27
28 #include <float.h>
29 #include "utilities/debug.hpp"
30
31 // use this for flags that are true per default in the tiered build
32 // but false in non-tiered builds, and vice versa
33 #ifdef TIERED
34 #define trueInTiered true
35 #define falseInTiered false
36 #else
37 #define trueInTiered false
38 #define falseInTiered true
39 #endif
40
41 #ifdef TARGET_ARCH_x86
42 # include "globals_x86.hpp"
43 #endif
44 #ifdef TARGET_ARCH_sparc
45 # include "globals_sparc.hpp"
46 #endif
47 #ifdef TARGET_ARCH_zero
48 # include "globals_zero.hpp"
511 // but false in development builds, and vice versa
512 #ifdef PRODUCT
513 #define trueInProduct true
514 #define falseInProduct false
515 #else
516 #define trueInProduct false
517 #define falseInProduct true
518 #endif
519
520 #ifdef JAVASE_EMBEDDED
521 #define falseInEmbedded false
522 #else
523 #define falseInEmbedded true
524 #endif
525
526 // develop flags are settable / visible only during development and are constant in the PRODUCT version
527 // product flags are always settable / visible
528 // notproduct flags are settable / visible only during development and are not declared in the PRODUCT version
529
530 // A flag must be declared with one of the following types:
531 // bool, int, uint, intx, uintx, size_t, ccstr, double, or uint64_t.
532 // The type "ccstr" is an alias for "const char*" and is used
533 // only in this file, because the macrology requires single-token type names.
534
535 // Note: Diagnostic options not meant for VM tuning or for product modes.
536 // They are to be used for VM quality assurance or field diagnosis
537 // of VM bugs. They are hidden so that users will not be encouraged to
538 // try them as if they were VM ordinary execution options. However, they
539 // are available in the product version of the VM. Under instruction
540 // from support engineers, VM customers can turn them on to collect
541 // diagnostic information about VM problems. To use a VM diagnostic
542 // option, you must first specify +UnlockDiagnosticVMOptions.
543 // (This master switch also affects the behavior of -Xprintflags.)
544 //
545 // experimental flags are in support of features that are not
546 // part of the officially supported product, but are available
547 // for experimenting with. They could, for example, be performance
548 // features that may not have undergone full or rigorous QA, but which may
549 // help performance in some cases and released for experimentation
550 // by the community of users and developers. This flag also allows one to
551 // be able to build a fully supported product that nonetheless also
684 "AdaptiveNUMAChunkSizing") \
685 range(0, 100) \
686 \
687 product(size_t, NUMASpaceResizeRate, 1*G, \
688 "Do not reallocate more than this amount per collection") \
689 \
690 product(bool, UseAdaptiveNUMAChunkSizing, true, \
691 "Enable adaptive chunk sizing for NUMA") \
692 \
693 product(bool, NUMAStats, false, \
694 "Print NUMA stats in detailed heap information") \
695 \
696 product(uintx, NUMAPageScanRate, 256, \
697 "Maximum number of pages to include in the page scan procedure") \
698 \
699 product_pd(bool, NeedsDeoptSuspend, \
700 "True for register window machines (sparc/ia64)") \
701 \
702 product(intx, UseSSE, 99, \
703 "Highest supported SSE instructions set on x86/x64") \
704 range(0, 99) \
705 \
706 product(bool, UseAES, false, \
707 "Control whether AES instructions can be used on x86/x64") \
708 \
709 product(bool, UseSHA, false, \
710 "Control whether SHA instructions can be used " \
711 "on SPARC and on ARM") \
712 \
713 product(bool, UseGHASHIntrinsics, false, \
714 "Use intrinsics for GHASH versions of crypto") \
715 \
716 product(size_t, LargePageSizeInBytes, 0, \
717 "Large page size (0 to let VM choose the page size)") \
718 \
719 product(size_t, LargePageHeapSizeThreshold, 128*M, \
720 "Use large pages if maximum heap is at least this big") \
721 \
722 product(bool, ForceTimeHighResolution, false, \
723 "Using high time resolution (for Win32 only)") \
724 \
1233 product(bool, ConvertYieldToSleep, false, \
1234 "Convert yield to a sleep of MinSleepInterval to simulate Win32 " \
1235 "behavior") \
1236 \
1237 develop(bool, UseDetachedThreads, true, \
1238 "Use detached threads that are recycled upon termination " \
1239 "(for Solaris only)") \
1240 \
1241 product(bool, UseLWPSynchronization, true, \
1242 "Use LWP-based instead of libthread-based synchronization " \
1243 "(SPARC only)") \
1244 \
1245 experimental(ccstr, SyncKnobs, NULL, \
1246 "(Unstable) Various monitor synchronization tunables") \
1247 \
1248 experimental(intx, EmitSync, 0, \
1249 "(Unsafe, Unstable) " \
1250 "Control emission of inline sync fast-path code") \
1251 \
1252 product(intx, MonitorBound, 0, "Bound Monitor population") \
1253 range(0, max_jint) \
1254 \
1255 product(bool, MonitorInUseLists, false, "Track Monitors for Deflation") \
1256 \
1257 experimental(intx, SyncFlags, 0, "(Unsafe, Unstable) " \
1258 "Experimental Sync flags") \
1259 \
1260 experimental(intx, SyncVerbose, 0, "(Unstable)") \
1261 \
1262 diagnostic(bool, InlineNotify, true, "intrinsify subset of notify") \
1263 \
1264 experimental(intx, ClearFPUAtPark, 0, "(Unsafe, Unstable)") \
1265 \
1266 experimental(intx, hashCode, 5, \
1267 "(Unstable) select hashCode generation algorithm") \
1268 \
1269 experimental(intx, WorkAroundNPTLTimedWaitHang, 0, \
1270 "(Unstable, Linux-specific) " \
1271 "avoid NPTL-FUTEX hang pthread_cond_timedwait") \
1272 \
1273 product(bool, FilterSpuriousWakeups, true, \
2691 "Eagerly initialize classes if possible") \
2692 \
2693 diagnostic(bool, LogTouchedMethods, false, \
2694 "Log methods which have been ever touched in runtime") \
2695 \
2696 diagnostic(bool, PrintTouchedMethodsAtExit, false, \
2697 "Print all methods that have been ever touched in runtime") \
2698 \
2699 develop(bool, TraceMethodReplacement, false, \
2700 "Print when methods are replaced do to recompilation") \
2701 \
2702 develop(bool, PrintMethodFlushing, false, \
2703 "Print the nmethods being flushed") \
2704 \
2705 diagnostic(bool, PrintMethodFlushingStatistics, false, \
2706 "print statistics about method flushing") \
2707 \
2708 diagnostic(intx, HotMethodDetectionLimit, 100000, \
2709 "Number of compiled code invocations after which " \
2710 "the method is considered as hot by the flusher") \
2711 range(1, max_jint) \
2712 \
2713 diagnostic(intx, MinPassesBeforeFlush, 10, \
2714 "Minimum number of sweeper passes before an nmethod " \
2715 "can be flushed") \
2716 \
2717 product(bool, UseCodeAging, true, \
2718 "Insert counter to detect warm methods") \
2719 \
2720 diagnostic(bool, StressCodeAging, false, \
2721 "Start with counters compiled in") \
2722 \
2723 develop(bool, UseRelocIndex, false, \
2724 "Use an index to speed random access to relocations") \
2725 \
2726 develop(bool, StressCodeBuffers, false, \
2727 "Exercise code buffer expansion and other rare state changes") \
2728 \
2729 diagnostic(bool, DebugNonSafepoints, trueInDebug, \
2730 "Generate extra debugging information for non-safepoints in " \
2731 "nmethods") \
2850 "Trace queries of liveness analysis information") \
2851 \
2852 notproduct(bool, CollectIndexSetStatistics, false, \
2853 "Collect information about IndexSets") \
2854 \
2855 develop(bool, UseLoopSafepoints, true, \
2856 "Generate Safepoint nodes in every loop") \
2857 \
2858 develop(intx, FastAllocateSizeLimit, 128*K, \
2859 /* Note: This value is zero mod 1<<13 for a cheap sparc set. */ \
2860 "Inline allocations larger than this in doublewords must go slow")\
2861 \
2862 product(bool, AggressiveOpts, false, \
2863 "Enable aggressive optimizations - see arguments.cpp") \
2864 \
2865 product_pd(uintx, TypeProfileLevel, \
2866 "=XYZ, with Z: Type profiling of arguments at call; " \
2867 "Y: Type profiling of return value at call; " \
2868 "X: Type profiling of parameters to methods; " \
2869 "X, Y and Z in 0=off ; 1=jsr292 only; 2=all methods") \
2870 constraint(TypeProfileLevelConstraintFunc, AfterErgo) \
2871 \
2872 product(intx, TypeProfileArgsLimit, 2, \
2873 "max number of call arguments to consider for type profiling") \
2874 range(0, 16) \
2875 \
2876 product(intx, TypeProfileParmsLimit, 2, \
2877 "max number of incoming parameters to consider for type profiling"\
2878 ", -1 for all") \
2879 range(-1, 64) \
2880 \
2881 /* statistics */ \
2882 develop(bool, CountCompiledCalls, false, \
2883 "Count method invocations") \
2884 \
2885 notproduct(bool, CountRuntimeCalls, false, \
2886 "Count VM runtime calls") \
2887 \
2888 develop(bool, CountJNICalls, false, \
2889 "Count jni method invocations") \
2890 \
2891 notproduct(bool, CountJVMCalls, false, \
2892 "Count jvm method invocations") \
2893 \
2894 notproduct(bool, CountRemovableExceptions, false, \
2895 "Count exceptions that could be replaced by branches due to " \
2896 "inlining") \
2897 \
2898 notproduct(bool, ICMissHistogram, false, \
2899 "Produce histogram of IC misses") \
3018 \
3019 develop(intx, CounterHalfLifeTime, 30, \
3020 "Half-life time of invocation counters (in seconds)") \
3021 \
3022 develop(intx, CounterDecayMinIntervalLength, 500, \
3023 "The minimum interval (in milliseconds) between invocation of " \
3024 "CounterDecay") \
3025 \
3026 product(bool, AlwaysCompileLoopMethods, false, \
3027 "When using recompilation, never interpret methods " \
3028 "containing loops") \
3029 \
3030 product(bool, DontCompileHugeMethods, true, \
3031 "Do not compile methods > HugeMethodLimit") \
3032 \
3033 /* Bytecode escape analysis estimation. */ \
3034 product(bool, EstimateArgEscape, true, \
3035 "Analyze bytecodes to estimate escape state of arguments") \
3036 \
3037 product(intx, BCEATraceLevel, 0, \
3038 "How much tracing to do of bytecode escape analysis estimates " \
3039 "(0-3)") \
3040 range(0, 3) \
3041 \
3042 product(intx, MaxBCEAEstimateLevel, 5, \
3043 "Maximum number of nested calls that are analyzed by BC EA") \
3044 range(0, max_jint) \
3045 \
3046 product(intx, MaxBCEAEstimateSize, 150, \
3047 "Maximum bytecode size of a method to be analyzed by BC EA") \
3048 range(0, max_jint) \
3049 \
3050 product(intx, AllocatePrefetchStyle, 1, \
3051 "0 = no prefetch, " \
3052 "1 = prefetch instructions for each allocation, " \
3053 "2 = use TLAB watermark to gate allocation prefetch, " \
3054 "3 = use BIS instruction on Sparc for allocation prefetch") \
3055 range(0, 3) \
3056 \
3057 product(intx, AllocatePrefetchDistance, -1, \
3058 "Distance to prefetch ahead of allocation pointer. " \
3059 "-1: use system-specific value (automatically determined") \
3060 constraint(AllocatePrefetchDistanceConstraintFunc, AfterMemoryInit)\
3061 \
3062 product(intx, AllocatePrefetchLines, 3, \
3063 "Number of lines to prefetch ahead of array allocation pointer") \
3064 range(1, max_jint / 2) \
3065 \
3066 product(intx, AllocateInstancePrefetchLines, 1, \
3067 "Number of lines to prefetch ahead of instance allocation " \
3068 "pointer") \
3069 range(1, max_jint / 2) \
3070 \
3071 product(intx, AllocatePrefetchStepSize, 16, \
3072 "Step size in bytes of sequential prefetch instructions") \
3073 constraint(AllocatePrefetchStepSizeConstraintFunc,AfterMemoryInit)\
3074 \
3075 product(intx, AllocatePrefetchInstr, 0, \
3076 "Prefetch instruction to prefetch ahead of allocation pointer") \
3077 constraint(AllocatePrefetchInstrConstraintFunc, AfterErgo) \
3078 \
3079 /* deoptimization */ \
3080 develop(bool, TraceDeoptimization, false, \
3081 "Trace deoptimization") \
3082 \
3083 develop(bool, DebugDeoptimization, false, \
3084 "Tracing various information while debugging deoptimization") \
3085 \
3086 product(intx, SelfDestructTimer, 0, \
3087 "Will cause VM to terminate after a given time (in minutes) " \
3088 "(0 means off)") \
3089 \
3090 product(intx, MaxJavaStackTraceDepth, 1024, \
3091 "The maximum number of lines in the stack trace for Java " \
3092 "exceptions (0 means all)") \
3093 \
3094 NOT_EMBEDDED(diagnostic(intx, GuaranteedSafepointInterval, 1000, \
3095 "Guarantee a safepoint (at least) every so many milliseconds " \
3096 "(0 means none)")) \
3097 \
3124 \
3125 notproduct(size_t, HandleAllocationLimit, 1024, \
3126 "Threshold for HandleMark allocation when +TraceHandleAllocation "\
3127 "is used") \
3128 \
3129 develop(size_t, TotalHandleAllocationLimit, 1024, \
3130 "Threshold for total handle allocation when " \
3131 "+TraceHandleAllocation is used") \
3132 \
3133 develop(intx, StackPrintLimit, 100, \
3134 "number of stack frames to print in VM-level stack dump") \
3135 \
3136 notproduct(intx, MaxElementPrintSize, 256, \
3137 "maximum number of elements to print") \
3138 \
3139 notproduct(intx, MaxSubklassPrintSize, 4, \
3140 "maximum number of subklasses to print when printing klass") \
3141 \
3142 product(intx, MaxInlineLevel, 9, \
3143 "maximum number of nested calls that are inlined") \
3144 range(0, max_jint) \
3145 \
3146 product(intx, MaxRecursiveInlineLevel, 1, \
3147 "maximum number of nested recursive calls that are inlined") \
3148 range(0, max_jint) \
3149 \
3150 develop(intx, MaxForceInlineLevel, 100, \
3151 "maximum number of nested calls that are forced for inlining " \
3152 "(using CompileCommand or marked w/ @ForceInline)") \
3153 range(0, max_jint) \
3154 \
3155 product_pd(intx, InlineSmallCode, \
3156 "Only inline already compiled methods if their code size is " \
3157 "less than this") \
3158 range(0, max_jint) \
3159 \
3160 product(intx, MaxInlineSize, 35, \
3161 "The maximum bytecode size of a method to be inlined") \
3162 range(0, max_jint) \
3163 \
3164 product_pd(intx, FreqInlineSize, \
3165 "The maximum bytecode size of a frequent method to be inlined") \
3166 range(0, max_jint) \
3167 \
3168 product(intx, MaxTrivialSize, 6, \
3169 "The maximum bytecode size of a trivial method to be inlined") \
3170 range(0, max_jint) \
3171 \
3172 product(intx, MinInliningThreshold, 250, \
3173 "The minimum invocation count a method needs to have to be " \
3174 "inlined") \
3175 range(0, max_jint) \
3176 \
3177 develop(intx, MethodHistogramCutoff, 100, \
3178 "The cutoff value for method invocation histogram (+CountCalls)") \
3179 \
3180 develop(intx, ProfilerNumberOfInterpretedMethods, 25, \
3181 "Number of interpreted methods to show in profile") \
3182 \
3183 develop(intx, ProfilerNumberOfCompiledMethods, 25, \
3184 "Number of compiled methods to show in profile") \
3185 \
3186 develop(intx, ProfilerNumberOfStubMethods, 25, \
3187 "Number of stub methods to show in profile") \
3188 \
3189 develop(intx, ProfilerNumberOfRuntimeStubNodes, 25, \
3190 "Number of runtime stub nodes to show in profile") \
3191 \
3192 product(intx, ProfileIntervalsTicks, 100, \
3193 "Number of ticks between printing of interval profile " \
3194 "(+ProfileIntervals)") \
3195 \
3219 notproduct(intx, DeoptimizeALotInterval, 5, \
3220 "Number of exits until DeoptimizeALot kicks in") \
3221 \
3222 notproduct(intx, ZombieALotInterval, 5, \
3223 "Number of exits until ZombieALot kicks in") \
3224 \
3225 diagnostic(intx, MallocVerifyInterval, 0, \
3226 "If non-zero, verify C heap after every N calls to " \
3227 "malloc/realloc/free") \
3228 \
3229 diagnostic(intx, MallocVerifyStart, 0, \
3230 "If non-zero, start verifying C heap after Nth call to " \
3231 "malloc/realloc/free") \
3232 \
3233 diagnostic(uintx, MallocMaxTestWords, 0, \
3234 "If non-zero, maximum number of words that malloc/realloc can " \
3235 "allocate (for testing only)") \
3236 \
3237 product(intx, TypeProfileWidth, 2, \
3238 "Number of receiver types to record in call/cast profile") \
3239 range(0, 4) \
3240 \
3241 develop(intx, BciProfileWidth, 2, \
3242 "Number of return bci's to record in ret profile") \
3243 \
3244 product(intx, PerMethodRecompilationCutoff, 400, \
3245 "After recompiling N times, stay in the interpreter (-1=>'Inf')") \
3246 range(-1, max_intx) \
3247 \
3248 product(intx, PerBytecodeRecompilationCutoff, 200, \
3249 "Per-BCI limit on repeated recompilation (-1=>'Inf')") \
3250 range(-1, max_intx) \
3251 \
3252 product(intx, PerMethodTrapLimit, 100, \
3253 "Limit on traps (of one kind) in a method (includes inlines)") \
3254 range(0, max_jint) \
3255 \
3256 experimental(intx, PerMethodSpecTrapLimit, 5000, \
3257 "Limit on speculative traps (of one kind) in a method " \
3258 "(includes inlines)") \
3259 range(0, max_jint) \
3260 \
3261 product(intx, PerBytecodeTrapLimit, 4, \
3262 "Limit on traps (of one kind) at a particular BCI") \
3263 range(0, max_jint) \
3264 \
3265 experimental(intx, SpecTrapLimitExtraEntries, 3, \
3266 "Extra method data trap entries for speculation") \
3267 \
3268 develop(intx, InlineFrequencyRatio, 20, \
3269 "Ratio of call site execution to caller method invocation") \
3270 range(0, max_jint) \
3271 \
3272 develop_pd(intx, InlineFrequencyCount, \
3273 "Count of call site execution necessary to trigger frequent " \
3274 "inlining") \
3275 range(0, max_jint) \
3276 \
3277 develop(intx, InlineThrowCount, 50, \
3278 "Force inlining of interpreted methods that throw this often") \
3279 range(0, max_jint) \
3280 \
3281 develop(intx, InlineThrowMaxSize, 200, \
3282 "Force inlining of throwing methods smaller than this") \
3283 range(0, max_jint) \
3284 \
3285 develop(intx, ProfilerNodeSize, 1024, \
3286 "Size in K to allocate for the Profile Nodes of each thread") \
3287 range(0, 1024) \
3288 \
3289 /* gc parameters */ \
3290 product(size_t, InitialHeapSize, 0, \
3291 "Initial heap size (in bytes); zero means use ergonomics") \
3292 \
3293 product(size_t, MaxHeapSize, ScaleForWordSize(96*M), \
3294 "Maximum heap size (in bytes)") \
3295 \
3296 product(size_t, OldSize, ScaleForWordSize(4*M), \
3297 "Initial tenured generation size (in bytes)") \
3298 \
3299 product(size_t, NewSize, ScaleForWordSize(1*M), \
3300 "Initial new generation size (in bytes)") \
3301 \
3302 product(size_t, MaxNewSize, max_uintx, \
3303 "Maximum new generation size (in bytes), max_uintx means set " \
3304 "ergonomically") \
3305 \
3306 product(size_t, PretenureSizeThreshold, 0, \
3307 "Maximum size in bytes of objects allocated in DefNew " \
3471 range(1, max_intx) \
3472 \
3473 product_pd(intx, StackRedPages, \
3474 "Number of red zone (unrecoverable overflows) pages") \
3475 range(1, max_intx) \
3476 \
3477 /* greater stack shadow pages can't generate instruction to bang stack */ \
3478 product_pd(intx, StackShadowPages, \
3479 "Number of shadow zone (for overflow checking) pages " \
3480 "this should exceed the depth of the VM and native call stack") \
3481 range(1, 50) \
3482 \
3483 product_pd(intx, ThreadStackSize, \
3484 "Thread Stack Size (in Kbytes)") \
3485 \
3486 product_pd(intx, VMThreadStackSize, \
3487 "Non-Java Thread Stack Size (in Kbytes)") \
3488 \
3489 product_pd(intx, CompilerThreadStackSize, \
3490 "Compiler Thread Stack Size (in Kbytes)") \
3491 range(0, max_intx) \
3492 \
3493 develop_pd(size_t, JVMInvokeMethodSlack, \
3494 "Stack space (bytes) required for JVM_InvokeMethod to complete") \
3495 \
3496 /* code cache parameters */ \
3497 /* ppc64/tiered compilation has large code-entry alignment. */ \
3498 develop(uintx, CodeCacheSegmentSize, 64 PPC64_ONLY(+64) NOT_PPC64(TIERED_ONLY(+64)),\
3499 "Code cache segment size (in bytes) - smallest unit of " \
3500 "allocation") \
3501 range(1, 1024) \
3502 constraint(CodeCacheSegmentSizeConstraintFunc, AfterErgo) \
3503 \
3504 develop_pd(intx, CodeEntryAlignment, \
3505 "Code entry alignment for generated code (in bytes)") \
3506 constraint(CodeEntryAlignmentConstraintFunc, AfterErgo) \
3507 \
3508 product_pd(intx, OptoLoopAlignment, \
3509 "Align inner loops to zero relative to this modulus") \
3510 constraint(OptoLoopAlignmentConstraintFunc, AfterErgo) \
3511 \
3512 product_pd(uintx, InitialCodeCacheSize, \
3513 "Initial code cache size (in bytes)") \
3514 range(0, max_uintx) \
3515 \
3516 develop_pd(uintx, CodeCacheMinimumUseSpace, \
3517 "Minimum code cache size (in bytes) required to start VM.") \
3518 range(0, max_uintx) \
3519 \
3520 product(bool, SegmentedCodeCache, false, \
3521 "Use a segmented code cache") \
3522 \
3523 product_pd(uintx, ReservedCodeCacheSize, \
3524 "Reserved code cache size (in bytes) - maximum code cache size") \
3525 range(0, max_uintx) \
3526 \
3527 product_pd(uintx, NonProfiledCodeHeapSize, \
3528 "Size of code heap with non-profiled methods (in bytes)") \
3529 range(0, max_uintx) \
3530 \
3531 product_pd(uintx, ProfiledCodeHeapSize, \
3532 "Size of code heap with profiled methods (in bytes)") \
3533 range(0, max_uintx) \
3534 \
3535 product_pd(uintx, NonNMethodCodeHeapSize, \
3536 "Size of code heap with non-nmethods (in bytes)") \
3537 range(0, max_uintx) \
3538 \
3539 product_pd(uintx, CodeCacheExpansionSize, \
3540 "Code cache expansion size (in bytes)") \
3541 range(0, max_uintx) \
3542 \
3543 develop_pd(uintx, CodeCacheMinBlockLength, \
3544 "Minimum number of segments in a code cache block") \
3545 range(1, 100) \
3546 \
3547 notproduct(bool, ExitOnFullCodeCache, false, \
3548 "Exit the VM if we fill the code cache") \
3549 \
3550 product(bool, UseCodeCacheFlushing, true, \
3551 "Remove cold/old nmethods from the code cache") \
3552 \
3553 product(uintx, StartAggressiveSweepingAt, 10, \
3554 "Start aggressive sweeping if X[%] of the code cache is free." \
3555 "Segmented code cache: X[%] of the non-profiled heap." \
3556 "Non-segmented code cache: X[%] of the total code cache") \
3557 range(0, 100) \
3558 \
3559 /* interpreter debugging */ \
3560 develop(intx, BinarySwitchThreshold, 5, \
3561 "Minimal number of lookupswitch entries for rewriting to binary " \
3651 " THREAD_PRIORITY_TIME_CRITICAL, as it may interfere with "\
3652 " system threads. On Linux thread priorities are ignored "\
3653 " because the OS does not support static priority in "\
3654 " SCHED_OTHER scheduling class which is the only choice for "\
3655 " non-root, non-realtime applications. "\
3656 "1 : Aggressive. "\
3657 " Java thread priorities map over to the entire range of "\
3658 " native thread priorities. Higher Java thread priorities map "\
3659 " to higher native thread priorities. This policy should be "\
3660 " used with care, as sometimes it can cause performance "\
3661 " degradation in the application and/or the entire system. On "\
3662 " Linux this policy requires root privilege.") \
3663 range(0, 1) \
3664 \
3665 product(bool, ThreadPriorityVerbose, false, \
3666 "Print priority changes") \
3667 \
3668 product(intx, CompilerThreadPriority, -1, \
3669 "The native priority at which compiler threads should run " \
3670 "(-1 means no change)") \
3671 constraint(CompilerThreadPriorityConstraintFunc, AfterErgo) \
3672 \
3673 product(intx, VMThreadPriority, -1, \
3674 "The native priority at which the VM thread should run " \
3675 "(-1 means no change)") \
3676 \
3677 product(bool, CompilerThreadHintNoPreempt, true, \
3678 "(Solaris only) Give compiler threads an extra quanta") \
3679 \
3680 product(bool, VMThreadHintNoPreempt, false, \
3681 "(Solaris only) Give VM thread an extra quanta") \
3682 \
3683 product(intx, JavaPriority1_To_OSPriority, -1, \
3684 "Map Java priorities to OS priorities") \
3685 \
3686 product(intx, JavaPriority2_To_OSPriority, -1, \
3687 "Map Java priorities to OS priorities") \
3688 \
3689 product(intx, JavaPriority3_To_OSPriority, -1, \
3690 "Map Java priorities to OS priorities") \
3691 \
3724 "First class to consider when using +CompileTheWorld") \
3725 \
3726 notproduct(intx, CompileTheWorldStopAt, max_jint, \
3727 "Last class to consider when using +CompileTheWorld") \
3728 \
3729 develop(intx, NewCodeParameter, 0, \
3730 "Testing Only: Create a dedicated integer parameter before " \
3731 "putback") \
3732 \
3733 /* new oopmap storage allocation */ \
3734 develop(intx, MinOopMapAllocation, 8, \
3735 "Minimum number of OopMap entries in an OopMapSet") \
3736 \
3737 /* Background Compilation */ \
3738 develop(intx, LongCompileThreshold, 50, \
3739 "Used with +TraceLongCompiles") \
3740 \
3741 /* recompilation */ \
3742 product_pd(intx, CompileThreshold, \
3743 "number of interpreted method invocations before (re-)compiling") \
3744 constraint(CompileThresholdConstraintFunc, AfterErgo) \
3745 \
3746 product(double, CompileThresholdScaling, 1.0, \
3747 "Factor to control when first compilation happens " \
3748 "(both with and without tiered compilation): " \
3749 "values greater than 1.0 delay counter overflow, " \
3750 "values between 0 and 1.0 rush counter overflow, " \
3751 "value of 1.0 leaves compilation thresholds unchanged " \
3752 "value of 0.0 is equivalent to -Xint. " \
3753 "" \
3754 "Flag can be set as per-method option. " \
3755 "If a value is specified for a method, compilation thresholds " \
3756 "for that method are scaled by both the value of the global flag "\
3757 "and the value of the per-method flag.") \
3758 range(0.0, DBL_MAX) \
3759 \
3760 product(intx, Tier0InvokeNotifyFreqLog, 7, \
3761 "Interpreter (tier 0) invocation notification frequency") \
3762 range(0, 30) \
3763 \
3764 product(intx, Tier2InvokeNotifyFreqLog, 11, \
3765 "C1 without MDO (tier 2) invocation notification frequency") \
3766 range(0, 30) \
3767 \
3768 product(intx, Tier3InvokeNotifyFreqLog, 10, \
3769 "C1 with MDO profiling (tier 3) invocation notification " \
3770 "frequency") \
3771 range(0, 30) \
3772 \
3773 product(intx, Tier23InlineeNotifyFreqLog, 20, \
3774 "Inlinee invocation (tiers 2 and 3) notification frequency") \
3775 range(0, 30) \
3776 \
3777 product(intx, Tier0BackedgeNotifyFreqLog, 10, \
3778 "Interpreter (tier 0) invocation notification frequency") \
3779 range(0, 30) \
3780 \
3781 product(intx, Tier2BackedgeNotifyFreqLog, 14, \
3782 "C1 without MDO (tier 2) invocation notification frequency") \
3783 range(0, 30) \
3784 \
3785 product(intx, Tier3BackedgeNotifyFreqLog, 13, \
3786 "C1 with MDO profiling (tier 3) invocation notification " \
3787 "frequency") \
3788 range(0, 30) \
3789 \
3790 product(intx, Tier2CompileThreshold, 0, \
3791 "threshold at which tier 2 compilation is invoked") \
3792 range(0, max_jint) \
3793 \
3794 product(intx, Tier2BackEdgeThreshold, 0, \
3795 "Back edge threshold at which tier 2 compilation is invoked") \
3796 range(0, max_jint) \
3797 \
3798 product(intx, Tier3InvocationThreshold, 200, \
3799 "Compile if number of method invocations crosses this " \
3800 "threshold") \
3801 range(0, max_jint) \
3802 \
3803 product(intx, Tier3MinInvocationThreshold, 100, \
3804 "Minimum invocation to compile at tier 3") \
3805 range(0, max_jint) \
3806 \
3807 product(intx, Tier3CompileThreshold, 2000, \
3808 "Threshold at which tier 3 compilation is invoked (invocation " \
3809 "minimum must be satisfied") \
3810 range(0, max_jint) \
3811 \
3812 product(intx, Tier3BackEdgeThreshold, 60000, \
3813 "Back edge threshold at which tier 3 OSR compilation is invoked") \
3814 range(0, max_jint) \
3815 \
3816 product(intx, Tier4InvocationThreshold, 5000, \
3817 "Compile if number of method invocations crosses this " \
3818 "threshold") \
3819 range(0, max_jint) \
3820 \
3821 product(intx, Tier4MinInvocationThreshold, 600, \
3822 "Minimum invocation to compile at tier 4") \
3823 range(0, max_jint) \
3824 \
3825 product(intx, Tier4CompileThreshold, 15000, \
3826 "Threshold at which tier 4 compilation is invoked (invocation " \
3827 "minimum must be satisfied") \
3828 range(0, max_jint) \
3829 \
3830 product(intx, Tier4BackEdgeThreshold, 40000, \
3831 "Back edge threshold at which tier 4 OSR compilation is invoked") \
3832 range(0, max_jint) \
3833 \
3834 product(intx, Tier3DelayOn, 5, \
3835 "If C2 queue size grows over this amount per compiler thread " \
3836 "stop compiling at tier 3 and start compiling at tier 2") \
3837 range(0, max_jint) \
3838 \
3839 product(intx, Tier3DelayOff, 2, \
3840 "If C2 queue size is less than this amount per compiler thread " \
3841 "allow methods compiled at tier 2 transition to tier 3") \
3842 range(0, max_jint) \
3843 \
3844 product(intx, Tier3LoadFeedback, 5, \
3845 "Tier 3 thresholds will increase twofold when C1 queue size " \
3846 "reaches this amount per compiler thread") \
3847 range(0, max_jint) \
3848 \
3849 product(intx, Tier4LoadFeedback, 3, \
3850 "Tier 4 thresholds will increase twofold when C2 queue size " \
3851 "reaches this amount per compiler thread") \
3852 range(0, max_jint) \
3853 \
3854 product(intx, TieredCompileTaskTimeout, 50, \
3855 "Kill compile task if method was not used within " \
3856 "given timeout in milliseconds") \
3857 range(0, max_intx) \
3858 \
3859 product(intx, TieredStopAtLevel, 4, \
3860 "Stop at given compilation level") \
3861 range(0, 4) \
3862 \
3863 product(intx, Tier0ProfilingStartPercentage, 200, \
3864 "Start profiling in interpreter if the counters exceed tier 3 " \
3865 "thresholds by the specified percentage") \
3866 range(0, max_jint) \
3867 \
3868 product(uintx, IncreaseFirstTierCompileThresholdAt, 50, \
3869 "Increase the compile threshold for C1 compilation if the code " \
3870 "cache is filled by the specified percentage") \
3871 range(0, 99) \
3872 \
3873 product(intx, TieredRateUpdateMinTime, 1, \
3874 "Minimum rate sampling interval (in milliseconds)") \
3875 range(0, max_intx) \
3876 \
3877 product(intx, TieredRateUpdateMaxTime, 25, \
3878 "Maximum rate sampling interval (in milliseconds)") \
3879 range(0, max_intx) \
3880 \
3881 product_pd(bool, TieredCompilation, \
3882 "Enable tiered compilation") \
3883 \
3884 product(bool, PrintTieredEvents, false, \
3885 "Print tiered events notifications") \
3886 \
3887 product_pd(intx, OnStackReplacePercentage, \
3888 "NON_TIERED number of method invocations/branches (expressed as " \
3889 "% of CompileThreshold) before (re-)compiling OSR code") \
3890 constraint(OnStackReplacePercentageConstraintFunc, AfterErgo) \
3891 \
3892 product(intx, InterpreterProfilePercentage, 33, \
3893 "NON_TIERED number of method invocations/branches (expressed as " \
3894 "% of CompileThreshold) before profiling in the interpreter") \
3895 range(0, 100) \
3896 \
3897 develop(intx, MaxRecompilationSearchLength, 10, \
3898 "The maximum number of frames to inspect when searching for " \
3899 "recompilee") \
3900 \
3901 develop(intx, MaxInterpretedSearchLength, 3, \
3902 "The maximum number of interpreted frames to skip when searching "\
3903 "for recompilee") \
3904 \
3905 develop(intx, DesiredMethodLimit, 8000, \
3906 "The desired maximum method size (in bytecodes) after inlining") \
3907 \
3908 develop(intx, HugeMethodLimit, 8000, \
3909 "Don't compile methods larger than this if " \
3910 "+DontCompileHugeMethods") \
|