111 const size_t minimumStringTableSize = 128;
112 const size_t defaultSymbolTableSize = 32768; // 2^15
113 const size_t minimumSymbolTableSize = 1024;
114
115 #ifdef _LP64
116 #define LP64_RUNTIME_FLAGS(develop, \
117 develop_pd, \
118 product, \
119 product_pd, \
120 range, \
121 constraint) \
122 \
123 product(bool, UseCompressedOops, false, \
124 "Use 32-bit object references in 64-bit VM. " \
125 "lp64_product means flag is always constant in 32 bit VM") \
126 \
127 product(bool, UseCompressedClassPointers, true, \
128 "Use 32-bit class pointers in 64-bit VM. " \
129 "lp64_product means flag is always constant in 32 bit VM") \
130 \
131 product(int, ObjectAlignmentInBytes, 8, \
132 "Default object alignment in bytes, 8 is minimum") \
133 range(8, 256) \
134 constraint(ObjectAlignmentInBytesConstraintFunc, AtParse)
135
136 #else
137 // !_LP64
138
139 #define LP64_RUNTIME_FLAGS(develop, \
140 develop_pd, \
141 product, \
142 product_pd, \
143 range, \
144 constraint)
145 const bool UseCompressedOops = false;
146 const bool UseCompressedClassPointers = false;
147 const int ObjectAlignmentInBytes = 8;
148
149 #endif // _LP64
150
1008 "Print all VM flags after argument and ergonomic processing") \
1009 \
1010 develop(bool, PrintFlagsWithComments, false, \
1011 "Print all VM flags with default values and descriptions and " \
1012 "exit") \
1013 \
1014 product(bool, PrintFlagsRanges, false, \
1015 "Print VM flags and their ranges") \
1016 \
1017 product(bool, SerializeVMOutput, true, DIAGNOSTIC, \
1018 "Use a mutex to serialize output to tty and LogFile") \
1019 \
1020 product(bool, DisplayVMOutput, true, DIAGNOSTIC, \
1021 "Display all VM output on the tty, independently of LogVMOutput") \
1022 \
1023 product(bool, LogVMOutput, false, DIAGNOSTIC, \
1024 "Save VM output to LogFile") \
1025 \
1026 product(ccstr, LogFile, nullptr, DIAGNOSTIC, \
1027 "If LogVMOutput or LogCompilation is on, save VM output to " \
1028 "this file [default: ./hotspot_pid%p.log] (%p replaced with pid)")\
1029 \
1030 product(ccstr, ErrorFile, nullptr, \
1031 "If an error occurs, save the error data to this file " \
1032 "[default: ./hs_err_pid%p.log] (%p replaced with pid)") \
1033 \
1034 product(bool, ExtensiveErrorReports, \
1035 PRODUCT_ONLY(false) NOT_PRODUCT(true), \
1036 "Error reports are more extensive.") \
1037 \
1038 product(bool, DisplayVMOutputToStderr, false, \
1039 "If DisplayVMOutput is true, display all VM output to stderr") \
1040 \
1041 product(bool, DisplayVMOutputToStdout, false, \
1042 "If DisplayVMOutput is true, display all VM output to stdout") \
1043 \
1044 product(bool, ErrorFileToStderr, false, \
1045 "If true, error data is printed to stderr instead of a file") \
1046 \
1047 product(bool, ErrorFileToStdout, false, \
1048 "If true, error data is printed to stdout instead of a file") \
1049 \
1050 develop(bool, VerifyHeavyMonitors, false, \
1051 "Checks that no stack locking happens when using " \
1052 "-XX:LockingMode=0 (LM_MONITOR)") \
1132 product(bool, UseInterpreter, true, \
1133 "Use interpreter for non-compiled methods") \
1134 \
1135 develop(bool, UseFastSignatureHandlers, true, \
1136 "Use fast signature handlers for native calls") \
1137 \
1138 product(bool, UseLoopCounter, true, \
1139 "Increment invocation counter on backward branch") \
1140 \
1141 product_pd(bool, UseOnStackReplacement, \
1142 "Use on stack replacement, calls runtime if invoc. counter " \
1143 "overflows in loop") \
1144 \
1145 develop(bool, TraceOnStackReplacement, false, \
1146 "Trace on stack replacement") \
1147 \
1148 product_pd(bool, PreferInterpreterNativeStubs, \
1149 "Use always interpreter stubs for native methods invoked via " \
1150 "interpreter") \
1151 \
1152 develop(bool, CountBytecodes, false, \
1153 "Count number of bytecodes executed") \
1154 \
1155 develop(bool, PrintBytecodeHistogram, false, \
1156 "Print histogram of the executed bytecodes") \
1157 \
1158 develop(bool, PrintBytecodePairHistogram, false, \
1159 "Print histogram of the executed bytecode pairs") \
1160 \
1161 product(bool, PrintSignatureHandlers, false, DIAGNOSTIC, \
1162 "Print code generated for native method signature handlers") \
1163 \
1164 develop(bool, VerifyOops, false, \
1165 "Do plausibility checks for oops") \
1166 \
1167 develop(bool, CheckUnhandledOops, false, \
1168 "Check for unhandled oops in VM code") \
1169 \
1170 develop(bool, VerifyJNIFields, trueInDebug, \
1171 "Verify jfieldIDs for instance fields") \
1172 \
1173 develop(bool, VerifyFPU, false, \
1174 "Verify FPU state (check for NaN's, etc.)") \
1175 \
1176 develop(bool, VerifyActivationFrameSize, false, \
1177 "Verify that activation frame didn't become smaller than its " \
1178 "minimal size") \
1179 \
1180 develop(bool, TraceFrequencyInlining, false, \
1181 "Trace frequency based inlining") \
1182 \
1183 develop_pd(bool, InlineIntrinsics, \
1184 "Use intrinsics in Interpreter that can be statically resolved") \
1185 \
1186 product_pd(bool, ProfileInterpreter, \
1187 "Profile at the bytecode level during interpretation") \
1188 \
1189 develop_pd(bool, ProfileTraps, \
1190 "Profile deoptimization traps at the bytecode level") \
1191 \
1192 product(intx, ProfileMaturityPercentage, 20, \
1193 "number of method invocations/branches (expressed as % of " \
1194 "CompileThreshold) before using the method's profile") \
1195 range(0, 100) \
1196 \
1197 product(bool, PrintMethodData, false, DIAGNOSTIC, \
1198 "Print the results of +ProfileInterpreter at end of run") \
1199 \
1200 develop(bool, VerifyDataPointer, trueInDebug, \
1201 "Verify the method data pointer during interpreter profiling") \
1202 \
1203 develop(bool, CrashGCForDumpingJavaThread, false, \
1204 "Manually make GC thread crash then dump java stack trace; " \
1205 "Test only") \
1206 \
1207 /* compilation */ \
1208 product(bool, UseCompiler, true, \
1209 "Use Just-In-Time compilation") \
1210 \
1211 develop(intx, CounterHalfLifeTime, 30, \
1212 "Half-life time of invocation counters (in seconds)") \
1213 \
1214 product(bool, AlwaysCompileLoopMethods, false, \
1215 "When using recompilation, never interpret methods " \
1216 "containing loops") \
1711 product(bool, UsePerfData, true, \
1712 "Flag to disable jvmstat instrumentation for performance testing "\
1713 "and problem isolation purposes") \
1714 \
1715 product(bool, PerfDataSaveToFile, false, \
1716 "Save PerfData memory to hsperfdata_<pid> file on exit") \
1717 \
1718 product(ccstr, PerfDataSaveFile, nullptr, \
1719 "Save PerfData memory to the specified absolute pathname. " \
1720 "The string %p in the file name (if present) " \
1721 "will be replaced by pid") \
1722 \
1723 product(int, PerfDataSamplingInterval, 50, \
1724 "Data sampling interval (in milliseconds)") \
1725 range(PeriodicTask::min_interval, max_jint) \
1726 constraint(PerfDataSamplingIntervalFunc, AfterErgo) \
1727 \
1728 product(bool, PerfDisableSharedMem, false, \
1729 "Store performance data in standard memory") \
1730 \
1731 product(int, PerfDataMemorySize, 32*K, \
1732 "Size of performance data memory region. Will be rounded " \
1733 "up to a multiple of the native os page size.") \
1734 range(128, 32*64*K) \
1735 \
1736 product(int, PerfMaxStringConstLength, 1024, \
1737 "Maximum PerfStringConstant string length before truncation") \
1738 range(32, 32*K) \
1739 \
1740 product(bool, PerfAllowAtExitRegistration, false, \
1741 "Allow registration of atexit() methods") \
1742 \
1743 product(bool, PerfBypassFileSystemCheck, false, \
1744 "Bypass Win32 file system criteria checks (Windows Only)") \
1745 \
1746 product(int, UnguardOnExecutionViolation, 0, \
1747 "Unguard page and retry on no-execute fault (Win32 only) " \
1748 "0=off, 1=conservative, 2=aggressive") \
1749 range(0, 2) \
1750 \
1751 /* Serviceability Support */ \
1947 \
1948 develop(bool, VerifyCrossModifyFence, \
1949 false AARCH64_ONLY(DEBUG_ONLY(||true)), \
1950 "Mark all threads after a safepoint, and clear on a modify " \
1951 "fence. Add cleanliness checks.") \
1952 \
1953 product(int, LockingMode, LM_LIGHTWEIGHT, \
1954 "(Deprecated) Select locking mode: " \
1955 "0: (Deprecated) monitors only (LM_MONITOR), " \
1956 "1: (Deprecated) monitors & legacy stack-locking (LM_LEGACY), " \
1957 "2: monitors & new lightweight locking (LM_LIGHTWEIGHT, default)") \
1958 range(0, 2) \
1959 \
1960 product(uint, TrimNativeHeapInterval, 0, \
1961 "Interval, in ms, at which the JVM will trim the native heap if " \
1962 "the platform supports that. Lower values will reclaim memory " \
1963 "more eagerly at the cost of higher overhead. A value of 0 " \
1964 "(default) disables native heap trimming.") \
1965 range(0, UINT_MAX) \
1966 \
1967 develop(bool, SimulateFullAddressSpace, false, \
1968 "Simulates a very populated, fragmented address space; no " \
1969 "targeted reservations will succeed.") \
1970 \
1971 product(bool, ProfileExceptionHandlers, true, \
1972 "Profile exception handlers") \
1973 \
1974 product(bool, AlwaysRecordEvolDependencies, true, EXPERIMENTAL, \
1975 "Unconditionally record nmethod dependencies on class " \
1976 "rewriting/transformation independently of the JVMTI " \
1977 "can_{retransform/redefine}_classes capabilities.") \
1978 \
1979 product(bool, UseSecondarySupersCache, true, DIAGNOSTIC, \
1980 "Use secondary supers cache during subtype checks.") \
1981 \
1982 product(bool, UseSecondarySupersTable, false, DIAGNOSTIC, \
1983 "Use hash table to lookup secondary supers.") \
1984 \
1985 product(bool, VerifySecondarySupers, false, DIAGNOSTIC, \
1986 "Check that linear and hashed secondary lookups return the same result.") \
1987 \
1988 product(bool, StressSecondarySupers, false, DIAGNOSTIC, \
1989 "Use a terrible hash function in order to generate many collisions.") \
1990
1991 // end of RUNTIME_FLAGS
1992
1993 DECLARE_FLAGS(LP64_RUNTIME_FLAGS)
1994 DECLARE_ARCH_FLAGS(ARCH_FLAGS)
1995 DECLARE_FLAGS(RUNTIME_FLAGS)
1996 DECLARE_FLAGS(RUNTIME_OS_FLAGS)
1997
1998 #endif // SHARE_RUNTIME_GLOBALS_HPP
|
111 const size_t minimumStringTableSize = 128;
112 const size_t defaultSymbolTableSize = 32768; // 2^15
113 const size_t minimumSymbolTableSize = 1024;
114
115 #ifdef _LP64
116 #define LP64_RUNTIME_FLAGS(develop, \
117 develop_pd, \
118 product, \
119 product_pd, \
120 range, \
121 constraint) \
122 \
123 product(bool, UseCompressedOops, false, \
124 "Use 32-bit object references in 64-bit VM. " \
125 "lp64_product means flag is always constant in 32 bit VM") \
126 \
127 product(bool, UseCompressedClassPointers, true, \
128 "Use 32-bit class pointers in 64-bit VM. " \
129 "lp64_product means flag is always constant in 32 bit VM") \
130 \
131 /* Leyden */ \
132 product(bool, UseCompatibleCompressedOops, false, \
133 "Always use HeapBasedNarrowOop mode, so that AOT code can be " \
134 "always work regardless of runtime heap range") \
135 \
136 product(int, ObjectAlignmentInBytes, 8, \
137 "Default object alignment in bytes, 8 is minimum") \
138 range(8, 256) \
139 constraint(ObjectAlignmentInBytesConstraintFunc, AtParse)
140
141 #else
142 // !_LP64
143
144 #define LP64_RUNTIME_FLAGS(develop, \
145 develop_pd, \
146 product, \
147 product_pd, \
148 range, \
149 constraint)
150 const bool UseCompressedOops = false;
151 const bool UseCompressedClassPointers = false;
152 const int ObjectAlignmentInBytes = 8;
153
154 #endif // _LP64
155
1013 "Print all VM flags after argument and ergonomic processing") \
1014 \
1015 develop(bool, PrintFlagsWithComments, false, \
1016 "Print all VM flags with default values and descriptions and " \
1017 "exit") \
1018 \
1019 product(bool, PrintFlagsRanges, false, \
1020 "Print VM flags and their ranges") \
1021 \
1022 product(bool, SerializeVMOutput, true, DIAGNOSTIC, \
1023 "Use a mutex to serialize output to tty and LogFile") \
1024 \
1025 product(bool, DisplayVMOutput, true, DIAGNOSTIC, \
1026 "Display all VM output on the tty, independently of LogVMOutput") \
1027 \
1028 product(bool, LogVMOutput, false, DIAGNOSTIC, \
1029 "Save VM output to LogFile") \
1030 \
1031 product(ccstr, LogFile, nullptr, DIAGNOSTIC, \
1032 "If LogVMOutput or LogCompilation is on, save VM output to " \
1033 "this file [default: ./hotspot_%p.log] (%p replaced with pidNNN)")\
1034 \
1035 product(ccstr, ErrorFile, nullptr, \
1036 "If an error occurs, save the error data to this file " \
1037 "[default: ./hs_err_%p.log] (%p replaced with pidNNN)") \
1038 \
1039 product(bool, ExtensiveErrorReports, \
1040 PRODUCT_ONLY(false) NOT_PRODUCT(true), \
1041 "Error reports are more extensive.") \
1042 \
1043 product(bool, DisplayVMOutputToStderr, false, \
1044 "If DisplayVMOutput is true, display all VM output to stderr") \
1045 \
1046 product(bool, DisplayVMOutputToStdout, false, \
1047 "If DisplayVMOutput is true, display all VM output to stdout") \
1048 \
1049 product(bool, ErrorFileToStderr, false, \
1050 "If true, error data is printed to stderr instead of a file") \
1051 \
1052 product(bool, ErrorFileToStdout, false, \
1053 "If true, error data is printed to stdout instead of a file") \
1054 \
1055 develop(bool, VerifyHeavyMonitors, false, \
1056 "Checks that no stack locking happens when using " \
1057 "-XX:LockingMode=0 (LM_MONITOR)") \
1137 product(bool, UseInterpreter, true, \
1138 "Use interpreter for non-compiled methods") \
1139 \
1140 develop(bool, UseFastSignatureHandlers, true, \
1141 "Use fast signature handlers for native calls") \
1142 \
1143 product(bool, UseLoopCounter, true, \
1144 "Increment invocation counter on backward branch") \
1145 \
1146 product_pd(bool, UseOnStackReplacement, \
1147 "Use on stack replacement, calls runtime if invoc. counter " \
1148 "overflows in loop") \
1149 \
1150 develop(bool, TraceOnStackReplacement, false, \
1151 "Trace on stack replacement") \
1152 \
1153 product_pd(bool, PreferInterpreterNativeStubs, \
1154 "Use always interpreter stubs for native methods invoked via " \
1155 "interpreter") \
1156 \
1157 product(bool, CountBytecodes, false, DIAGNOSTIC, \
1158 "Count number of bytecodes executed") \
1159 \
1160 product(bool, CountBytecodesPerThread, false, DIAGNOSTIC, \
1161 "Count number of bytecodes executed per thread") \
1162 \
1163 product(bool, PrintBytecodeHistogram, false, DIAGNOSTIC, \
1164 "Print histogram of the executed bytecodes") \
1165 \
1166 product(double, PrintBytecodeHistogramCutoff, 0.01, \
1167 "Print cutoff for histogram of the executed bytecodes") \
1168 range(0.0, 100.0) \
1169 \
1170 develop(bool, PrintBytecodePairHistogram, false, \
1171 "Print histogram of the executed bytecode pairs") \
1172 \
1173 product(bool, PrintSignatureHandlers, false, DIAGNOSTIC, \
1174 "Print code generated for native method signature handlers") \
1175 \
1176 develop(bool, VerifyOops, false, \
1177 "Do plausibility checks for oops") \
1178 \
1179 develop(bool, CheckUnhandledOops, false, \
1180 "Check for unhandled oops in VM code") \
1181 \
1182 develop(bool, VerifyJNIFields, trueInDebug, \
1183 "Verify jfieldIDs for instance fields") \
1184 \
1185 develop(bool, VerifyFPU, false, \
1186 "Verify FPU state (check for NaN's, etc.)") \
1187 \
1188 develop(bool, VerifyActivationFrameSize, false, \
1189 "Verify that activation frame didn't become smaller than its " \
1190 "minimal size") \
1191 \
1192 develop(bool, TraceFrequencyInlining, false, \
1193 "Trace frequency based inlining") \
1194 \
1195 develop_pd(bool, InlineIntrinsics, \
1196 "Use intrinsics in Interpreter that can be statically resolved") \
1197 \
1198 product_pd(bool, ProfileInterpreter, \
1199 "Profile at the bytecode level during interpretation") \
1200 \
1201 develop_pd(bool, ProfileTraps, \
1202 "Profile deoptimization traps at the bytecode level") \
1203 \
1204 product(intx, ProfileMaturityPercentage, 20, \
1205 "number of method invocations/branches (expressed as % of " \
1206 "CompileThreshold) before using the method's profile") \
1207 range(0, 100) \
1208 \
1209 product(bool, ForceProfiling, false, DIAGNOSTIC, \
1210 "Eagerly allocate MDOs") \
1211 \
1212 product(bool, PrintMethodData, false, DIAGNOSTIC, \
1213 "Print the results of +ProfileInterpreter at end of run") \
1214 \
1215 develop(bool, VerifyDataPointer, trueInDebug, \
1216 "Verify the method data pointer during interpreter profiling") \
1217 \
1218 develop(bool, CrashGCForDumpingJavaThread, false, \
1219 "Manually make GC thread crash then dump java stack trace; " \
1220 "Test only") \
1221 \
1222 /* compilation */ \
1223 product(bool, UseCompiler, true, \
1224 "Use Just-In-Time compilation") \
1225 \
1226 develop(intx, CounterHalfLifeTime, 30, \
1227 "Half-life time of invocation counters (in seconds)") \
1228 \
1229 product(bool, AlwaysCompileLoopMethods, false, \
1230 "When using recompilation, never interpret methods " \
1231 "containing loops") \
1726 product(bool, UsePerfData, true, \
1727 "Flag to disable jvmstat instrumentation for performance testing "\
1728 "and problem isolation purposes") \
1729 \
1730 product(bool, PerfDataSaveToFile, false, \
1731 "Save PerfData memory to hsperfdata_<pid> file on exit") \
1732 \
1733 product(ccstr, PerfDataSaveFile, nullptr, \
1734 "Save PerfData memory to the specified absolute pathname. " \
1735 "The string %p in the file name (if present) " \
1736 "will be replaced by pid") \
1737 \
1738 product(int, PerfDataSamplingInterval, 50, \
1739 "Data sampling interval (in milliseconds)") \
1740 range(PeriodicTask::min_interval, max_jint) \
1741 constraint(PerfDataSamplingIntervalFunc, AfterErgo) \
1742 \
1743 product(bool, PerfDisableSharedMem, false, \
1744 "Store performance data in standard memory") \
1745 \
1746 product(int, PerfDataMemorySize, 64*K, \
1747 "Size of performance data memory region. Will be rounded " \
1748 "up to a multiple of the native os page size.") \
1749 range(128, 32*64*K) \
1750 \
1751 product(int, PerfMaxStringConstLength, 1024, \
1752 "Maximum PerfStringConstant string length before truncation") \
1753 range(32, 32*K) \
1754 \
1755 product(bool, PerfAllowAtExitRegistration, false, \
1756 "Allow registration of atexit() methods") \
1757 \
1758 product(bool, PerfBypassFileSystemCheck, false, \
1759 "Bypass Win32 file system criteria checks (Windows Only)") \
1760 \
1761 product(int, UnguardOnExecutionViolation, 0, \
1762 "Unguard page and retry on no-execute fault (Win32 only) " \
1763 "0=off, 1=conservative, 2=aggressive") \
1764 range(0, 2) \
1765 \
1766 /* Serviceability Support */ \
1962 \
1963 develop(bool, VerifyCrossModifyFence, \
1964 false AARCH64_ONLY(DEBUG_ONLY(||true)), \
1965 "Mark all threads after a safepoint, and clear on a modify " \
1966 "fence. Add cleanliness checks.") \
1967 \
1968 product(int, LockingMode, LM_LIGHTWEIGHT, \
1969 "(Deprecated) Select locking mode: " \
1970 "0: (Deprecated) monitors only (LM_MONITOR), " \
1971 "1: (Deprecated) monitors & legacy stack-locking (LM_LEGACY), " \
1972 "2: monitors & new lightweight locking (LM_LIGHTWEIGHT, default)") \
1973 range(0, 2) \
1974 \
1975 product(uint, TrimNativeHeapInterval, 0, \
1976 "Interval, in ms, at which the JVM will trim the native heap if " \
1977 "the platform supports that. Lower values will reclaim memory " \
1978 "more eagerly at the cost of higher overhead. A value of 0 " \
1979 "(default) disables native heap trimming.") \
1980 range(0, UINT_MAX) \
1981 \
1982 product(bool, ProfileVMLocks, false, DIAGNOSTIC, \
1983 "Profile VM locks usage on main thread") \
1984 \
1985 product(bool, ProfileVMCalls, false, DIAGNOSTIC, \
1986 "Profile VM calls on main thread") \
1987 \
1988 product(bool, ProfileVMOps, true, DIAGNOSTIC, \
1989 "Profile VM operations on main thread") \
1990 \
1991 product(bool, ProfileRuntimeCalls, false, DIAGNOSTIC, \
1992 "Profile calls into VM runtime on main thread") \
1993 \
1994 develop(bool, SimulateFullAddressSpace, false, \
1995 "Simulates a very populated, fragmented address space; no " \
1996 "targeted reservations will succeed.") \
1997 \
1998 product(bool, ProfileExceptionHandlers, true, \
1999 "Profile exception handlers") \
2000 \
2001 product(bool, AlwaysRecordEvolDependencies, true, EXPERIMENTAL, \
2002 "Unconditionally record nmethod dependencies on class " \
2003 "rewriting/transformation independently of the JVMTI " \
2004 "can_{retransform/redefine}_classes capabilities.") \
2005 \
2006 product(bool, TraceThreadTime, false, \
2007 "Enable tracing of thread time in Perf counters") \
2008 \
2009 product(bool, UseSecondarySupersCache, true, DIAGNOSTIC, \
2010 "Use secondary supers cache during subtype checks.") \
2011 \
2012 product(bool, UseSecondarySupersTable, false, DIAGNOSTIC, \
2013 "Use hash table to lookup secondary supers.") \
2014 \
2015 product(bool, VerifySecondarySupers, false, DIAGNOSTIC, \
2016 "Check that linear and hashed secondary lookups return the same result.") \
2017 \
2018 product(bool, StressSecondarySupers, false, DIAGNOSTIC, \
2019 "Use a terrible hash function in order to generate many collisions.") \
2020
2021
2022 // end of RUNTIME_FLAGS
2023
2024 DECLARE_FLAGS(LP64_RUNTIME_FLAGS)
2025 DECLARE_ARCH_FLAGS(ARCH_FLAGS)
2026 DECLARE_FLAGS(RUNTIME_FLAGS)
2027 DECLARE_FLAGS(RUNTIME_OS_FLAGS)
2028
2029 #endif // SHARE_RUNTIME_GLOBALS_HPP
|