Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 1 | // Copyright 2012 the V8 project authors. All rights reserved. |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 4 | |
| 5 | // This file defines all of the flags. It is separated into different section, |
| 6 | // for Debug, Release, Logging and Profiling, etc. To add a new flag, find the |
| 7 | // correct section, and use one of the DEFINE_ macros, without a trailing ';'. |
| 8 | // |
| 9 | // This include does not have a guard, because it is a template-style include, |
| 10 | // which can be included multiple times in different modes. It expects to have |
| 11 | // a mode defined before it's included. The modes are FLAG_MODE_... below: |
| 12 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 13 | #define DEFINE_IMPLICATION(whenflag, thenflag) \ |
| 14 | DEFINE_VALUE_IMPLICATION(whenflag, thenflag, true) |
| 15 | |
| 16 | #define DEFINE_NEG_IMPLICATION(whenflag, thenflag) \ |
| 17 | DEFINE_VALUE_IMPLICATION(whenflag, thenflag, false) |
| 18 | |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 19 | #define DEFINE_NEG_NEG_IMPLICATION(whenflag, thenflag) \ |
| 20 | DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, false) |
| 21 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 22 | // We want to declare the names of the variables for the header file. Normally |
| 23 | // this will just be an extern declaration, but for a readonly flag we let the |
| 24 | // compiler make better optimizations by giving it the value. |
| 25 | #if defined(FLAG_MODE_DECLARE) |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 26 | #define FLAG_FULL(ftype, ctype, nam, def, cmt) extern ctype FLAG_##nam; |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 27 | #define FLAG_READONLY(ftype, ctype, nam, def, cmt) \ |
| 28 | static ctype const FLAG_##nam = def; |
| 29 | |
| 30 | // We want to supply the actual storage and value for the flag variable in the |
| 31 | // .cc file. We only do this for writable flags. |
| 32 | #elif defined(FLAG_MODE_DEFINE) |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 33 | #define FLAG_FULL(ftype, ctype, nam, def, cmt) ctype FLAG_##nam = def; |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 34 | |
| 35 | // We need to define all of our default values so that the Flag structure can |
| 36 | // access them by pointer. These are just used internally inside of one .cc, |
| 37 | // for MODE_META, so there is no impact on the flags interface. |
| 38 | #elif defined(FLAG_MODE_DEFINE_DEFAULTS) |
| 39 | #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ |
| 40 | static ctype const FLAGDEFAULT_##nam = def; |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 41 | |
| 42 | // We want to write entries into our meta data table, for internal parsing and |
| 43 | // printing / etc in the flag parser code. We only do this for writable flags. |
| 44 | #elif defined(FLAG_MODE_META) |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 45 | #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ |
| 46 | { Flag::TYPE_##ftype, #nam, &FLAG_##nam, &FLAGDEFAULT_##nam, cmt, false } \ |
| 47 | , |
| 48 | #define FLAG_ALIAS(ftype, ctype, alias, nam) \ |
| 49 | { \ |
| 50 | Flag::TYPE_##ftype, #alias, &FLAG_##nam, &FLAGDEFAULT_##nam, \ |
| 51 | "alias for --" #nam, false \ |
| 52 | } \ |
| 53 | , |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 54 | |
| 55 | // We produce the code to set flags when it is implied by another flag. |
| 56 | #elif defined(FLAG_MODE_DEFINE_IMPLICATIONS) |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 57 | #define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value) \ |
| 58 | if (FLAG_##whenflag) FLAG_##thenflag = value; |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 59 | |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 60 | #define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value) \ |
| 61 | if (!FLAG_##whenflag) FLAG_##thenflag = value; |
| 62 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 63 | #else |
| 64 | #error No mode supplied when including flags.defs |
| 65 | #endif |
| 66 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 67 | // Dummy defines for modes where it is not relevant. |
| 68 | #ifndef FLAG_FULL |
| 69 | #define FLAG_FULL(ftype, ctype, nam, def, cmt) |
| 70 | #endif |
| 71 | |
| 72 | #ifndef FLAG_READONLY |
| 73 | #define FLAG_READONLY(ftype, ctype, nam, def, cmt) |
| 74 | #endif |
| 75 | |
| 76 | #ifndef FLAG_ALIAS |
| 77 | #define FLAG_ALIAS(ftype, ctype, alias, nam) |
| 78 | #endif |
| 79 | |
| 80 | #ifndef DEFINE_VALUE_IMPLICATION |
| 81 | #define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value) |
| 82 | #endif |
| 83 | |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 84 | #ifndef DEFINE_NEG_VALUE_IMPLICATION |
| 85 | #define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value) |
| 86 | #endif |
| 87 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 88 | #define COMMA , |
| 89 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 90 | #ifdef FLAG_MODE_DECLARE |
| 91 | // Structure used to hold a collection of arguments to the JavaScript code. |
| 92 | struct JSArguments { |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 93 | public: |
| 94 | inline const char*& operator[](int idx) const { return argv[idx]; } |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 95 | static JSArguments Create(int argc, const char** argv) { |
| 96 | JSArguments args; |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 97 | args.argc = argc; |
| 98 | args.argv = argv; |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 99 | return args; |
| 100 | } |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 101 | int argc; |
| 102 | const char** argv; |
| 103 | }; |
| 104 | |
| 105 | struct MaybeBoolFlag { |
| 106 | static MaybeBoolFlag Create(bool has_value, bool value) { |
| 107 | MaybeBoolFlag flag; |
| 108 | flag.has_value = has_value; |
| 109 | flag.value = value; |
| 110 | return flag; |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 111 | } |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 112 | bool has_value; |
| 113 | bool value; |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 114 | }; |
| 115 | #endif |
| 116 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 117 | #ifdef DEBUG |
| 118 | #define DEBUG_BOOL true |
| 119 | #else |
| 120 | #define DEBUG_BOOL false |
| 121 | #endif |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 122 | #if (defined CAN_USE_VFP3_INSTRUCTIONS) || !(defined ARM_TEST_NO_FEATURE_PROBE) |
| 123 | #define ENABLE_VFP3_DEFAULT true |
| 124 | #else |
| 125 | #define ENABLE_VFP3_DEFAULT false |
| 126 | #endif |
| 127 | #if (defined CAN_USE_ARMV7_INSTRUCTIONS) || !(defined ARM_TEST_NO_FEATURE_PROBE) |
| 128 | #define ENABLE_ARMV7_DEFAULT true |
| 129 | #else |
| 130 | #define ENABLE_ARMV7_DEFAULT false |
| 131 | #endif |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 132 | #if (defined CAN_USE_ARMV8_INSTRUCTIONS) || !(defined ARM_TEST_NO_FEATURE_PROBE) |
| 133 | #define ENABLE_ARMV8_DEFAULT true |
| 134 | #else |
| 135 | #define ENABLE_ARMV8_DEFAULT false |
| 136 | #endif |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 137 | #if (defined CAN_USE_VFP32DREGS) || !(defined ARM_TEST_NO_FEATURE_PROBE) |
| 138 | #define ENABLE_32DREGS_DEFAULT true |
| 139 | #else |
| 140 | #define ENABLE_32DREGS_DEFAULT false |
| 141 | #endif |
| 142 | #if (defined CAN_USE_NEON) || !(defined ARM_TEST_NO_FEATURE_PROBE) |
| 143 | # define ENABLE_NEON_DEFAULT true |
| 144 | #else |
| 145 | # define ENABLE_NEON_DEFAULT false |
| 146 | #endif |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 147 | #ifdef V8_OS_WIN |
| 148 | # define ENABLE_LOG_COLOUR false |
| 149 | #else |
| 150 | # define ENABLE_LOG_COLOUR true |
| 151 | #endif |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 152 | |
| 153 | #define DEFINE_BOOL(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt) |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 154 | #define DEFINE_BOOL_READONLY(nam, def, cmt) \ |
| 155 | FLAG_READONLY(BOOL, bool, nam, def, cmt) |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 156 | #define DEFINE_MAYBE_BOOL(nam, cmt) \ |
| 157 | FLAG(MAYBE_BOOL, MaybeBoolFlag, nam, {false COMMA false}, cmt) |
| 158 | #define DEFINE_INT(nam, def, cmt) FLAG(INT, int, nam, def, cmt) |
| 159 | #define DEFINE_FLOAT(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt) |
| 160 | #define DEFINE_STRING(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt) |
| 161 | #define DEFINE_ARGS(nam, cmt) FLAG(ARGS, JSArguments, nam, {0 COMMA NULL}, cmt) |
| 162 | |
| 163 | #define DEFINE_ALIAS_BOOL(alias, nam) FLAG_ALIAS(BOOL, bool, alias, nam) |
| 164 | #define DEFINE_ALIAS_INT(alias, nam) FLAG_ALIAS(INT, int, alias, nam) |
| 165 | #define DEFINE_ALIAS_FLOAT(alias, nam) FLAG_ALIAS(FLOAT, double, alias, nam) |
| 166 | #define DEFINE_ALIAS_STRING(alias, nam) \ |
| 167 | FLAG_ALIAS(STRING, const char*, alias, nam) |
| 168 | #define DEFINE_ALIAS_ARGS(alias, nam) FLAG_ALIAS(ARGS, JSArguments, alias, nam) |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 169 | |
| 170 | // |
| 171 | // Flags in all modes. |
| 172 | // |
| 173 | #define FLAG FLAG_FULL |
| 174 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 175 | DEFINE_BOOL(experimental_extras, false, |
| 176 | "enable code compiled in via v8_experimental_extra_library_files") |
| 177 | |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 178 | // Flags for language modes and experimental language features. |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 179 | DEFINE_BOOL(use_strict, false, "enforce strict mode") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 180 | |
| 181 | DEFINE_BOOL(es_staging, false, |
| 182 | "enable test-worthy harmony features (for internal use only)") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 183 | DEFINE_BOOL(harmony, false, "enable all completed harmony features") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 184 | DEFINE_BOOL(harmony_shipping, true, "enable all shipped harmony features") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 185 | DEFINE_IMPLICATION(es_staging, harmony) |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 186 | |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 187 | DEFINE_BOOL(promise_extra, false, "additional V8 Promise functions") |
| 188 | // Removing extra Promise functions is shipped |
| 189 | DEFINE_NEG_VALUE_IMPLICATION(harmony_shipping, promise_extra, true) |
| 190 | |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 191 | DEFINE_BOOL(intl_extra, false, "additional V8 Intl functions") |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 192 | // Removing extra Intl functions is shipped |
| 193 | DEFINE_NEG_VALUE_IMPLICATION(harmony_shipping, intl_extra, true) |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 194 | |
| 195 | // Activate on ClusterFuzz. |
| 196 | DEFINE_IMPLICATION(es_staging, harmony_regexp_lookbehind) |
| 197 | DEFINE_IMPLICATION(es_staging, move_object_start) |
| 198 | |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 199 | // Features that are still work in progress (behind individual flags). |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 200 | #define HARMONY_INPROGRESS(V) \ |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 201 | V(harmony_array_prototype_values, "harmony Array.prototype.values") \ |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 202 | V(harmony_function_sent, "harmony function.sent") \ |
| 203 | V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \ |
| 204 | V(harmony_simd, "harmony simd") \ |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 205 | V(harmony_explicit_tailcalls, "harmony explicit tail calls") \ |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 206 | V(harmony_do_expressions, "harmony do-expressions") \ |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 207 | V(harmony_restrictive_generators, \ |
| 208 | "harmony restrictions on generator declarations") \ |
| 209 | V(harmony_regexp_named_captures, "harmony regexp named captures") \ |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 210 | V(harmony_regexp_property, "harmony unicode regexp property classes") \ |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 211 | V(harmony_for_in, "harmony for-in syntax") |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 212 | |
| 213 | // Features that are complete (but still behind --harmony/es-staging flag). |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 214 | #define HARMONY_STAGED_BASE(V) \ |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 215 | V(harmony_regexp_lookbehind, "harmony regexp lookbehind") \ |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 216 | V(harmony_tailcalls, "harmony tail calls") \ |
| 217 | V(harmony_object_values_entries, "harmony Object.values / Object.entries") \ |
| 218 | V(harmony_object_own_property_descriptors, \ |
| 219 | "harmony Object.getOwnPropertyDescriptors()") \ |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 220 | V(harmony_async_await, "harmony async-await") \ |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 221 | V(harmony_string_padding, "harmony String-padding methods") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 222 | |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 223 | #ifdef V8_I18N_SUPPORT |
| 224 | #define HARMONY_STAGED(V) \ |
| 225 | HARMONY_STAGED_BASE(V) \ |
| 226 | V(icu_case_mapping, "case mapping with ICU rather than Unibrow") |
| 227 | #else |
| 228 | #define HARMONY_STAGED(V) HARMONY_STAGED_BASE(V) |
| 229 | #endif |
| 230 | |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 231 | // Features that are shipping (turned on by default, but internal flag remains). |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 232 | #define HARMONY_SHIPPING(V) \ |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 233 | V(harmony_restrictive_declarations, \ |
| 234 | "harmony limitations on sloppy mode function declarations") \ |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 235 | V(harmony_exponentiation_operator, "harmony exponentiation operator `**`") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 236 | |
| 237 | // Once a shipping feature has proved stable in the wild, it will be dropped |
| 238 | // from HARMONY_SHIPPING, all occurrences of the FLAG_ variable are removed, |
| 239 | // and associated tests are moved from the harmony directory to the appropriate |
| 240 | // esN directory. |
| 241 | |
| 242 | |
| 243 | #define FLAG_INPROGRESS_FEATURES(id, description) \ |
| 244 | DEFINE_BOOL(id, false, "enable " #description " (in progress)") |
| 245 | HARMONY_INPROGRESS(FLAG_INPROGRESS_FEATURES) |
| 246 | #undef FLAG_INPROGRESS_FEATURES |
| 247 | |
| 248 | #define FLAG_STAGED_FEATURES(id, description) \ |
| 249 | DEFINE_BOOL(id, false, "enable " #description) \ |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 250 | DEFINE_IMPLICATION(harmony, id) |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 251 | HARMONY_STAGED(FLAG_STAGED_FEATURES) |
| 252 | #undef FLAG_STAGED_FEATURES |
| 253 | |
| 254 | #define FLAG_SHIPPING_FEATURES(id, description) \ |
| 255 | DEFINE_BOOL(id, true, "enable " #description) \ |
| 256 | DEFINE_NEG_NEG_IMPLICATION(harmony_shipping, id) |
| 257 | HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES) |
| 258 | #undef FLAG_SHIPPING_FEATURES |
| 259 | |
Ben Murdoch | 3fb3ca8 | 2011-12-02 17:19:32 +0000 | [diff] [blame] | 260 | // Flags for experimental implementation features. |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 261 | DEFINE_BOOL(compiled_keyed_generic_loads, false, |
| 262 | "use optimizing compiler to generate keyed generic load stubs") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 263 | DEFINE_BOOL(allocation_site_pretenuring, true, |
| 264 | "pretenure with allocation sites") |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 265 | DEFINE_BOOL(page_promotion, true, "promote pages based on utilization") |
| 266 | DEFINE_INT(page_promotion_threshold, 70, |
| 267 | "min percentage of live bytes on a page to enable fast evacuation") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 268 | DEFINE_BOOL(trace_pretenuring, false, |
| 269 | "trace pretenuring decisions of HAllocate instructions") |
| 270 | DEFINE_BOOL(trace_pretenuring_statistics, false, |
| 271 | "trace allocation site pretenuring statistics") |
| 272 | DEFINE_BOOL(track_fields, true, "track fields with only smi values") |
| 273 | DEFINE_BOOL(track_double_fields, true, "track fields with double values") |
| 274 | DEFINE_BOOL(track_heap_object_fields, true, "track fields with heap values") |
| 275 | DEFINE_BOOL(track_computed_fields, true, "track computed boilerplate fields") |
| 276 | DEFINE_IMPLICATION(track_double_fields, track_fields) |
| 277 | DEFINE_IMPLICATION(track_heap_object_fields, track_fields) |
| 278 | DEFINE_IMPLICATION(track_computed_fields, track_fields) |
| 279 | DEFINE_BOOL(track_field_types, true, "track field types") |
| 280 | DEFINE_IMPLICATION(track_field_types, track_fields) |
| 281 | DEFINE_IMPLICATION(track_field_types, track_heap_object_fields) |
| 282 | DEFINE_BOOL(smi_binop, true, "support smi representation in binary operations") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 283 | |
| 284 | // Flags for optimization types. |
| 285 | DEFINE_BOOL(optimize_for_size, false, |
| 286 | "Enables optimizations which favor memory size over execution " |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 287 | "speed") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 288 | |
| 289 | DEFINE_VALUE_IMPLICATION(optimize_for_size, max_semi_space_size, 1) |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 290 | |
| 291 | // Flags for data representation optimizations |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 292 | DEFINE_BOOL(unbox_double_arrays, true, "automatically unbox arrays of doubles") |
| 293 | DEFINE_BOOL(string_slices, true, "use string slices") |
Ben Murdoch | 5d4cdbf | 2012-04-11 10:23:59 +0100 | [diff] [blame] | 294 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 295 | // Flags for Ignition. |
| 296 | DEFINE_BOOL(ignition, false, "use ignition interpreter") |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 297 | DEFINE_BOOL(ignition_eager, false, "eagerly compile and parse with ignition") |
| 298 | DEFINE_BOOL(ignition_generators, true, |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 299 | "enable experimental ignition support for generators") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 300 | DEFINE_STRING(ignition_filter, "*", "filter for ignition interpreter") |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 301 | DEFINE_BOOL(ignition_deadcode, true, |
| 302 | "use ignition dead code elimination optimizer") |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 303 | DEFINE_BOOL(ignition_peephole, true, "use ignition peephole optimizer") |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 304 | DEFINE_BOOL(ignition_reo, true, "use ignition register equivalence optimizer") |
| 305 | DEFINE_BOOL(ignition_filter_expression_positions, true, |
| 306 | "filter expression positions before the bytecode pipeline") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 307 | DEFINE_BOOL(print_bytecode, false, |
| 308 | "print bytecode generated by ignition interpreter") |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 309 | DEFINE_BOOL(trace_ignition, false, |
| 310 | "trace the bytecodes executed by the ignition interpreter") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 311 | DEFINE_BOOL(trace_ignition_codegen, false, |
| 312 | "trace the codegen of ignition interpreter bytecode handlers") |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 313 | DEFINE_BOOL(trace_ignition_dispatches, false, |
| 314 | "traces the dispatches to bytecode handlers by the ignition " |
| 315 | "interpreter") |
| 316 | DEFINE_STRING(trace_ignition_dispatches_output_file, nullptr, |
| 317 | "the file to which the bytecode handler dispatch table is " |
| 318 | "written (by default, the table is not written to a file)") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 319 | |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 320 | // Flags for Crankshaft. |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 321 | DEFINE_BOOL(crankshaft, true, "use crankshaft") |
| 322 | DEFINE_STRING(hydrogen_filter, "*", "optimization filter") |
| 323 | DEFINE_BOOL(use_gvn, true, "use hydrogen global value numbering") |
| 324 | DEFINE_INT(gvn_iterations, 3, "maximum number of GVN fix-point iterations") |
| 325 | DEFINE_BOOL(use_canonicalizing, true, "use hydrogen instruction canonicalizing") |
| 326 | DEFINE_BOOL(use_inlining, true, "use function inlining") |
| 327 | DEFINE_BOOL(use_escape_analysis, true, "use hydrogen escape analysis") |
| 328 | DEFINE_BOOL(use_allocation_folding, true, "use allocation folding") |
| 329 | DEFINE_BOOL(use_local_allocation_folding, false, "only fold in basic blocks") |
| 330 | DEFINE_BOOL(use_write_barrier_elimination, true, |
| 331 | "eliminate write barriers targeting allocations in optimized code") |
| 332 | DEFINE_INT(max_inlining_levels, 5, "maximum number of inlining levels") |
| 333 | DEFINE_INT(max_inlined_source_size, 600, |
| 334 | "maximum source size in bytes considered for a single inlining") |
| 335 | DEFINE_INT(max_inlined_nodes, 196, |
| 336 | "maximum number of AST nodes considered for a single inlining") |
| 337 | DEFINE_INT(max_inlined_nodes_cumulative, 400, |
| 338 | "maximum cumulative number of AST nodes considered for inlining") |
| 339 | DEFINE_BOOL(loop_invariant_code_motion, true, "loop invariant code motion") |
| 340 | DEFINE_BOOL(fast_math, true, "faster (but maybe less accurate) math functions") |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 341 | DEFINE_BOOL(collect_megamorphic_maps_from_stub_cache, false, |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 342 | "crankshaft harvests type feedback from stub cache") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 343 | DEFINE_BOOL(hydrogen_stats, false, "print statistics for hydrogen") |
| 344 | DEFINE_BOOL(trace_check_elimination, false, "trace check elimination phase") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 345 | DEFINE_BOOL(trace_environment_liveness, false, |
| 346 | "trace liveness of local variable slots") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 347 | DEFINE_BOOL(trace_hydrogen, false, "trace generated hydrogen to file") |
| 348 | DEFINE_STRING(trace_hydrogen_filter, "*", "hydrogen tracing filter") |
| 349 | DEFINE_BOOL(trace_hydrogen_stubs, false, "trace generated hydrogen for stubs") |
| 350 | DEFINE_STRING(trace_hydrogen_file, NULL, "trace hydrogen to given file name") |
| 351 | DEFINE_STRING(trace_phase, "HLZ", "trace generated IR for specified phases") |
| 352 | DEFINE_BOOL(trace_inlining, false, "trace inlining decisions") |
| 353 | DEFINE_BOOL(trace_load_elimination, false, "trace load elimination") |
| 354 | DEFINE_BOOL(trace_store_elimination, false, "trace store elimination") |
| 355 | DEFINE_BOOL(trace_alloc, false, "trace register allocator") |
| 356 | DEFINE_BOOL(trace_all_uses, false, "trace all use positions") |
| 357 | DEFINE_BOOL(trace_range, false, "trace range analysis") |
| 358 | DEFINE_BOOL(trace_gvn, false, "trace global value numbering") |
| 359 | DEFINE_BOOL(trace_representation, false, "trace representation types") |
| 360 | DEFINE_BOOL(trace_removable_simulates, false, "trace removable simulates") |
| 361 | DEFINE_BOOL(trace_escape_analysis, false, "trace hydrogen escape analysis") |
| 362 | DEFINE_BOOL(trace_allocation_folding, false, "trace allocation folding") |
| 363 | DEFINE_BOOL(trace_track_allocation_sites, false, |
| 364 | "trace the tracking of allocation sites") |
| 365 | DEFINE_BOOL(trace_migration, false, "trace object migration") |
| 366 | DEFINE_BOOL(trace_generalization, false, "trace map generalization") |
| 367 | DEFINE_BOOL(stress_pointer_maps, false, "pointer map for every instruction") |
| 368 | DEFINE_BOOL(stress_environments, false, "environment for every instruction") |
| 369 | DEFINE_INT(deopt_every_n_times, 0, |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 370 | "deoptimize every n times a deopt point is passed") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 371 | DEFINE_INT(deopt_every_n_garbage_collections, 0, |
| 372 | "deoptimize every n garbage collections") |
| 373 | DEFINE_BOOL(print_deopt_stress, false, "print number of possible deopt points") |
| 374 | DEFINE_BOOL(trap_on_deopt, false, "put a break point before deoptimizing") |
| 375 | DEFINE_BOOL(trap_on_stub_deopt, false, |
| 376 | "put a break point before deoptimizing a stub") |
| 377 | DEFINE_BOOL(deoptimize_uncommon_cases, true, "deoptimize uncommon cases") |
| 378 | DEFINE_BOOL(polymorphic_inlining, true, "polymorphic inlining") |
| 379 | DEFINE_BOOL(use_osr, true, "use on-stack replacement") |
| 380 | DEFINE_BOOL(array_bounds_checks_elimination, true, |
| 381 | "perform array bounds checks elimination") |
| 382 | DEFINE_BOOL(trace_bce, false, "trace array bounds check elimination") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 383 | DEFINE_BOOL(array_index_dehoisting, true, "perform array index dehoisting") |
| 384 | DEFINE_BOOL(analyze_environment_liveness, true, |
| 385 | "analyze liveness of environment slots and zap dead values") |
| 386 | DEFINE_BOOL(load_elimination, true, "use load elimination") |
| 387 | DEFINE_BOOL(check_elimination, true, "use check elimination") |
| 388 | DEFINE_BOOL(store_elimination, false, "use store elimination") |
| 389 | DEFINE_BOOL(dead_code_elimination, true, "use dead code elimination") |
| 390 | DEFINE_BOOL(fold_constants, true, "use constant folding") |
| 391 | DEFINE_BOOL(trace_dead_code_elimination, false, "trace dead code elimination") |
| 392 | DEFINE_BOOL(unreachable_code_elimination, true, "eliminate unreachable code") |
| 393 | DEFINE_BOOL(trace_osr, false, "trace on-stack replacement") |
| 394 | DEFINE_INT(stress_runs, 0, "number of stress runs") |
| 395 | DEFINE_BOOL(lookup_sample_by_shared, true, |
| 396 | "when picking a function to optimize, watch for shared function " |
| 397 | "info, not JSFunction itself") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 398 | DEFINE_BOOL(flush_optimized_code_cache, false, |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 399 | "flushes the cache of optimized code for closures on every GC") |
| 400 | DEFINE_BOOL(inline_construct, true, "inline constructor calls") |
| 401 | DEFINE_BOOL(inline_arguments, true, "inline functions with arguments object") |
| 402 | DEFINE_BOOL(inline_accessors, true, "inline JavaScript accessors") |
| 403 | DEFINE_INT(escape_analysis_iterations, 2, |
| 404 | "maximum number of escape analysis fix-point iterations") |
Ben Murdoch | e0cee9b | 2011-05-25 10:26:03 +0100 | [diff] [blame] | 405 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 406 | DEFINE_BOOL(concurrent_recompilation, true, |
| 407 | "optimizing hot functions asynchronously on a separate thread") |
| 408 | DEFINE_BOOL(trace_concurrent_recompilation, false, |
| 409 | "track concurrent recompilation") |
| 410 | DEFINE_INT(concurrent_recompilation_queue_length, 8, |
| 411 | "the length of the concurrent compilation queue") |
| 412 | DEFINE_INT(concurrent_recompilation_delay, 0, |
| 413 | "artificial compilation delay in ms") |
| 414 | DEFINE_BOOL(block_concurrent_recompilation, false, |
| 415 | "block queued jobs until released") |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 416 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 417 | DEFINE_BOOL(omit_map_checks_for_leaf_maps, true, |
| 418 | "do not emit check maps for constant values that have a leaf map, " |
| 419 | "deoptimize the optimized code if the layout of the maps changes.") |
| 420 | |
| 421 | // Flags for TurboFan. |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 422 | DEFINE_BOOL(turbo, false, "enable TurboFan compiler") |
| 423 | DEFINE_IMPLICATION(turbo, turbo_asm_deoptimization) |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 424 | DEFINE_IMPLICATION(turbo, turbo_type_feedback) |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 425 | DEFINE_BOOL(turbo_shipping, true, "enable TurboFan compiler on subset") |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 426 | DEFINE_BOOL(turbo_from_bytecode, false, "enable building graphs from bytecode") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 427 | DEFINE_BOOL(turbo_sp_frame_access, false, |
| 428 | "use stack pointer-relative access to frame wherever possible") |
| 429 | DEFINE_BOOL(turbo_preprocess_ranges, true, |
| 430 | "run pre-register allocation heuristics") |
| 431 | DEFINE_BOOL(turbo_loop_stackcheck, true, "enable stack checks in loops") |
| 432 | DEFINE_STRING(turbo_filter, "~~", "optimization filter for TurboFan compiler") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 433 | DEFINE_BOOL(trace_turbo, false, "trace generated TurboFan IR") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 434 | DEFINE_BOOL(trace_turbo_graph, false, "trace generated TurboFan graphs") |
| 435 | DEFINE_IMPLICATION(trace_turbo_graph, trace_turbo) |
| 436 | DEFINE_STRING(trace_turbo_cfg_file, NULL, |
| 437 | "trace turbo cfg graph (for C1 visualizer) to a given file name") |
| 438 | DEFINE_BOOL(trace_turbo_types, true, "trace TurboFan's types") |
| 439 | DEFINE_BOOL(trace_turbo_scheduler, false, "trace TurboFan's scheduler") |
| 440 | DEFINE_BOOL(trace_turbo_reduction, false, "trace TurboFan's various reducers") |
| 441 | DEFINE_BOOL(trace_turbo_jt, false, "trace TurboFan's jump threading") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 442 | DEFINE_BOOL(trace_turbo_ceq, false, "trace TurboFan's control equivalence") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 443 | DEFINE_BOOL(turbo_asm, true, "enable TurboFan for asm.js code") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 444 | DEFINE_BOOL(turbo_asm_deoptimization, false, |
| 445 | "enable deoptimization in TurboFan for asm.js code") |
| 446 | DEFINE_BOOL(turbo_verify, DEBUG_BOOL, "verify TurboFan graphs at each phase") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 447 | DEFINE_BOOL(turbo_stats, false, "print TurboFan statistics") |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 448 | DEFINE_BOOL(turbo_stats_nvp, false, |
| 449 | "print TurboFan statistics in machine-readable format") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 450 | DEFINE_BOOL(turbo_splitting, true, "split nodes during scheduling in TurboFan") |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 451 | DEFINE_BOOL(turbo_type_feedback, false, |
| 452 | "use typed feedback for representation inference in Turbofan") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 453 | DEFINE_BOOL(turbo_source_positions, false, |
| 454 | "track source code positions when building TurboFan IR") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 455 | DEFINE_IMPLICATION(trace_turbo, turbo_source_positions) |
| 456 | DEFINE_BOOL(function_context_specialization, false, |
| 457 | "enable function context specialization in TurboFan") |
| 458 | DEFINE_BOOL(native_context_specialization, true, |
| 459 | "enable native context specialization in TurboFan") |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 460 | DEFINE_BOOL(turbo_inlining, true, "enable inlining in TurboFan") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 461 | DEFINE_BOOL(trace_turbo_inlining, false, "trace TurboFan inlining") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 462 | DEFINE_BOOL(loop_assignment_analysis, true, "perform loop assignment analysis") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 463 | DEFINE_BOOL(turbo_profiling, false, "enable profiling in TurboFan") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 464 | DEFINE_BOOL(turbo_verify_allocation, DEBUG_BOOL, |
| 465 | "verify register allocation in TurboFan") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 466 | DEFINE_BOOL(turbo_move_optimization, true, "optimize gap moves in TurboFan") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 467 | DEFINE_BOOL(turbo_jt, true, "enable jump threading in TurboFan") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 468 | DEFINE_BOOL(turbo_stress_loop_peeling, false, |
| 469 | "stress loop peeling optimization") |
| 470 | DEFINE_BOOL(turbo_cf_optimization, true, "optimize control flow in TurboFan") |
| 471 | DEFINE_BOOL(turbo_frame_elision, true, "elide frames in TurboFan") |
| 472 | DEFINE_BOOL(turbo_cache_shared_code, true, "cache context-independent code") |
| 473 | DEFINE_BOOL(turbo_preserve_shared_code, false, "keep context-independent code") |
| 474 | DEFINE_BOOL(turbo_escape, false, "enable escape analysis") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 475 | DEFINE_BOOL(turbo_instruction_scheduling, false, |
| 476 | "enable instruction scheduling in TurboFan") |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 477 | DEFINE_BOOL(turbo_stress_instruction_scheduling, false, |
| 478 | "randomly schedule instructions to stress dependency tracking") |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 479 | DEFINE_BOOL(turbo_store_elimination, false, |
| 480 | "enable store-store elimination in TurboFan") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 481 | |
| 482 | // Flags for native WebAssembly. |
| 483 | DEFINE_BOOL(expose_wasm, false, "expose WASM interface to JavaScript") |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 484 | DEFINE_INT(wasm_num_compilation_tasks, 10, |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 485 | "number of parallel compilation tasks for wasm") |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 486 | DEFINE_BOOL(trace_wasm_encoder, false, "trace encoding of wasm code") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 487 | DEFINE_BOOL(trace_wasm_decoder, false, "trace decoding of wasm code") |
| 488 | DEFINE_BOOL(trace_wasm_decode_time, false, "trace decoding time of wasm code") |
| 489 | DEFINE_BOOL(trace_wasm_compiler, false, "trace compiling of wasm code") |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 490 | DEFINE_BOOL(trace_wasm_interpreter, false, "trace interpretation of wasm code") |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 491 | DEFINE_INT(trace_wasm_ast_start, 0, |
| 492 | "start function for WASM AST trace (inclusive)") |
| 493 | DEFINE_INT(trace_wasm_ast_end, 0, "end function for WASM AST trace (exclusive)") |
| 494 | DEFINE_INT(skip_compiling_wasm_funcs, 0, "start compiling at function N") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 495 | DEFINE_BOOL(wasm_break_on_decoder_error, false, |
| 496 | "debug break when wasm decoder encounters an error") |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 497 | DEFINE_BOOL(wasm_loop_assignment_analysis, true, |
| 498 | "perform loop assignment analysis for WASM") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 499 | |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 500 | DEFINE_BOOL(validate_asm, false, "validate asm.js modules before compiling") |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 501 | DEFINE_BOOL(enable_simd_asmjs, false, "enable SIMD.js in asm.js stdlib") |
| 502 | |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 503 | DEFINE_BOOL(dump_wasm_module, false, "dump WASM module bytes") |
| 504 | DEFINE_STRING(dump_wasm_module_path, NULL, "directory to dump wasm modules to") |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 505 | DEFINE_BOOL(print_wasm_code_size, false, |
| 506 | "print the generated code size for each wasm module") |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 507 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 508 | DEFINE_INT(typed_array_max_size_in_heap, 64, |
| 509 | "threshold for in-heap typed array") |
| 510 | |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 511 | DEFINE_BOOL(wasm_jit_prototype, false, |
| 512 | "enable experimental wasm runtime dynamic code generation") |
| 513 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 514 | // Profiler flags. |
| 515 | DEFINE_INT(frame_count, 1, "number of stack frames inspected by the profiler") |
| 516 | // 0x1800 fits in the immediate field of an ARM instruction. |
| 517 | DEFINE_INT(interrupt_budget, 0x1800, |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 518 | "execution budget before interrupt is triggered") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 519 | DEFINE_INT(type_info_threshold, 25, |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 520 | "percentage of ICs that must have type info to allow optimization") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 521 | DEFINE_INT(generic_ic_threshold, 30, |
| 522 | "max percentage of megamorphic/generic ICs to allow optimization") |
| 523 | DEFINE_INT(self_opt_count, 130, "call count before self-optimization") |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 524 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 525 | DEFINE_BOOL(trace_opt_verbose, false, "extra verbose compilation tracing") |
| 526 | DEFINE_IMPLICATION(trace_opt_verbose, trace_opt) |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 527 | |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 528 | // assembler-ia32.cc / assembler-arm.cc / assembler-x64.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 529 | DEFINE_BOOL(debug_code, false, "generate extra code (assertions) for debugging") |
| 530 | DEFINE_BOOL(code_comments, false, "emit comments in code disassembly") |
| 531 | DEFINE_BOOL(enable_sse3, true, "enable use of SSE3 instructions if available") |
| 532 | DEFINE_BOOL(enable_sse4_1, true, |
Ben Murdoch | f87a203 | 2010-10-22 12:50:53 +0100 | [diff] [blame] | 533 | "enable use of SSE4.1 instructions if available") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 534 | DEFINE_BOOL(enable_sahf, true, |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 535 | "enable use of SAHF instruction if available (X64 only)") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 536 | DEFINE_BOOL(enable_avx, true, "enable use of AVX instructions if available") |
| 537 | DEFINE_BOOL(enable_fma3, true, "enable use of FMA3 instructions if available") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 538 | DEFINE_BOOL(enable_bmi1, true, "enable use of BMI1 instructions if available") |
| 539 | DEFINE_BOOL(enable_bmi2, true, "enable use of BMI2 instructions if available") |
| 540 | DEFINE_BOOL(enable_lzcnt, true, "enable use of LZCNT instruction if available") |
| 541 | DEFINE_BOOL(enable_popcnt, true, |
| 542 | "enable use of POPCNT instruction if available") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 543 | DEFINE_BOOL(enable_vfp3, ENABLE_VFP3_DEFAULT, |
| 544 | "enable use of VFP3 instructions if available") |
| 545 | DEFINE_BOOL(enable_armv7, ENABLE_ARMV7_DEFAULT, |
Andrei Popescu | 3100271 | 2010-02-23 13:46:05 +0000 | [diff] [blame] | 546 | "enable use of ARMv7 instructions if available (ARM only)") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 547 | DEFINE_BOOL(enable_armv8, ENABLE_ARMV8_DEFAULT, |
| 548 | "enable use of ARMv8 instructions if available (ARM 32-bit only)") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 549 | DEFINE_BOOL(enable_neon, ENABLE_NEON_DEFAULT, |
| 550 | "enable use of NEON instructions if available (ARM only)") |
| 551 | DEFINE_BOOL(enable_sudiv, true, |
| 552 | "enable use of SDIV and UDIV instructions if available (ARM only)") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 553 | DEFINE_BOOL(enable_movw_movt, false, |
| 554 | "enable loading 32-bit constant by means of movw/movt " |
| 555 | "instruction pairs (ARM only)") |
| 556 | DEFINE_BOOL(enable_unaligned_accesses, true, |
| 557 | "enable unaligned accesses for ARMv7 (ARM only)") |
| 558 | DEFINE_BOOL(enable_32dregs, ENABLE_32DREGS_DEFAULT, |
| 559 | "enable use of d16-d31 registers on ARM - this requires VFP3") |
| 560 | DEFINE_BOOL(enable_vldr_imm, false, |
| 561 | "enable use of constant pools for double immediate (ARM only)") |
| 562 | DEFINE_BOOL(force_long_branches, false, |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 563 | "force all emitted branches to be in long mode (MIPS/PPC only)") |
| 564 | DEFINE_STRING(mcpu, "auto", "enable optimization for specific cpu") |
| 565 | |
| 566 | DEFINE_IMPLICATION(enable_armv8, enable_vfp3) |
| 567 | DEFINE_IMPLICATION(enable_armv8, enable_neon) |
| 568 | DEFINE_IMPLICATION(enable_armv8, enable_32dregs) |
| 569 | DEFINE_IMPLICATION(enable_armv8, enable_sudiv) |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 570 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 571 | // bootstrapper.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 572 | DEFINE_STRING(expose_natives_as, NULL, "expose natives in global object") |
| 573 | DEFINE_STRING(expose_debug_as, NULL, "expose debug in global object") |
| 574 | DEFINE_BOOL(expose_free_buffer, false, "expose freeBuffer extension") |
| 575 | DEFINE_BOOL(expose_gc, false, "expose gc extension") |
| 576 | DEFINE_STRING(expose_gc_as, NULL, |
| 577 | "expose gc extension under the specified name") |
| 578 | DEFINE_IMPLICATION(expose_gc_as, expose_gc) |
| 579 | DEFINE_BOOL(expose_externalize_string, false, |
Kristian Monsen | 9dcf7e2 | 2010-06-28 14:14:28 +0100 | [diff] [blame] | 580 | "expose externalize string extension") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 581 | DEFINE_BOOL(expose_trigger_failure, false, "expose trigger-failure extension") |
| 582 | DEFINE_INT(stack_trace_limit, 10, "number of stack frames to capture") |
| 583 | DEFINE_BOOL(builtins_in_stack_traces, false, |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 584 | "show built-in functions in stack traces") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 585 | DEFINE_BOOL(disable_native_files, false, "disable builtin natives files") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 586 | |
| 587 | // builtins-ia32.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 588 | DEFINE_BOOL(inline_new, true, "use fast inline allocation") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 589 | |
| 590 | // codegen-ia32.cc / codegen-arm.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 591 | DEFINE_BOOL(trace_codegen, false, |
| 592 | "print name of functions for which code is generated") |
| 593 | DEFINE_BOOL(trace, false, "trace function calls") |
| 594 | DEFINE_BOOL(mask_constants_with_cookie, true, |
Teng-Hui Zhu | 3e5fa29 | 2010-11-09 16:16:48 -0800 | [diff] [blame] | 595 | "use random jit cookie to mask large constants") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 596 | |
| 597 | // codegen.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 598 | DEFINE_BOOL(lazy, true, "use lazy compilation") |
| 599 | DEFINE_BOOL(trace_opt, false, "trace lazy optimization") |
| 600 | DEFINE_BOOL(trace_opt_stats, false, "trace lazy optimization statistics") |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 601 | DEFINE_BOOL(trace_file_names, false, |
| 602 | "include file names in trace-opt/trace-deopt output") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 603 | DEFINE_BOOL(opt, true, "use adaptive optimizations") |
| 604 | DEFINE_BOOL(always_opt, false, "always try to optimize functions") |
| 605 | DEFINE_BOOL(always_osr, false, "always try to OSR functions") |
| 606 | DEFINE_BOOL(prepare_always_opt, false, "prepare for turning on always opt") |
| 607 | DEFINE_BOOL(trace_deopt, false, "trace optimize function deoptimization") |
| 608 | DEFINE_BOOL(trace_stub_failures, false, |
| 609 | "trace deoptimization of generated code stubs") |
| 610 | |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 611 | DEFINE_BOOL(serialize_toplevel, true, "enable caching of toplevel scripts") |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 612 | DEFINE_BOOL(serialize_eager, false, "compile eagerly when caching scripts") |
| 613 | DEFINE_BOOL(serialize_age_code, false, "pre age code in the code cache") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 614 | DEFINE_BOOL(trace_serializer, false, "print code serializer trace") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 615 | |
| 616 | // compiler.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 617 | DEFINE_INT(min_preparse_length, 1024, |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 618 | "minimum length for automatic enable preparsing") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 619 | DEFINE_INT(max_opt_count, 10, |
| 620 | "maximum number of optimization attempts before giving up.") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 621 | |
| 622 | // compilation-cache.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 623 | DEFINE_BOOL(compilation_cache, true, "enable compilation cache") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 624 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 625 | DEFINE_BOOL(cache_prototype_transitions, true, "cache prototype transitions") |
| 626 | |
| 627 | // cpu-profiler.cc |
| 628 | DEFINE_INT(cpu_profiler_sampling_interval, 1000, |
| 629 | "CPU profiler sampling interval in microseconds") |
Steve Block | 053d10c | 2011-06-13 19:13:29 +0100 | [diff] [blame] | 630 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 631 | // Array abuse tracing |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 632 | DEFINE_BOOL(trace_js_array_abuse, false, |
| 633 | "trace out-of-bounds accesses to JS arrays") |
| 634 | DEFINE_BOOL(trace_external_array_abuse, false, |
| 635 | "trace out-of-bounds-accesses to external arrays") |
| 636 | DEFINE_BOOL(trace_array_abuse, false, |
| 637 | "trace out-of-bounds accesses to all arrays") |
| 638 | DEFINE_IMPLICATION(trace_array_abuse, trace_js_array_abuse) |
| 639 | DEFINE_IMPLICATION(trace_array_abuse, trace_external_array_abuse) |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 640 | |
| 641 | // debugger |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 642 | DEFINE_BOOL(trace_debug_json, false, "trace debugging JSON request/response") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 643 | DEFINE_BOOL(enable_liveedit, true, "enable liveedit experimental feature") |
| 644 | DEFINE_BOOL(hard_abort, true, "abort by crashing") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 645 | |
Steve Block | 1e0659c | 2011-05-24 12:43:12 +0100 | [diff] [blame] | 646 | // execution.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 647 | DEFINE_INT(stack_size, V8_DEFAULT_STACK_SIZE_KB, |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 648 | "default size of stack region v8 is allowed to use (in kBytes)") |
Steve Block | 1e0659c | 2011-05-24 12:43:12 +0100 | [diff] [blame] | 649 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 650 | // frames.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 651 | DEFINE_INT(max_stack_trace_source_length, 300, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 652 | "maximum length of function source code printed in a stack trace.") |
| 653 | |
Kristian Monsen | 0d5e116 | 2010-09-30 15:31:59 +0100 | [diff] [blame] | 654 | // full-codegen.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 655 | DEFINE_BOOL(always_inline_smi_code, false, |
Kristian Monsen | 0d5e116 | 2010-09-30 15:31:59 +0100 | [diff] [blame] | 656 | "always inline smi code in non-opt code") |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 657 | DEFINE_BOOL(verify_operand_stack_depth, false, |
| 658 | "emit debug code that verifies the static tracking of the operand " |
| 659 | "stack depth") |
Kristian Monsen | 0d5e116 | 2010-09-30 15:31:59 +0100 | [diff] [blame] | 660 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 661 | // heap.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 662 | DEFINE_INT(min_semi_space_size, 0, |
| 663 | "min size of a semi-space (in MBytes), the new space consists of two" |
| 664 | "semi-spaces") |
| 665 | DEFINE_INT(max_semi_space_size, 0, |
| 666 | "max size of a semi-space (in MBytes), the new space consists of two" |
| 667 | "semi-spaces") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 668 | DEFINE_INT(semi_space_growth_factor, 2, "factor by which to grow the new space") |
| 669 | DEFINE_BOOL(experimental_new_space_growth_heuristic, false, |
| 670 | "Grow the new space based on the percentage of survivors instead " |
| 671 | "of their absolute value.") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 672 | DEFINE_INT(max_old_space_size, 0, "max size of the old space (in Mbytes)") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 673 | DEFINE_INT(initial_old_space_size, 0, "initial old space size (in Mbytes)") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 674 | DEFINE_INT(max_executable_size, 0, "max size of executable memory (in Mbytes)") |
| 675 | DEFINE_BOOL(gc_global, false, "always perform global GCs") |
| 676 | DEFINE_INT(gc_interval, -1, "garbage collect after <n> allocations") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 677 | DEFINE_INT(retain_maps_for_n_gc, 2, |
| 678 | "keeps maps alive for <n> old space garbage collections") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 679 | DEFINE_BOOL(trace_gc, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 680 | "print one trace line following each garbage collection") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 681 | DEFINE_BOOL(trace_gc_nvp, false, |
Leon Clarke | f7060e2 | 2010-06-03 12:02:55 +0100 | [diff] [blame] | 682 | "print one detailed trace line in name=value format " |
| 683 | "after each garbage collection") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 684 | DEFINE_BOOL(trace_gc_ignore_scavenger, false, |
| 685 | "do not print trace line after scavenger collection") |
| 686 | DEFINE_BOOL(trace_idle_notification, false, |
| 687 | "print one trace line following each idle notification") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 688 | DEFINE_BOOL(trace_idle_notification_verbose, false, |
| 689 | "prints the heap state used by the idle notification") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 690 | DEFINE_BOOL(print_cumulative_gc_stat, false, |
Leon Clarke | f7060e2 | 2010-06-03 12:02:55 +0100 | [diff] [blame] | 691 | "print cumulative GC statistics in name=value format on exit") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 692 | DEFINE_BOOL(print_max_heap_committed, false, |
| 693 | "print statistics of the maximum memory committed for the heap " |
| 694 | "in name=value format on exit") |
| 695 | DEFINE_BOOL(trace_gc_verbose, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 696 | "print more details following each garbage collection") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 697 | DEFINE_INT(trace_allocation_stack_interval, -1, |
| 698 | "print stack trace after <n> free-list allocations") |
| 699 | DEFINE_BOOL(trace_fragmentation, false, "report fragmentation for old space") |
| 700 | DEFINE_BOOL(trace_fragmentation_verbose, false, |
| 701 | "report fragmentation for old space (detailed)") |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 702 | DEFINE_BOOL(trace_evacuation, false, "report evacuation statistics") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 703 | DEFINE_BOOL(trace_mutator_utilization, false, |
| 704 | "print mutator utilization, allocation speed, gc speed") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 705 | DEFINE_BOOL(weak_embedded_maps_in_optimized_code, true, |
| 706 | "make maps embedded in optimized code weak") |
| 707 | DEFINE_BOOL(weak_embedded_objects_in_optimized_code, true, |
| 708 | "make objects embedded in optimized code weak") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 709 | DEFINE_BOOL(flush_code, true, "flush code that we expect not to use again") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 710 | DEFINE_BOOL(trace_code_flushing, false, "trace code flushing progress") |
| 711 | DEFINE_BOOL(age_code, true, |
| 712 | "track un-executed functions to age code and flush only " |
| 713 | "old code (required for code flushing)") |
| 714 | DEFINE_BOOL(incremental_marking, true, "use incremental marking") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 715 | DEFINE_INT(min_progress_during_incremental_marking_finalization, 32, |
| 716 | "keep finalizing incremental marking as long as we discover at " |
| 717 | "least this many unmarked objects") |
| 718 | DEFINE_INT(max_incremental_marking_finalization_rounds, 3, |
| 719 | "at most try this many times to finalize incremental marking") |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 720 | DEFINE_BOOL(black_allocation, false, "use black allocation") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 721 | DEFINE_BOOL(concurrent_sweeping, true, "use concurrent sweeping") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 722 | DEFINE_BOOL(parallel_compaction, true, "use parallel compaction") |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 723 | DEFINE_BOOL(parallel_pointer_update, true, |
| 724 | "use parallel pointer update during compaction") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 725 | DEFINE_BOOL(trace_incremental_marking, false, |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 726 | "trace progress of the incremental marking") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 727 | DEFINE_BOOL(track_gc_object_stats, false, |
| 728 | "track object counts and memory usage") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 729 | DEFINE_BOOL(trace_gc_object_stats, false, |
| 730 | "trace object counts and memory usage") |
| 731 | DEFINE_IMPLICATION(trace_gc_object_stats, track_gc_object_stats) |
| 732 | DEFINE_BOOL(track_detached_contexts, true, |
| 733 | "track native contexts that are expected to be garbage collected") |
| 734 | DEFINE_BOOL(trace_detached_contexts, false, |
| 735 | "trace native contexts that are expected to be garbage collected") |
| 736 | DEFINE_IMPLICATION(trace_detached_contexts, track_detached_contexts) |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 737 | #ifdef VERIFY_HEAP |
| 738 | DEFINE_BOOL(verify_heap, false, "verify heap pointers before and after GC") |
Ben Murdoch | e0cee9b | 2011-05-25 10:26:03 +0100 | [diff] [blame] | 739 | #endif |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 740 | DEFINE_BOOL(move_object_start, true, "enable moving of object starts") |
| 741 | DEFINE_BOOL(memory_reducer, true, "use memory reducer") |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 742 | DEFINE_BOOL(scavenge_reclaim_unmodified_objects, true, |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 743 | "remove unmodified and unreferenced objects") |
| 744 | DEFINE_INT(heap_growing_percent, 0, |
| 745 | "specifies heap growing factor as (1 + heap_growing_percent/100)") |
| 746 | |
| 747 | // counters.cc |
| 748 | DEFINE_INT(histogram_interval, 600000, |
| 749 | "time interval in ms for aggregating memory histograms") |
Ben Murdoch | e0cee9b | 2011-05-25 10:26:03 +0100 | [diff] [blame] | 750 | |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 751 | // global-handles.cc |
| 752 | DEFINE_BOOL(trace_object_groups, false, |
| 753 | "print object groups detected during each garbage collection") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 754 | |
| 755 | // heap-snapshot-generator.cc |
| 756 | DEFINE_BOOL(heap_profiler_trace_objects, false, |
| 757 | "Dump heap object allocations/movements/size_updates") |
| 758 | |
| 759 | |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 760 | // sampling-heap-profiler.cc |
| 761 | DEFINE_BOOL(sampling_heap_profiler_suppress_randomness, false, |
| 762 | "Use constant sample intervals to eliminate test flakiness") |
| 763 | |
| 764 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 765 | // v8.cc |
| 766 | DEFINE_BOOL(use_idle_notification, true, |
| 767 | "Use idle notification to reduce memory footprint.") |
| 768 | // ic.cc |
| 769 | DEFINE_BOOL(use_ic, true, "use inline caching") |
| 770 | DEFINE_BOOL(trace_ic, false, "trace inline cache state transitions") |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 771 | DEFINE_BOOL(tf_load_ic_stub, true, "use TF LoadIC stub") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 772 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 773 | // macro-assembler-ia32.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 774 | DEFINE_BOOL(native_code_counters, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 775 | "generate extra code for manipulating stats counters") |
| 776 | |
| 777 | // mark-compact.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 778 | DEFINE_BOOL(always_compact, false, "Perform compaction on every full GC") |
| 779 | DEFINE_BOOL(never_compact, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 780 | "Never perform compaction on full GC - testing only") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 781 | DEFINE_BOOL(compact_code_space, true, "Compact code space on full collections") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 782 | DEFINE_BOOL(cleanup_code_caches_at_gc, true, |
Ben Murdoch | 257744e | 2011-11-30 15:57:28 +0000 | [diff] [blame] | 783 | "Flush inline caches prior to mark compact collection and " |
| 784 | "flush code caches in maps during mark compact cycle.") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 785 | DEFINE_BOOL(use_marking_progress_bar, true, |
| 786 | "Use a progress bar to scan large objects in increments when " |
| 787 | "incremental marking is active.") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 788 | DEFINE_BOOL(zap_code_space, DEBUG_BOOL, |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 789 | "Zap free memory in code space with 0xCC while sweeping.") |
| 790 | DEFINE_INT(random_seed, 0, |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 791 | "Default seed for initializing random generator " |
| 792 | "(0, the default, means to use system random).") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 793 | |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 794 | // objects.cc |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 795 | DEFINE_BOOL(trace_weak_arrays, false, "Trace WeakFixedArray usage") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 796 | DEFINE_BOOL(trace_prototype_users, false, |
| 797 | "Trace updates to prototype user tracking") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 798 | DEFINE_BOOL(use_verbose_printer, true, "allows verbose printing") |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 799 | DEFINE_BOOL(trace_for_in_enumerate, false, "Trace for-in enumerate slow-paths") |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 800 | #if TRACE_MAPS |
| 801 | DEFINE_BOOL(trace_maps, false, "trace map creation") |
| 802 | #endif |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 803 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 804 | // parser.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 805 | DEFINE_BOOL(allow_natives_syntax, false, "allow natives syntax") |
| 806 | DEFINE_BOOL(trace_parse, false, "trace parsing and preparsing") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 807 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 808 | // simulator-arm.cc, simulator-arm64.cc and simulator-mips.cc |
| 809 | DEFINE_BOOL(trace_sim, false, "Trace simulator execution") |
| 810 | DEFINE_BOOL(debug_sim, false, "Enable debugging the simulator") |
| 811 | DEFINE_BOOL(check_icache, false, |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 812 | "Check icache flushes in ARM and MIPS simulator") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 813 | DEFINE_INT(stop_sim_at, 0, "Simulator stop after x number of instructions") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 814 | #if defined(V8_TARGET_ARCH_ARM64) || defined(V8_TARGET_ARCH_MIPS64) || \ |
| 815 | defined(V8_TARGET_ARCH_PPC64) |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 816 | DEFINE_INT(sim_stack_alignment, 16, |
| 817 | "Stack alignment in bytes in simulator. This must be a power of two " |
| 818 | "and it must be at least 16. 16 is default.") |
| 819 | #else |
| 820 | DEFINE_INT(sim_stack_alignment, 8, |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 821 | "Stack alingment in bytes in simulator (4 or 8, 8 is default)") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 822 | #endif |
| 823 | DEFINE_INT(sim_stack_size, 2 * MB / KB, |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 824 | "Stack size of the ARM64, MIPS64 and PPC64 simulator " |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 825 | "in kBytes (default is 2 MB)") |
| 826 | DEFINE_BOOL(log_regs_modified, true, |
| 827 | "When logging register values, only print modified registers.") |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 828 | DEFINE_BOOL(log_colour, ENABLE_LOG_COLOUR, |
| 829 | "When logging, try to use coloured output.") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 830 | DEFINE_BOOL(ignore_asm_unimplemented_break, false, |
| 831 | "Don't break for ASM_UNIMPLEMENTED_BREAK macros.") |
| 832 | DEFINE_BOOL(trace_sim_messages, false, |
| 833 | "Trace simulator debug messages. Implied by --trace-sim.") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 834 | |
Ben Murdoch | 257744e | 2011-11-30 15:57:28 +0000 | [diff] [blame] | 835 | // isolate.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 836 | DEFINE_BOOL(stack_trace_on_illegal, false, |
| 837 | "print stack trace when an illegal exception is thrown") |
| 838 | DEFINE_BOOL(abort_on_uncaught_exception, false, |
| 839 | "abort program (dump core) when an uncaught exception is thrown") |
| 840 | DEFINE_BOOL(randomize_hashes, true, |
Ben Murdoch | c7cc028 | 2012-03-05 14:35:55 +0000 | [diff] [blame] | 841 | "randomize hashes to avoid predictable hash collisions " |
| 842 | "(with snapshots this option cannot override the baked-in seed)") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 843 | DEFINE_INT(hash_seed, 0, |
Ben Murdoch | c7cc028 | 2012-03-05 14:35:55 +0000 | [diff] [blame] | 844 | "Fixed seed to use to hash property keys (0 means random)" |
| 845 | "(with snapshots this option cannot override the baked-in seed)") |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 846 | DEFINE_BOOL(trace_rail, false, "trace RAIL mode") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 847 | |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 848 | // runtime.cc |
| 849 | DEFINE_BOOL(runtime_call_stats, false, "report runtime call counts and times") |
| 850 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 851 | // snapshot-common.cc |
| 852 | DEFINE_BOOL(profile_deserialization, false, |
| 853 | "Print the time it takes to deserialize the snapshot.") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 854 | DEFINE_BOOL(serialization_statistics, false, |
| 855 | "Collect statistics on serialized objects.") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 856 | |
| 857 | // Regexp |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 858 | DEFINE_BOOL(regexp_optimization, true, "generate optimized regexp code") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 859 | |
| 860 | // Testing flags test/cctest/test-{flags,api,serialization}.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 861 | DEFINE_BOOL(testing_bool_flag, true, "testing_bool_flag") |
| 862 | DEFINE_MAYBE_BOOL(testing_maybe_bool_flag, "testing_maybe_bool_flag") |
| 863 | DEFINE_INT(testing_int_flag, 13, "testing_int_flag") |
| 864 | DEFINE_FLOAT(testing_float_flag, 2.5, "float-flag") |
| 865 | DEFINE_STRING(testing_string_flag, "Hello, world!", "string-flag") |
| 866 | DEFINE_INT(testing_prng_seed, 42, "Seed used for threading test randomness") |
| 867 | #ifdef _WIN32 |
| 868 | DEFINE_STRING(testing_serialization_file, "C:\\Windows\\Temp\\serdes", |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 869 | "file in which to testing_serialize heap") |
| 870 | #else |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 871 | DEFINE_STRING(testing_serialization_file, "/tmp/serdes", |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 872 | "file in which to serialize heap") |
| 873 | #endif |
| 874 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 875 | // mksnapshot.cc |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 876 | DEFINE_STRING(startup_src, NULL, |
| 877 | "Write V8 startup as C++ src. (mksnapshot only)") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 878 | DEFINE_STRING(startup_blob, NULL, |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 879 | "Write V8 startup blob file. (mksnapshot only)") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 880 | |
| 881 | // code-stubs-hydrogen.cc |
| 882 | DEFINE_BOOL(profile_hydrogen_code_stub_compilation, false, |
| 883 | "Print the time it takes to lazily compile hydrogen code stubs.") |
| 884 | |
| 885 | DEFINE_BOOL(predictable, false, "enable predictable mode") |
| 886 | DEFINE_NEG_IMPLICATION(predictable, concurrent_recompilation) |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 887 | DEFINE_NEG_IMPLICATION(predictable, concurrent_sweeping) |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 888 | DEFINE_NEG_IMPLICATION(predictable, parallel_compaction) |
| 889 | DEFINE_NEG_IMPLICATION(predictable, memory_reducer) |
Ben Murdoch | b8e0da2 | 2011-05-16 14:20:40 +0100 | [diff] [blame] | 890 | |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 891 | // mark-compact.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 892 | DEFINE_BOOL(force_marking_deque_overflows, false, |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 893 | "force overflows of marking deque by reducing it's size " |
| 894 | "to 64 words") |
| 895 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 896 | DEFINE_BOOL(stress_compaction, false, |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 897 | "stress the GC compactor to flush out bugs (implies " |
| 898 | "--force_marking_deque_overflows)") |
| 899 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 900 | DEFINE_BOOL(manual_evacuation_candidates_selection, false, |
| 901 | "Test mode only flag. It allows an unit test to select evacuation " |
| 902 | "candidates pages (requires --stress_compaction).") |
| 903 | |
| 904 | // api.cc |
| 905 | DEFINE_INT(external_allocation_limit_incremental_time, 1, |
| 906 | "Time spent in incremental marking steps (in ms) once the external " |
| 907 | "allocation limit is reached") |
| 908 | |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 909 | DEFINE_BOOL(disable_old_api_accessors, false, |
| 910 | "Disable old-style API accessors whose setters trigger through the " |
| 911 | "prototype chain") |
| 912 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 913 | // |
| 914 | // Dev shell flags |
| 915 | // |
| 916 | |
| 917 | DEFINE_BOOL(help, false, "Print usage message, including flags, on console") |
| 918 | DEFINE_BOOL(dump_counters, false, "Dump counters on exit") |
| 919 | |
| 920 | DEFINE_STRING(map_counters, "", "Map counters to a file") |
| 921 | DEFINE_ARGS(js_arguments, |
| 922 | "Pass all remaining arguments to the script. Alias for \"--\".") |
| 923 | |
| 924 | // |
| 925 | // GDB JIT integration flags. |
| 926 | // |
| 927 | #undef FLAG |
| 928 | #ifdef ENABLE_GDB_JIT_INTERFACE |
| 929 | #define FLAG FLAG_FULL |
| 930 | #else |
| 931 | #define FLAG FLAG_READONLY |
| 932 | #endif |
| 933 | |
| 934 | DEFINE_BOOL(gdbjit, false, "enable GDBJIT interface") |
| 935 | DEFINE_BOOL(gdbjit_full, false, "enable GDBJIT interface for all code objects") |
| 936 | DEFINE_BOOL(gdbjit_dump, false, "dump elf objects with debug info to disk") |
| 937 | DEFINE_STRING(gdbjit_dump_filter, "", |
| 938 | "dump only objects containing this substring") |
| 939 | |
| 940 | #ifdef ENABLE_GDB_JIT_INTERFACE |
| 941 | DEFINE_IMPLICATION(gdbjit_full, gdbjit) |
| 942 | DEFINE_IMPLICATION(gdbjit_dump, gdbjit) |
| 943 | #endif |
| 944 | DEFINE_NEG_IMPLICATION(gdbjit, compact_code_space) |
| 945 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 946 | // |
| 947 | // Debug only flags |
| 948 | // |
| 949 | #undef FLAG |
| 950 | #ifdef DEBUG |
| 951 | #define FLAG FLAG_FULL |
| 952 | #else |
| 953 | #define FLAG FLAG_READONLY |
| 954 | #endif |
| 955 | |
| 956 | // checks.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 957 | #ifdef ENABLE_SLOW_DCHECKS |
| 958 | DEFINE_BOOL(enable_slow_asserts, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 959 | "enable asserts that are slow to execute") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 960 | #endif |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 961 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 962 | // codegen-ia32.cc / codegen-arm.cc / macro-assembler-*.cc |
| 963 | DEFINE_BOOL(print_source, false, "pretty print source code") |
| 964 | DEFINE_BOOL(print_builtin_source, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 965 | "pretty print source code for builtins") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 966 | DEFINE_BOOL(print_ast, false, "print source AST") |
| 967 | DEFINE_BOOL(print_builtin_ast, false, "print source AST for builtins") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 968 | DEFINE_BOOL(trap_on_abort, false, "replace aborts by breakpoints") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 969 | |
| 970 | // compiler.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 971 | DEFINE_BOOL(print_builtin_scopes, false, "print scopes for builtins") |
| 972 | DEFINE_BOOL(print_scopes, false, "print scopes") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 973 | |
| 974 | // contexts.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 975 | DEFINE_BOOL(trace_contexts, false, "trace contexts operations") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 976 | |
| 977 | // heap.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 978 | DEFINE_BOOL(gc_verbose, false, "print stuff during garbage collection") |
| 979 | DEFINE_BOOL(heap_stats, false, "report heap statistics before and after GC") |
| 980 | DEFINE_BOOL(code_stats, false, "report code statistics after GC") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 981 | DEFINE_BOOL(print_handles, false, "report handles after GC") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 982 | DEFINE_BOOL(check_handle_count, false, |
| 983 | "Check that there are not too many handles at GC") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 984 | DEFINE_BOOL(print_global_handles, false, "report global handles after GC") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 985 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 986 | // TurboFan debug-only flags. |
| 987 | DEFINE_BOOL(print_turbo_replay, false, |
| 988 | "print C++ code to recreate TurboFan graphs") |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 989 | DEFINE_BOOL(trace_turbo_escape, false, "enable tracing in escape analysis") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 990 | |
| 991 | // objects.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 992 | DEFINE_BOOL(trace_normalization, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 993 | "prints when objects are turned into dictionaries.") |
| 994 | |
| 995 | // runtime.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 996 | DEFINE_BOOL(trace_lazy, false, "trace lazy compilation") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 997 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 998 | // spaces.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 999 | DEFINE_BOOL(collect_heap_spill_statistics, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1000 | "report heap spill statistics along with heap_stats " |
| 1001 | "(requires heap_stats)") |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 1002 | DEFINE_BOOL(trace_live_bytes, false, |
| 1003 | "trace incrementing and resetting of live bytes") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1004 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1005 | DEFINE_BOOL(trace_isolates, false, "trace isolate state changes") |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 1006 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1007 | // Regexp |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1008 | DEFINE_BOOL(regexp_possessive_quantifier, false, |
Leon Clarke | e46be81 | 2010-01-19 14:06:41 +0000 | [diff] [blame] | 1009 | "enable possessive quantifier syntax for testing") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1010 | DEFINE_BOOL(trace_regexp_bytecodes, false, "trace regexp bytecode execution") |
| 1011 | DEFINE_BOOL(trace_regexp_assembler, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1012 | "trace regexp macro assembler calls.") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 1013 | DEFINE_BOOL(trace_regexp_parser, false, "trace regexp parsing") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1014 | |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 1015 | // Debugger |
| 1016 | DEFINE_BOOL(print_break_location, false, "print source location on debug break") |
| 1017 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1018 | // |
Ben Murdoch | 3fb3ca8 | 2011-12-02 17:19:32 +0000 | [diff] [blame] | 1019 | // Logging and profiling flags |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1020 | // |
| 1021 | #undef FLAG |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1022 | #define FLAG FLAG_FULL |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1023 | |
| 1024 | // log.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1025 | DEFINE_BOOL(log, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1026 | "Minimal logging (no API, code, GC, suspect, or handles samples).") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1027 | DEFINE_BOOL(log_all, false, "Log all events to the log file.") |
| 1028 | DEFINE_BOOL(log_api, false, "Log API events to the log file.") |
| 1029 | DEFINE_BOOL(log_code, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1030 | "Log code events to the log file without profiling.") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1031 | DEFINE_BOOL(log_gc, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1032 | "Log heap samples on garbage collection for the hp2ps tool.") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1033 | DEFINE_BOOL(log_handles, false, "Log global handle events.") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1034 | DEFINE_BOOL(log_suspect, false, "Log suspect operations.") |
| 1035 | DEFINE_BOOL(prof, false, |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1036 | "Log statistical profiling information (implies --log-code).") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 1037 | DEFINE_BOOL(prof_cpp, false, "Like --prof, but ignore generated code.") |
| 1038 | DEFINE_IMPLICATION(prof, prof_cpp) |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1039 | DEFINE_BOOL(prof_browser_mode, true, |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 1040 | "Used with --prof, turns on browser-compatible mode for profiling.") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1041 | DEFINE_BOOL(log_regexp, false, "Log regular expression execution.") |
| 1042 | DEFINE_STRING(logfile, "v8.log", "Specify the name of the log file.") |
| 1043 | DEFINE_BOOL(logfile_per_isolate, true, "Separate log files for each isolate.") |
| 1044 | DEFINE_BOOL(ll_prof, false, "Enable low-level linux profiler.") |
| 1045 | DEFINE_BOOL(perf_basic_prof, false, |
| 1046 | "Enable perf linux profiler (basic support).") |
| 1047 | DEFINE_NEG_IMPLICATION(perf_basic_prof, compact_code_space) |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 1048 | DEFINE_BOOL(perf_basic_prof_only_functions, false, |
| 1049 | "Only report function code ranges to perf (i.e. no stubs).") |
| 1050 | DEFINE_IMPLICATION(perf_basic_prof_only_functions, perf_basic_prof) |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 1051 | DEFINE_BOOL(perf_prof, false, |
| 1052 | "Enable perf linux profiler (experimental annotate support).") |
| 1053 | DEFINE_NEG_IMPLICATION(perf_prof, compact_code_space) |
| 1054 | DEFINE_BOOL(perf_prof_debug_info, false, |
| 1055 | "Enable debug info for perf linux profiler (experimental).") |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 1056 | DEFINE_BOOL(perf_prof_unwinding_info, false, |
| 1057 | "Enable unwinding info for perf linux profiler (experimental).") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1058 | DEFINE_STRING(gc_fake_mmap, "/tmp/__v8_gc__", |
| 1059 | "Specify the name of the file for fake gc mmap used in ll_prof") |
| 1060 | DEFINE_BOOL(log_internal_timer_events, false, "Time internal events.") |
| 1061 | DEFINE_BOOL(log_timer_events, false, |
| 1062 | "Time events including external callbacks.") |
| 1063 | DEFINE_IMPLICATION(log_timer_events, log_internal_timer_events) |
| 1064 | DEFINE_IMPLICATION(log_internal_timer_events, prof) |
| 1065 | DEFINE_BOOL(log_instruction_stats, false, "Log AArch64 instruction statistics.") |
| 1066 | DEFINE_STRING(log_instruction_file, "arm64_inst.csv", |
| 1067 | "AArch64 instruction statistics log file.") |
| 1068 | DEFINE_INT(log_instruction_period, 1 << 22, |
| 1069 | "AArch64 instruction statistics logging period.") |
| 1070 | |
| 1071 | DEFINE_BOOL(redirect_code_traces, false, |
| 1072 | "output deopt information and disassembly into file " |
| 1073 | "code-<pid>-<isolate id>.asm") |
| 1074 | DEFINE_STRING(redirect_code_traces_to, NULL, |
| 1075 | "output deopt information and disassembly into the given file") |
| 1076 | |
| 1077 | DEFINE_BOOL(hydrogen_track_positions, false, |
| 1078 | "track source code positions when building IR") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1079 | |
| 1080 | // |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1081 | // Disassembler only flags |
| 1082 | // |
| 1083 | #undef FLAG |
| 1084 | #ifdef ENABLE_DISASSEMBLER |
| 1085 | #define FLAG FLAG_FULL |
| 1086 | #else |
| 1087 | #define FLAG FLAG_READONLY |
| 1088 | #endif |
| 1089 | |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 1090 | // elements.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1091 | DEFINE_BOOL(trace_elements_transitions, false, "trace elements transitions") |
| 1092 | |
| 1093 | DEFINE_BOOL(trace_creation_allocation_sites, false, |
| 1094 | "trace the creation of allocation sites") |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 1095 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1096 | // code-stubs.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1097 | DEFINE_BOOL(print_code_stubs, false, "print code stubs") |
| 1098 | DEFINE_BOOL(test_secondary_stub_cache, false, |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 1099 | "test secondary stub cache by disabling the primary one") |
| 1100 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1101 | DEFINE_BOOL(test_primary_stub_cache, false, |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 1102 | "test primary stub cache by disabling the secondary one") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1103 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1104 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1105 | // codegen-ia32.cc / codegen-arm.cc |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1106 | DEFINE_BOOL(print_code, false, "print generated code") |
| 1107 | DEFINE_BOOL(print_opt_code, false, "print optimized code") |
| 1108 | DEFINE_BOOL(print_unopt_code, false, |
| 1109 | "print unoptimized code before " |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 1110 | "printing optimized code based on it") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1111 | DEFINE_BOOL(print_code_verbose, false, "print more information for code") |
| 1112 | DEFINE_BOOL(print_builtin_code, false, "print generated code for builtins") |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1113 | |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 1114 | #ifdef ENABLE_DISASSEMBLER |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1115 | DEFINE_BOOL(sodium, false, |
| 1116 | "print generated code output suitable for use with " |
| 1117 | "the Sodium code viewer") |
| 1118 | |
| 1119 | DEFINE_IMPLICATION(sodium, print_code_stubs) |
| 1120 | DEFINE_IMPLICATION(sodium, print_code) |
| 1121 | DEFINE_IMPLICATION(sodium, print_opt_code) |
| 1122 | DEFINE_IMPLICATION(sodium, hydrogen_track_positions) |
| 1123 | DEFINE_IMPLICATION(sodium, code_comments) |
| 1124 | |
| 1125 | DEFINE_BOOL(print_all_code, false, "enable all flags related to printing code") |
| 1126 | DEFINE_IMPLICATION(print_all_code, print_code) |
| 1127 | DEFINE_IMPLICATION(print_all_code, print_opt_code) |
| 1128 | DEFINE_IMPLICATION(print_all_code, print_unopt_code) |
| 1129 | DEFINE_IMPLICATION(print_all_code, print_code_verbose) |
| 1130 | DEFINE_IMPLICATION(print_all_code, print_builtin_code) |
| 1131 | DEFINE_IMPLICATION(print_all_code, print_code_stubs) |
| 1132 | DEFINE_IMPLICATION(print_all_code, code_comments) |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 1133 | #ifdef DEBUG |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1134 | DEFINE_IMPLICATION(print_all_code, trace_codegen) |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 1135 | #endif |
| 1136 | #endif |
| 1137 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1138 | |
| 1139 | // |
| 1140 | // VERIFY_PREDICTABLE related flags |
| 1141 | // |
| 1142 | #undef FLAG |
| 1143 | |
| 1144 | #ifdef VERIFY_PREDICTABLE |
| 1145 | #define FLAG FLAG_FULL |
| 1146 | #else |
| 1147 | #define FLAG FLAG_READONLY |
| 1148 | #endif |
| 1149 | |
| 1150 | DEFINE_BOOL(verify_predictable, false, |
| 1151 | "this mode is used for checking that V8 behaves predictably") |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 1152 | DEFINE_INT(dump_allocations_digest_at_alloc, -1, |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1153 | "dump allocations digest each n-th allocation") |
| 1154 | |
| 1155 | |
| 1156 | // |
| 1157 | // Read-only flags |
| 1158 | // |
| 1159 | #undef FLAG |
| 1160 | #define FLAG FLAG_READONLY |
| 1161 | |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 1162 | // assembler.h |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 1163 | DEFINE_BOOL(enable_embedded_constant_pool, V8_EMBEDDED_CONSTANT_POOL, |
| 1164 | "enable use of embedded constant pools (ARM/PPC only)") |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1165 | |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 1166 | DEFINE_BOOL(unbox_double_fields, V8_DOUBLE_FIELDS_UNBOXING, |
| 1167 | "enable in-object double fields unboxing (64-bit only)") |
| 1168 | DEFINE_IMPLICATION(unbox_double_fields, track_double_fields) |
| 1169 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 1170 | DEFINE_BOOL(global_var_shortcuts, false, "use ic-less global loads and stores") |
| 1171 | |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 1172 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1173 | // Cleanup... |
| 1174 | #undef FLAG_FULL |
| 1175 | #undef FLAG_READONLY |
| 1176 | #undef FLAG |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1177 | #undef FLAG_ALIAS |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1178 | |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1179 | #undef DEFINE_BOOL |
| 1180 | #undef DEFINE_MAYBE_BOOL |
| 1181 | #undef DEFINE_INT |
| 1182 | #undef DEFINE_STRING |
| 1183 | #undef DEFINE_FLOAT |
| 1184 | #undef DEFINE_ARGS |
| 1185 | #undef DEFINE_IMPLICATION |
| 1186 | #undef DEFINE_NEG_IMPLICATION |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 1187 | #undef DEFINE_NEG_VALUE_IMPLICATION |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1188 | #undef DEFINE_VALUE_IMPLICATION |
| 1189 | #undef DEFINE_ALIAS_BOOL |
| 1190 | #undef DEFINE_ALIAS_INT |
| 1191 | #undef DEFINE_ALIAS_STRING |
| 1192 | #undef DEFINE_ALIAS_FLOAT |
| 1193 | #undef DEFINE_ALIAS_ARGS |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 1194 | |
| 1195 | #undef FLAG_MODE_DECLARE |
| 1196 | #undef FLAG_MODE_DEFINE |
| 1197 | #undef FLAG_MODE_DEFINE_DEFAULTS |
| 1198 | #undef FLAG_MODE_META |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 1199 | #undef FLAG_MODE_DEFINE_IMPLICATIONS |
Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame] | 1200 | |
| 1201 | #undef COMMA |