1 // Copyright 2012 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 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 // 13 // PRESUBMIT_INTENTIONALLY_MISSING_INCLUDE_GUARD 14 15 #define DEFINE_IMPLICATION(whenflag, thenflag) \ 16 DEFINE_VALUE_IMPLICATION(whenflag, thenflag, true) 17 18 #define DEFINE_NEG_IMPLICATION(whenflag, thenflag) \ 19 DEFINE_VALUE_IMPLICATION(whenflag, thenflag, false) 20 21 #define DEFINE_NEG_NEG_IMPLICATION(whenflag, thenflag) \ 22 DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, false) 23 24 // We want to declare the names of the variables for the header file. Normally 25 // this will just be an extern declaration, but for a readonly flag we let the 26 // compiler make better optimizations by giving it the value. 27 #if defined(FLAG_MODE_DECLARE) 28 #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ 29 V8_EXPORT_PRIVATE extern ctype FLAG_##nam; 30 #define FLAG_READONLY(ftype, ctype, nam, def, cmt) \ 31 static constexpr ctype FLAG_##nam = def; 32 33 // We want to supply the actual storage and value for the flag variable in the 34 // .cc file. We only do this for writable flags. 35 #elif defined(FLAG_MODE_DEFINE) 36 #ifdef USING_V8_SHARED 37 #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ 38 V8_EXPORT_PRIVATE extern ctype FLAG_##nam; 39 #else 40 #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ 41 V8_EXPORT_PRIVATE ctype FLAG_##nam = def; 42 #endif 43 44 // We need to define all of our default values so that the Flag structure can 45 // access them by pointer. These are just used internally inside of one .cc, 46 // for MODE_META, so there is no impact on the flags interface. 47 #elif defined(FLAG_MODE_DEFINE_DEFAULTS) 48 #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ 49 static constexpr ctype FLAGDEFAULT_##nam = def; 50 51 // We want to write entries into our meta data table, for internal parsing and 52 // printing / etc in the flag parser code. We only do this for writable flags. 53 #elif defined(FLAG_MODE_META) 54 #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ 55 {Flag::TYPE_##ftype, #nam, &FLAG_##nam, &FLAGDEFAULT_##nam, cmt, false}, 56 #define FLAG_ALIAS(ftype, ctype, alias, nam) \ 57 {Flag::TYPE_##ftype, #alias, &FLAG_##nam, &FLAGDEFAULT_##nam, \ 58 "alias for --" #nam, false}, 59 60 // We produce the code to set flags when it is implied by another flag. 61 #elif defined(FLAG_MODE_DEFINE_IMPLICATIONS) 62 #define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value) \ 63 if (FLAG_##whenflag) FLAG_##thenflag = value; 64 65 #define DEFINE_GENERIC_IMPLICATION(whenflag, statement) \ 66 if (FLAG_##whenflag) statement; 67 68 #define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value) \ 69 if (!FLAG_##whenflag) FLAG_##thenflag = value; 70 71 // We apply a generic macro to the flags. 72 #elif defined(FLAG_MODE_APPLY) 73 74 #define FLAG_FULL FLAG_MODE_APPLY 75 76 #else 77 #error No mode supplied when including flags.defs 78 #endif 79 80 // Dummy defines for modes where it is not relevant. 81 #ifndef FLAG_FULL 82 #define FLAG_FULL(ftype, ctype, nam, def, cmt) 83 #endif 84 85 #ifndef FLAG_READONLY 86 #define FLAG_READONLY(ftype, ctype, nam, def, cmt) 87 #endif 88 89 #ifndef FLAG_ALIAS 90 #define FLAG_ALIAS(ftype, ctype, alias, nam) 91 #endif 92 93 #ifndef DEFINE_VALUE_IMPLICATION 94 #define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value) 95 #endif 96 97 #ifndef DEFINE_GENERIC_IMPLICATION 98 #define DEFINE_GENERIC_IMPLICATION(whenflag, statement) 99 #endif 100 101 #ifndef DEFINE_NEG_VALUE_IMPLICATION 102 #define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value) 103 #endif 104 105 #define COMMA , 106 107 #ifdef FLAG_MODE_DECLARE 108 109 struct MaybeBoolFlag { CreateMaybeBoolFlag110 static MaybeBoolFlag Create(bool has_value, bool value) { 111 MaybeBoolFlag flag; 112 flag.has_value = has_value; 113 flag.value = value; 114 return flag; 115 } 116 bool has_value; 117 bool value; 118 119 bool operator!=(const MaybeBoolFlag& other) const { 120 return has_value != other.has_value || value != other.value; 121 } 122 }; 123 #endif 124 125 #ifdef DEBUG 126 #define DEBUG_BOOL true 127 #else 128 #define DEBUG_BOOL false 129 #endif 130 131 #ifdef V8_COMPRESS_POINTERS 132 #define COMPRESS_POINTERS_BOOL true 133 #else 134 #define COMPRESS_POINTERS_BOOL false 135 #endif 136 137 #ifdef V8_ENABLE_CONTROL_FLOW_INTEGRITY 138 #define ENABLE_CONTROL_FLOW_INTEGRITY_BOOL true 139 #else 140 #define ENABLE_CONTROL_FLOW_INTEGRITY_BOOL false 141 #endif 142 143 // Supported ARM configurations are: 144 // "armv6": ARMv6 + VFPv2 145 // "armv7": ARMv7 + VFPv3-D32 + NEON 146 // "armv7+sudiv": ARMv7 + VFPv4-D32 + NEON + SUDIV 147 // "armv8": ARMv8 (including all of the above) 148 #if !defined(ARM_TEST_NO_FEATURE_PROBE) || \ 149 (defined(CAN_USE_ARMV8_INSTRUCTIONS) && \ 150 defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(CAN_USE_SUDIV) && \ 151 defined(CAN_USE_NEON) && defined(CAN_USE_VFP3_INSTRUCTIONS)) 152 #define ARM_ARCH_DEFAULT "armv8" 153 #elif defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(CAN_USE_SUDIV) && \ 154 defined(CAN_USE_NEON) && defined(CAN_USE_VFP3_INSTRUCTIONS) 155 #define ARM_ARCH_DEFAULT "armv7+sudiv" 156 #elif defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(CAN_USE_NEON) && \ 157 defined(CAN_USE_VFP3_INSTRUCTIONS) 158 #define ARM_ARCH_DEFAULT "armv7" 159 #else 160 #define ARM_ARCH_DEFAULT "armv6" 161 #endif 162 163 #ifdef V8_OS_WIN 164 #define ENABLE_LOG_COLOUR false 165 #else 166 #define ENABLE_LOG_COLOUR true 167 #endif 168 169 #define DEFINE_BOOL(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt) 170 #define DEFINE_BOOL_READONLY(nam, def, cmt) \ 171 FLAG_READONLY(BOOL, bool, nam, def, cmt) 172 #define DEFINE_MAYBE_BOOL(nam, cmt) \ 173 FLAG(MAYBE_BOOL, MaybeBoolFlag, nam, {false COMMA false}, cmt) 174 #define DEFINE_INT(nam, def, cmt) FLAG(INT, int, nam, def, cmt) 175 #define DEFINE_UINT(nam, def, cmt) FLAG(UINT, unsigned int, nam, def, cmt) 176 #define DEFINE_UINT_READONLY(nam, def, cmt) \ 177 FLAG_READONLY(UINT, unsigned int, nam, def, cmt) 178 #define DEFINE_UINT64(nam, def, cmt) FLAG(UINT64, uint64_t, nam, def, cmt) 179 #define DEFINE_FLOAT(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt) 180 #define DEFINE_SIZE_T(nam, def, cmt) FLAG(SIZE_T, size_t, nam, def, cmt) 181 #define DEFINE_STRING(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt) 182 #define DEFINE_ALIAS_BOOL(alias, nam) FLAG_ALIAS(BOOL, bool, alias, nam) 183 #define DEFINE_ALIAS_INT(alias, nam) FLAG_ALIAS(INT, int, alias, nam) 184 #define DEFINE_ALIAS_FLOAT(alias, nam) FLAG_ALIAS(FLOAT, double, alias, nam) 185 #define DEFINE_ALIAS_SIZE_T(alias, nam) FLAG_ALIAS(SIZE_T, size_t, alias, nam) 186 #define DEFINE_ALIAS_STRING(alias, nam) \ 187 FLAG_ALIAS(STRING, const char*, alias, nam) 188 189 #ifdef DEBUG 190 #define DEFINE_DEBUG_BOOL DEFINE_BOOL 191 #else 192 #define DEFINE_DEBUG_BOOL DEFINE_BOOL_READONLY 193 #endif 194 195 // 196 // Flags in all modes. 197 // 198 #define FLAG FLAG_FULL 199 200 // Flags for language modes and experimental language features. 201 DEFINE_BOOL(use_strict, false, "enforce strict mode") 202 203 DEFINE_BOOL(es_staging, false, 204 "enable test-worthy harmony features (for internal use only)") 205 DEFINE_BOOL(harmony, false, "enable all completed harmony features") 206 DEFINE_BOOL(harmony_shipping, true, "enable all shipped harmony features") 207 DEFINE_IMPLICATION(es_staging, harmony) 208 // Enabling import.meta requires to also enable import() 209 DEFINE_IMPLICATION(harmony_import_meta, harmony_dynamic_import) 210 211 // Update bootstrapper.cc whenever adding a new feature flag. 212 213 // Features that are still work in progress (behind individual flags). 214 #define HARMONY_INPROGRESS_BASE(V) \ 215 V(harmony_string_replaceall, "harmony String.prototype.replaceAll") \ 216 V(harmony_regexp_sequence, "RegExp Unicode sequence properties") \ 217 V(harmony_weak_refs, "harmony weak references") \ 218 V(harmony_regexp_match_indices, "harmony regexp match indices") \ 219 V(harmony_top_level_await, "harmony top level await") 220 221 #ifdef V8_INTL_SUPPORT 222 #define HARMONY_INPROGRESS(V) \ 223 HARMONY_INPROGRESS_BASE(V) \ 224 V(harmony_intl_displaynames_date_types, "Intl.DisplayNames date types") 225 #else 226 #define HARMONY_INPROGRESS(V) HARMONY_INPROGRESS_BASE(V) 227 #endif 228 229 // Features that are complete (but still behind --harmony/es-staging flag). 230 #define HARMONY_STAGED_BASE(V) \ 231 V(harmony_private_methods, "harmony private methods in class literals") 232 233 #ifdef V8_INTL_SUPPORT 234 #define HARMONY_STAGED(V) \ 235 HARMONY_STAGED_BASE(V) \ 236 V(harmony_intl_dateformat_day_period, \ 237 "Add dayPeriod option to DateTimeFormat") \ 238 V(harmony_intl_dateformat_fractional_second_digits, \ 239 "Add fractionalSecondDigits option to DateTimeFormat") \ 240 V(harmony_intl_segmenter, "Intl.Segmenter") 241 #else 242 #define HARMONY_STAGED(V) HARMONY_STAGED_BASE(V) 243 #endif 244 245 // Features that are shipping (turned on by default, but internal flag remains). 246 #define HARMONY_SHIPPING_BASE(V) \ 247 V(harmony_namespace_exports, \ 248 "harmony namespace exports (export * as foo from 'bar')") \ 249 V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \ 250 V(harmony_import_meta, "harmony import.meta property") \ 251 V(harmony_dynamic_import, "harmony dynamic import") \ 252 V(harmony_promise_all_settled, "harmony Promise.allSettled") \ 253 V(harmony_nullish, "harmony nullish operator") \ 254 V(harmony_optional_chaining, "harmony optional chaining syntax") 255 256 #ifdef V8_INTL_SUPPORT 257 #define HARMONY_SHIPPING(V) \ 258 HARMONY_SHIPPING_BASE(V) \ 259 V(harmony_intl_add_calendar_numbering_system, \ 260 "Add calendar and numberingSystem to DateTimeFormat") \ 261 V(harmony_intl_displaynames, "Intl.DisplayNames") \ 262 V(harmony_intl_other_calendars, "DateTimeFormat other calendars") 263 #else 264 #define HARMONY_SHIPPING(V) HARMONY_SHIPPING_BASE(V) 265 #endif 266 267 // Once a shipping feature has proved stable in the wild, it will be dropped 268 // from HARMONY_SHIPPING, all occurrences of the FLAG_ variable are removed, 269 // and associated tests are moved from the harmony directory to the appropriate 270 // esN directory. 271 272 #define FLAG_INPROGRESS_FEATURES(id, description) \ 273 DEFINE_BOOL(id, false, "enable " #description " (in progress)") 274 HARMONY_INPROGRESS(FLAG_INPROGRESS_FEATURES) 275 #undef FLAG_INPROGRESS_FEATURES 276 277 #define FLAG_STAGED_FEATURES(id, description) \ 278 DEFINE_BOOL(id, false, "enable " #description) \ 279 DEFINE_IMPLICATION(harmony, id) 280 HARMONY_STAGED(FLAG_STAGED_FEATURES) 281 #undef FLAG_STAGED_FEATURES 282 283 #define FLAG_SHIPPING_FEATURES(id, description) \ 284 DEFINE_BOOL(id, true, "enable " #description) \ 285 DEFINE_NEG_NEG_IMPLICATION(harmony_shipping, id) 286 HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES) 287 #undef FLAG_SHIPPING_FEATURES 288 289 #ifdef V8_INTL_SUPPORT 290 DEFINE_BOOL(icu_timezone_data, true, "get information about timezones from ICU") 291 #endif 292 293 #ifdef V8_ENABLE_DOUBLE_CONST_STORE_CHECK 294 #define V8_ENABLE_DOUBLE_CONST_STORE_CHECK_BOOL true 295 #else 296 #define V8_ENABLE_DOUBLE_CONST_STORE_CHECK_BOOL false 297 #endif 298 299 #ifdef V8_LITE_MODE 300 #define V8_LITE_BOOL true 301 #else 302 #define V8_LITE_BOOL false 303 #endif 304 305 #ifdef V8_ENABLE_LAZY_SOURCE_POSITIONS 306 #define V8_LAZY_SOURCE_POSITIONS_BOOL true 307 #else 308 #define V8_LAZY_SOURCE_POSITIONS_BOOL false 309 #endif 310 311 #ifdef V8_SHARED_RO_HEAP 312 #define V8_SHARED_RO_HEAP_BOOL true 313 #else 314 #define V8_SHARED_RO_HEAP_BOOL false 315 #endif 316 317 DEFINE_BOOL(lite_mode, V8_LITE_BOOL, 318 "enables trade-off of performance for memory savings") 319 320 // Lite mode implies other flags to trade-off performance for memory. 321 DEFINE_IMPLICATION(lite_mode, jitless) 322 DEFINE_IMPLICATION(lite_mode, lazy_feedback_allocation) 323 DEFINE_IMPLICATION(lite_mode, optimize_for_size) 324 325 #ifdef V8_ENABLE_THIRD_PARTY_HEAP 326 #define V8_ENABLE_THIRD_PARTY_HEAP_BOOL true 327 #else 328 #define V8_ENABLE_THIRD_PARTY_HEAP_BOOL false 329 #endif 330 331 DEFINE_BOOL_READONLY(enable_third_party_heap, V8_ENABLE_THIRD_PARTY_HEAP_BOOL, 332 "Use third-party heap") 333 334 #ifdef V8_DISABLE_WRITE_BARRIERS 335 #define V8_DISABLE_WRITE_BARRIERS_BOOL true 336 #else 337 #define V8_DISABLE_WRITE_BARRIERS_BOOL false 338 #endif 339 340 DEFINE_BOOL_READONLY(disable_write_barriers, V8_DISABLE_WRITE_BARRIERS_BOOL, 341 "disable write barriers when GC is non-incremental " 342 "and heap contains single generation.") 343 344 // Disable incremental marking barriers 345 DEFINE_NEG_IMPLICATION(disable_write_barriers, incremental_marking) 346 347 #ifdef V8_ENABLE_SINGLE_GENERATION 348 #define V8_GENERATION_BOOL true 349 #else 350 #define V8_GENERATION_BOOL false 351 #endif 352 353 DEFINE_BOOL_READONLY( 354 single_generation, V8_GENERATION_BOOL, 355 "allocate all objects from young generation to old generation") 356 357 // Prevent inline allocation into new space 358 DEFINE_NEG_IMPLICATION(single_generation, inline_new) 359 DEFINE_NEG_IMPLICATION(single_generation, turbo_allocation_folding) 360 361 #ifdef V8_ENABLE_FUTURE 362 #define FUTURE_BOOL true 363 #else 364 #define FUTURE_BOOL false 365 #endif 366 DEFINE_BOOL(future, FUTURE_BOOL, 367 "Implies all staged features that we want to ship in the " 368 "not-too-far future") 369 370 DEFINE_IMPLICATION(future, write_protect_code_memory) 371 372 DEFINE_BOOL(assert_types, false, 373 "generate runtime type assertions to test the typer") 374 375 // Flags for experimental implementation features. 376 DEFINE_BOOL(allocation_site_pretenuring, true, 377 "pretenure with allocation sites") 378 DEFINE_BOOL(page_promotion, true, "promote pages based on utilization") 379 DEFINE_BOOL(always_promote_young_mc, true, 380 "always promote young objects during mark-compact") 381 DEFINE_INT(page_promotion_threshold, 70, 382 "min percentage of live bytes on a page to enable fast evacuation") 383 DEFINE_BOOL(trace_pretenuring, false, 384 "trace pretenuring decisions of HAllocate instructions") 385 DEFINE_BOOL(trace_pretenuring_statistics, false, 386 "trace allocation site pretenuring statistics") 387 DEFINE_BOOL(track_fields, true, "track fields with only smi values") 388 DEFINE_BOOL(track_double_fields, true, "track fields with double values") 389 DEFINE_BOOL(track_heap_object_fields, true, "track fields with heap values") 390 DEFINE_BOOL(track_computed_fields, true, "track computed boilerplate fields") 391 DEFINE_IMPLICATION(track_double_fields, track_fields) 392 DEFINE_IMPLICATION(track_heap_object_fields, track_fields) 393 DEFINE_IMPLICATION(track_computed_fields, track_fields) 394 DEFINE_BOOL(track_field_types, true, "track field types") 395 DEFINE_IMPLICATION(track_field_types, track_fields) 396 DEFINE_IMPLICATION(track_field_types, track_heap_object_fields) 397 DEFINE_BOOL(trace_block_coverage, false, 398 "trace collected block coverage information") 399 DEFINE_BOOL(trace_protector_invalidation, false, 400 "trace protector cell invalidations") 401 DEFINE_BOOL(feedback_normalization, false, 402 "feed back normalization to constructors") 403 // TODO(jkummerow): This currently adds too much load on the stub cache. 404 DEFINE_BOOL_READONLY(internalize_on_the_fly, true, 405 "internalize string keys for generic keyed ICs on the fly") 406 407 // Flag for one shot optimiztions. 408 DEFINE_BOOL(enable_one_shot_optimization, false, 409 "Enable size optimizations for the code that will " 410 "only be executed once") 411 412 // Flag for sealed, frozen elements kind instead of dictionary elements kind 413 DEFINE_BOOL_READONLY(enable_sealed_frozen_elements_kind, true, 414 "Enable sealed, frozen elements kind") 415 416 // Flags for data representation optimizations 417 DEFINE_BOOL(unbox_double_arrays, true, "automatically unbox arrays of doubles") 418 DEFINE_BOOL_READONLY(string_slices, true, "use string slices") 419 420 DEFINE_INT(interrupt_budget, 144 * KB, 421 "interrupt budget which should be used for the profiler counter") 422 423 // Flags for jitless 424 DEFINE_BOOL(jitless, V8_LITE_BOOL, 425 "Disable runtime allocation of executable memory.") 426 427 // Jitless V8 has a few implications: 428 DEFINE_NEG_IMPLICATION(jitless, opt) 429 // Field representation tracking is only used by TurboFan. 430 DEFINE_NEG_IMPLICATION(jitless, track_field_types) 431 DEFINE_NEG_IMPLICATION(jitless, track_heap_object_fields) 432 // Regexps are interpreted. 433 DEFINE_IMPLICATION(jitless, regexp_interpret_all) 434 // asm.js validation is disabled since it triggers wasm code generation. 435 DEFINE_NEG_IMPLICATION(jitless, validate_asm) 436 // Wasm is put into interpreter-only mode. We repeat flag implications down 437 // here to ensure they're applied correctly by setting the --jitless flag. 438 DEFINE_IMPLICATION(jitless, wasm_interpret_all) 439 DEFINE_NEG_IMPLICATION(jitless, asm_wasm_lazy_compilation) 440 DEFINE_NEG_IMPLICATION(jitless, wasm_lazy_compilation) 441 // --jitless also implies --no-expose-wasm, see InitializeOncePerProcessImpl. 442 443 // Flags for inline caching and feedback vectors. 444 DEFINE_BOOL(use_ic, true, "use inline caching") 445 DEFINE_INT(budget_for_feedback_vector_allocation, 1 * KB, 446 "The budget in amount of bytecode executed by a function before we " 447 "decide to allocate feedback vectors") 448 DEFINE_BOOL(lazy_feedback_allocation, true, "Allocate feedback vectors lazily") 449 450 // Flags for Ignition. 451 DEFINE_BOOL(ignition_elide_noneffectful_bytecodes, true, 452 "elide bytecodes which won't have any external effect") 453 DEFINE_BOOL(ignition_reo, true, "use ignition register equivalence optimizer") 454 DEFINE_BOOL(ignition_filter_expression_positions, true, 455 "filter expression positions before the bytecode pipeline") 456 DEFINE_BOOL(ignition_share_named_property_feedback, true, 457 "share feedback slots when loading the same named property from " 458 "the same object") 459 DEFINE_BOOL(print_bytecode, false, 460 "print bytecode generated by ignition interpreter") 461 DEFINE_BOOL(enable_lazy_source_positions, V8_LAZY_SOURCE_POSITIONS_BOOL, 462 "skip generating source positions during initial compile but " 463 "regenerate when actually required") 464 DEFINE_BOOL(stress_lazy_source_positions, false, 465 "collect lazy source positions immediately after lazy compile") 466 DEFINE_STRING(print_bytecode_filter, "*", 467 "filter for selecting which functions to print bytecode") 468 #ifdef V8_TRACE_IGNITION 469 DEFINE_BOOL(trace_ignition, false, 470 "trace the bytecodes executed by the ignition interpreter") 471 #endif 472 #ifdef V8_TRACE_FEEDBACK_UPDATES 473 DEFINE_BOOL( 474 trace_feedback_updates, false, 475 "trace updates to feedback vectors during ignition interpreter execution.") 476 #endif 477 DEFINE_BOOL(trace_ignition_codegen, false, 478 "trace the codegen of ignition interpreter bytecode handlers") 479 DEFINE_BOOL(trace_ignition_dispatches, false, 480 "traces the dispatches to bytecode handlers by the ignition " 481 "interpreter") 482 DEFINE_STRING(trace_ignition_dispatches_output_file, nullptr, 483 "the file to which the bytecode handler dispatch table is " 484 "written (by default, the table is not written to a file)") 485 486 DEFINE_BOOL(fast_math, true, "faster (but maybe less accurate) math functions") 487 DEFINE_BOOL(trace_track_allocation_sites, false, 488 "trace the tracking of allocation sites") 489 DEFINE_BOOL(trace_migration, false, "trace object migration") 490 DEFINE_BOOL(trace_generalization, false, "trace map generalization") 491 492 // Flags for TurboProp. 493 DEFINE_BOOL(turboprop, false, 494 "enable experimental turboprop mid-tier compiler.") 495 DEFINE_NEG_IMPLICATION(turboprop, turbo_inlining) 496 DEFINE_IMPLICATION(turboprop, concurrent_inlining) 497 DEFINE_VALUE_IMPLICATION(turboprop, interrupt_budget, 15 * KB) 498 499 // Flags for concurrent recompilation. 500 DEFINE_BOOL(concurrent_recompilation, true, 501 "optimizing hot functions asynchronously on a separate thread") 502 DEFINE_BOOL(trace_concurrent_recompilation, false, 503 "track concurrent recompilation") 504 DEFINE_INT(concurrent_recompilation_queue_length, 8, 505 "the length of the concurrent compilation queue") 506 DEFINE_INT(concurrent_recompilation_delay, 0, 507 "artificial compilation delay in ms") 508 DEFINE_BOOL(block_concurrent_recompilation, false, 509 "block queued jobs until released") 510 DEFINE_BOOL(concurrent_inlining, false, 511 "run optimizing compiler's inlining phase on a separate thread") 512 DEFINE_INT(max_serializer_nesting, 25, 513 "maximum levels for nesting child serializers") 514 DEFINE_IMPLICATION(future, concurrent_inlining) 515 DEFINE_BOOL(trace_heap_broker_verbose, false, 516 "trace the heap broker verbosely (all reports)") 517 DEFINE_BOOL(trace_heap_broker_memory, false, 518 "trace the heap broker memory (refs analysis and zone numbers)") 519 DEFINE_BOOL(trace_heap_broker, false, 520 "trace the heap broker (reports on missing data only)") 521 DEFINE_IMPLICATION(trace_heap_broker_verbose, trace_heap_broker) 522 DEFINE_IMPLICATION(trace_heap_broker_memory, trace_heap_broker) 523 524 // Flags for stress-testing the compiler. 525 DEFINE_INT(stress_runs, 0, "number of stress runs") 526 DEFINE_INT(deopt_every_n_times, 0, 527 "deoptimize every n times a deopt point is passed") 528 DEFINE_BOOL(print_deopt_stress, false, "print number of possible deopt points") 529 530 // Flags for TurboFan. 531 DEFINE_BOOL(opt, true, "use adaptive optimizations") 532 DEFINE_BOOL(turbo_sp_frame_access, false, 533 "use stack pointer-relative access to frame wherever possible") 534 DEFINE_BOOL(turbo_control_flow_aware_allocation, true, 535 "consider control flow while allocating registers") 536 537 DEFINE_STRING(turbo_filter, "*", "optimization filter for TurboFan compiler") 538 DEFINE_BOOL(trace_turbo, false, "trace generated TurboFan IR") 539 DEFINE_STRING(trace_turbo_path, nullptr, 540 "directory to dump generated TurboFan IR to") 541 DEFINE_STRING(trace_turbo_filter, "*", 542 "filter for tracing turbofan compilation") 543 DEFINE_BOOL(trace_turbo_graph, false, "trace generated TurboFan graphs") 544 DEFINE_BOOL(trace_turbo_scheduled, false, "trace TurboFan IR with schedule") 545 DEFINE_IMPLICATION(trace_turbo_scheduled, trace_turbo_graph) 546 DEFINE_STRING(trace_turbo_cfg_file, nullptr, 547 "trace turbo cfg graph (for C1 visualizer) to a given file name") 548 DEFINE_BOOL(trace_turbo_types, true, "trace TurboFan's types") 549 DEFINE_BOOL(trace_turbo_scheduler, false, "trace TurboFan's scheduler") 550 DEFINE_BOOL(trace_turbo_reduction, false, "trace TurboFan's various reducers") 551 DEFINE_BOOL(trace_turbo_trimming, false, "trace TurboFan's graph trimmer") 552 DEFINE_BOOL(trace_turbo_jt, false, "trace TurboFan's jump threading") 553 DEFINE_BOOL(trace_turbo_ceq, false, "trace TurboFan's control equivalence") 554 DEFINE_BOOL(trace_turbo_loop, false, "trace TurboFan's loop optimizations") 555 DEFINE_BOOL(trace_turbo_alloc, false, "trace TurboFan's register allocator") 556 DEFINE_BOOL(trace_all_uses, false, "trace all use positions") 557 DEFINE_BOOL(trace_representation, false, "trace representation types") 558 DEFINE_BOOL(turbo_verify, DEBUG_BOOL, "verify TurboFan graphs at each phase") 559 DEFINE_STRING(turbo_verify_machine_graph, nullptr, 560 "verify TurboFan machine graph before instruction selection") 561 #ifdef ENABLE_VERIFY_CSA 562 DEFINE_BOOL(verify_csa, DEBUG_BOOL, 563 "verify TurboFan machine graph of code stubs") 564 #else 565 // Define the flag as read-only-false so that code still compiles even in the 566 // non-ENABLE_VERIFY_CSA configuration. 567 DEFINE_BOOL_READONLY(verify_csa, false, 568 "verify TurboFan machine graph of code stubs") 569 #endif 570 DEFINE_BOOL(trace_verify_csa, false, "trace code stubs verification") 571 DEFINE_STRING(csa_trap_on_node, nullptr, 572 "trigger break point when a node with given id is created in " 573 "given stub. The format is: StubName,NodeId") 574 DEFINE_BOOL_READONLY(fixed_array_bounds_checks, true, 575 "enable FixedArray bounds checks") 576 DEFINE_BOOL(turbo_stats, false, "print TurboFan statistics") 577 DEFINE_BOOL(turbo_stats_nvp, false, 578 "print TurboFan statistics in machine-readable format") 579 DEFINE_BOOL(turbo_stats_wasm, false, 580 "print TurboFan statistics of wasm compilations") 581 DEFINE_BOOL(turbo_splitting, true, "split nodes during scheduling in TurboFan") 582 DEFINE_BOOL(function_context_specialization, false, 583 "enable function context specialization in TurboFan") 584 DEFINE_BOOL(turbo_inlining, true, "enable inlining in TurboFan") 585 DEFINE_INT(max_inlined_bytecode_size, 500, 586 "maximum size of bytecode for a single inlining") 587 DEFINE_INT(max_inlined_bytecode_size_cumulative, 1000, 588 "maximum cumulative size of bytecode considered for inlining") 589 DEFINE_INT(max_inlined_bytecode_size_absolute, 5000, 590 "maximum cumulative size of bytecode considered for inlining") 591 DEFINE_FLOAT(reserve_inline_budget_scale_factor, 1.2, 592 "maximum cumulative size of bytecode considered for inlining") 593 DEFINE_INT(max_inlined_bytecode_size_small, 30, 594 "maximum size of bytecode considered for small function inlining") 595 DEFINE_INT(max_optimized_bytecode_size, 60 * KB, 596 "maximum bytecode size to " 597 "be considered for optimization; too high values may cause " 598 "the compiler to hit (release) assertions") 599 DEFINE_FLOAT(min_inlining_frequency, 0.15, "minimum frequency for inlining") 600 DEFINE_BOOL(polymorphic_inlining, true, "polymorphic inlining") 601 DEFINE_BOOL(stress_inline, false, 602 "set high thresholds for inlining to inline as much as possible") 603 DEFINE_VALUE_IMPLICATION(stress_inline, max_inlined_bytecode_size, 999999) 604 DEFINE_VALUE_IMPLICATION(stress_inline, max_inlined_bytecode_size_cumulative, 605 999999) 606 DEFINE_VALUE_IMPLICATION(stress_inline, max_inlined_bytecode_size_absolute, 607 999999) 608 DEFINE_VALUE_IMPLICATION(stress_inline, min_inlining_frequency, 0) 609 DEFINE_IMPLICATION(stress_inline, polymorphic_inlining) 610 DEFINE_BOOL(trace_turbo_inlining, false, "trace TurboFan inlining") 611 DEFINE_BOOL(turbo_inline_array_builtins, true, 612 "inline array builtins in TurboFan code") 613 DEFINE_BOOL(use_osr, true, "use on-stack replacement") 614 DEFINE_BOOL(trace_osr, false, "trace on-stack replacement") 615 DEFINE_BOOL(analyze_environment_liveness, true, 616 "analyze liveness of environment slots and zap dead values") 617 DEFINE_BOOL(trace_environment_liveness, false, 618 "trace liveness of local variable slots") 619 DEFINE_BOOL(turbo_load_elimination, true, "enable load elimination in TurboFan") 620 DEFINE_BOOL(trace_turbo_load_elimination, false, 621 "trace TurboFan load elimination") 622 DEFINE_BOOL(turbo_profiling, false, "enable profiling in TurboFan") 623 DEFINE_BOOL(turbo_verify_allocation, DEBUG_BOOL, 624 "verify register allocation in TurboFan") 625 DEFINE_BOOL(turbo_move_optimization, true, "optimize gap moves in TurboFan") 626 DEFINE_BOOL(turbo_jt, true, "enable jump threading in TurboFan") 627 DEFINE_BOOL(turbo_loop_peeling, true, "Turbofan loop peeling") 628 DEFINE_BOOL(turbo_loop_variable, true, "Turbofan loop variable optimization") 629 DEFINE_BOOL(turbo_loop_rotation, true, "Turbofan loop rotation") 630 DEFINE_BOOL(turbo_cf_optimization, true, "optimize control flow in TurboFan") 631 DEFINE_BOOL(turbo_escape, true, "enable escape analysis") 632 DEFINE_BOOL(turbo_allocation_folding, true, "Turbofan allocation folding") 633 DEFINE_BOOL(turbo_instruction_scheduling, false, 634 "enable instruction scheduling in TurboFan") 635 DEFINE_BOOL(turbo_stress_instruction_scheduling, false, 636 "randomly schedule instructions to stress dependency tracking") 637 DEFINE_IMPLICATION(turbo_stress_instruction_scheduling, 638 turbo_instruction_scheduling) 639 DEFINE_BOOL(turbo_store_elimination, true, 640 "enable store-store elimination in TurboFan") 641 DEFINE_BOOL(trace_store_elimination, false, "trace store elimination") 642 DEFINE_BOOL(turbo_rewrite_far_jumps, true, 643 "rewrite far to near jumps (ia32,x64)") 644 DEFINE_BOOL( 645 stress_gc_during_compilation, false, 646 "simulate GC/compiler thread race related to https://crbug.com/v8/8520") 647 DEFINE_BOOL(turbo_fast_api_calls, false, "enable fast API calls from TurboFan") 648 649 // Favor memory over execution speed. 650 DEFINE_BOOL(optimize_for_size, false, 651 "Enables optimizations which favor memory size over execution " 652 "speed") 653 DEFINE_VALUE_IMPLICATION(optimize_for_size, max_semi_space_size, 1) 654 655 #ifdef DISABLE_UNTRUSTED_CODE_MITIGATIONS 656 #define V8_DEFAULT_UNTRUSTED_CODE_MITIGATIONS false 657 #else 658 #define V8_DEFAULT_UNTRUSTED_CODE_MITIGATIONS true 659 #endif 660 DEFINE_BOOL(untrusted_code_mitigations, V8_DEFAULT_UNTRUSTED_CODE_MITIGATIONS, 661 "Enable mitigations for executing untrusted code") 662 #undef V8_DEFAULT_UNTRUSTED_CODE_MITIGATIONS 663 664 // Flags for native WebAssembly. 665 DEFINE_BOOL(expose_wasm, true, "expose wasm interface to JavaScript") 666 DEFINE_BOOL(assume_asmjs_origin, false, 667 "force wasm decoder to assume input is internal asm-wasm format") 668 DEFINE_INT(wasm_num_compilation_tasks, 128, 669 "maximum number of parallel compilation tasks for wasm") 670 DEFINE_DEBUG_BOOL(trace_wasm_native_heap, false, 671 "trace wasm native heap events") 672 DEFINE_BOOL(wasm_write_protect_code_memory, false, 673 "write protect code memory on the wasm native heap") 674 DEFINE_DEBUG_BOOL(trace_wasm_serialization, false, 675 "trace serialization/deserialization") 676 DEFINE_BOOL(wasm_async_compilation, true, 677 "enable actual asynchronous compilation for WebAssembly.compile") 678 DEFINE_BOOL(wasm_test_streaming, false, 679 "use streaming compilation instead of async compilation for tests") 680 DEFINE_UINT(wasm_max_mem_pages, 681 v8::internal::wasm::kSpecMaxWasmInitialMemoryPages, 682 "maximum initial number of 64KiB memory pages of a wasm instance") 683 DEFINE_UINT(wasm_max_mem_pages_growth, 684 v8::internal::wasm::kSpecMaxWasmMaximumMemoryPages, 685 "maximum number of 64KiB pages a Wasm memory can grow to") 686 DEFINE_UINT(wasm_max_table_size, v8::internal::wasm::kV8MaxWasmTableSize, 687 "maximum table size of a wasm instance") 688 DEFINE_UINT(wasm_max_code_space, v8::internal::kMaxWasmCodeMB, 689 "maximum committed code space for wasm (in MB)") 690 DEFINE_BOOL(wasm_tier_up, true, 691 "enable tier up to the optimizing compiler (requires --liftoff to " 692 "have an effect)") 693 DEFINE_DEBUG_BOOL(trace_wasm_decoder, false, "trace decoding of wasm code") 694 DEFINE_DEBUG_BOOL(trace_wasm_compiler, false, "trace compiling of wasm code") 695 DEFINE_DEBUG_BOOL(trace_wasm_interpreter, false, 696 "trace interpretation of wasm code") 697 DEFINE_DEBUG_BOOL(trace_wasm_streaming, false, 698 "trace streaming compilation of wasm code") 699 DEFINE_INT(trace_wasm_ast_start, 0, 700 "start function for wasm AST trace (inclusive)") 701 DEFINE_INT(trace_wasm_ast_end, 0, "end function for wasm AST trace (exclusive)") 702 // Enable Liftoff by default on ia32 and x64. More architectures will follow 703 // once they are implemented and sufficiently tested. 704 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 705 DEFINE_BOOL(liftoff, true, 706 "enable Liftoff, the baseline compiler for WebAssembly") 707 #else 708 DEFINE_BOOL(liftoff, false, 709 "enable Liftoff, the baseline compiler for WebAssembly") 710 DEFINE_IMPLICATION(future, liftoff) 711 #endif 712 DEFINE_DEBUG_BOOL(trace_liftoff, false, 713 "trace Liftoff, the baseline compiler for WebAssembly") 714 DEFINE_BOOL(trace_wasm_memory, false, 715 "print all memory updates performed in wasm code") 716 // Fuzzers use {wasm_tier_mask_for_testing} together with {liftoff} and 717 // {no_wasm_tier_up} to force some functions to be compiled with Turbofan. 718 DEFINE_INT(wasm_tier_mask_for_testing, 0, 719 "bitmask of functions to compile with TurboFan instead of Liftoff") 720 721 DEFINE_BOOL(debug_in_liftoff, false, 722 "use Liftoff instead of the C++ interpreter for debugging " 723 "WebAssembly (experimental)") 724 DEFINE_IMPLICATION(future, debug_in_liftoff) 725 726 DEFINE_BOOL(validate_asm, true, "validate asm.js modules before compiling") 727 DEFINE_BOOL(suppress_asm_messages, false, 728 "don't emit asm.js related messages (for golden file testing)") 729 DEFINE_BOOL(trace_asm_time, false, "log asm.js timing info to the console") 730 DEFINE_BOOL(trace_asm_scanner, false, 731 "log tokens encountered by asm.js scanner") 732 DEFINE_BOOL(trace_asm_parser, false, "verbose logging of asm.js parse failures") 733 DEFINE_BOOL(stress_validate_asm, false, "try to validate everything as asm.js") 734 735 DEFINE_DEBUG_BOOL(dump_wasm_module, false, "dump wasm module bytes") 736 DEFINE_STRING(dump_wasm_module_path, nullptr, 737 "directory to dump wasm modules to") 738 739 // Declare command-line flags for Wasm features. Warning: avoid using these 740 // flags directly in the implementation. Instead accept wasm::WasmFeatures 741 // for configurability. 742 #include "src/wasm/wasm-feature-flags.h" 743 744 #define DECL_WASM_FLAG(feat, desc, val) \ 745 DEFINE_BOOL(experimental_wasm_##feat, val, \ 746 "enable prototype " desc " for wasm") 747 FOREACH_WASM_FEATURE_FLAG(DECL_WASM_FLAG) 748 #undef DECL_WASM_FLAG 749 750 DEFINE_BOOL(wasm_staging, false, "enable staged wasm features") 751 752 #define WASM_STAGING_IMPLICATION(feat, desc, val) \ 753 DEFINE_IMPLICATION(wasm_staging, experimental_wasm_##feat) 754 FOREACH_WASM_STAGING_FEATURE_FLAG(WASM_STAGING_IMPLICATION) 755 #undef WASM_STAGING_IMPLICATION 756 757 DEFINE_BOOL(wasm_opt, false, "enable wasm optimization") 758 DEFINE_BOOL( 759 wasm_bounds_checks, true, 760 "enable bounds checks (disable for performance testing only)") 761 DEFINE_BOOL(wasm_stack_checks, true, 762 "enable stack checks (disable for performance testing only)") 763 DEFINE_BOOL(wasm_math_intrinsics, true, 764 "intrinsify some Math imports into wasm") 765 766 DEFINE_BOOL(wasm_trap_handler, true, 767 "use signal handlers to catch out of bounds memory access in wasm" 768 " (currently Linux x86_64 only)") 769 DEFINE_BOOL(wasm_fuzzer_gen_test, false, 770 "generate a test case when running a wasm fuzzer") 771 DEFINE_IMPLICATION(wasm_fuzzer_gen_test, single_threaded) 772 DEFINE_BOOL(print_wasm_code, false, "Print WebAssembly code") 773 DEFINE_BOOL(print_wasm_stub_code, false, "Print WebAssembly stub code") 774 DEFINE_BOOL(wasm_interpret_all, false, 775 "execute all wasm code in the wasm interpreter") 776 DEFINE_BOOL(asm_wasm_lazy_compilation, false, 777 "enable lazy compilation for asm-wasm modules") 778 DEFINE_IMPLICATION(validate_asm, asm_wasm_lazy_compilation) 779 DEFINE_BOOL(wasm_lazy_compilation, false, 780 "enable lazy compilation for all wasm modules") 781 DEFINE_DEBUG_BOOL(trace_wasm_lazy_compilation, false, 782 "trace lazy compilation of wasm functions") 783 DEFINE_BOOL(wasm_lazy_validation, false, 784 "enable lazy validation for lazily compiled wasm functions") 785 786 // Flags for wasm prototyping that are not strictly features i.e., part of 787 // an existing proposal that may be conditionally enabled. 788 DEFINE_BOOL(wasm_atomics_on_non_shared_memory, false, 789 "allow atomic operations on non-shared WebAssembly memory") 790 DEFINE_BOOL(wasm_grow_shared_memory, true, 791 "allow growing shared WebAssembly memory objects") 792 DEFINE_BOOL(wasm_simd_post_mvp, false, 793 "allow experimental SIMD operations for prototyping that are not " 794 "included in the current proposal") 795 DEFINE_IMPLICATION(wasm_simd_post_mvp, experimental_wasm_simd) 796 797 // wasm-interpret-all resets {asm-,}wasm-lazy-compilation. 798 DEFINE_NEG_IMPLICATION(wasm_interpret_all, asm_wasm_lazy_compilation) 799 DEFINE_NEG_IMPLICATION(wasm_interpret_all, wasm_lazy_compilation) 800 DEFINE_NEG_IMPLICATION(wasm_interpret_all, wasm_tier_up) 801 DEFINE_BOOL(wasm_code_gc, true, "enable garbage collection of wasm code") 802 DEFINE_BOOL(trace_wasm_code_gc, false, "trace garbage collection of wasm code") 803 DEFINE_BOOL(stress_wasm_code_gc, false, 804 "stress test garbage collection of wasm code") 805 DEFINE_INT(wasm_max_initial_code_space_reservation, 0, 806 "maximum size of the initial wasm code space reservation (in MB)") 807 808 // Profiler flags. 809 DEFINE_INT(frame_count, 1, "number of stack frames inspected by the profiler") 810 811 DEFINE_INT(stress_sampling_allocation_profiler, 0, 812 "Enables sampling allocation profiler with X as a sample interval") 813 814 // Garbage collections flags. 815 DEFINE_SIZE_T(min_semi_space_size, 0, 816 "min size of a semi-space (in MBytes), the new space consists of " 817 "two semi-spaces") 818 DEFINE_SIZE_T(max_semi_space_size, 0, 819 "max size of a semi-space (in MBytes), the new space consists of " 820 "two semi-spaces") 821 DEFINE_INT(semi_space_growth_factor, 2, "factor by which to grow the new space") 822 DEFINE_SIZE_T(max_old_space_size, 0, "max size of the old space (in Mbytes)") 823 DEFINE_SIZE_T( 824 max_heap_size, 0, 825 "max size of the heap (in Mbytes) " 826 "both max_semi_space_size and max_old_space_size take precedence. " 827 "All three flags cannot be specified at the same time.") 828 DEFINE_SIZE_T(initial_heap_size, 0, "initial size of the heap (in Mbytes)") 829 DEFINE_BOOL(huge_max_old_generation_size, true, 830 "Increase max size of the old space to 4 GB for x64 systems with" 831 "the physical memory bigger than 16 GB") 832 DEFINE_SIZE_T(initial_old_space_size, 0, "initial old space size (in Mbytes)") 833 DEFINE_BOOL(global_gc_scheduling, true, 834 "enable GC scheduling based on global memory") 835 DEFINE_BOOL(gc_global, false, "always perform global GCs") 836 DEFINE_INT(random_gc_interval, 0, 837 "Collect garbage after random(0, X) allocations. It overrides " 838 "gc_interval.") 839 DEFINE_INT(gc_interval, -1, "garbage collect after <n> allocations") 840 DEFINE_INT(retain_maps_for_n_gc, 2, 841 "keeps maps alive for <n> old space garbage collections") 842 DEFINE_BOOL(trace_gc, false, 843 "print one trace line following each garbage collection") 844 DEFINE_BOOL(trace_gc_nvp, false, 845 "print one detailed trace line in name=value format " 846 "after each garbage collection") 847 DEFINE_BOOL(trace_gc_ignore_scavenger, false, 848 "do not print trace line after scavenger collection") 849 DEFINE_BOOL(trace_idle_notification, false, 850 "print one trace line following each idle notification") 851 DEFINE_BOOL(trace_idle_notification_verbose, false, 852 "prints the heap state used by the idle notification") 853 DEFINE_BOOL(trace_gc_verbose, false, 854 "print more details following each garbage collection") 855 DEFINE_IMPLICATION(trace_gc_verbose, trace_gc) 856 DEFINE_BOOL(trace_gc_freelists, false, 857 "prints details of each freelist before and after " 858 "each major garbage collection") 859 DEFINE_BOOL(trace_gc_freelists_verbose, false, 860 "prints details of freelists of each page before and after " 861 "each major garbage collection") 862 DEFINE_IMPLICATION(trace_gc_freelists_verbose, trace_gc_freelists) 863 DEFINE_BOOL(trace_evacuation_candidates, false, 864 "Show statistics about the pages evacuation by the compaction") 865 DEFINE_BOOL( 866 trace_allocations_origins, false, 867 "Show statistics about the origins of allocations. " 868 "Combine with --no-inline-new to track allocations from generated code") 869 DEFINE_INT(gc_freelist_strategy, 5, 870 "Freelist strategy to use: " 871 "0:FreeListLegacy. " 872 "1:FreeListFastAlloc. " 873 "2:FreeListMany. " 874 "3:FreeListManyCached. " 875 "4:FreeListManyCachedFastPath. " 876 "5:FreeListManyCachedOrigin. ") 877 878 DEFINE_INT(trace_allocation_stack_interval, -1, 879 "print stack trace after <n> free-list allocations") 880 DEFINE_INT(trace_duplicate_threshold_kb, 0, 881 "print duplicate objects in the heap if their size is more than " 882 "given threshold") 883 DEFINE_BOOL(trace_fragmentation, false, "report fragmentation for old space") 884 DEFINE_BOOL(trace_fragmentation_verbose, false, 885 "report fragmentation for old space (detailed)") 886 DEFINE_BOOL(trace_evacuation, false, "report evacuation statistics") 887 DEFINE_BOOL(trace_mutator_utilization, false, 888 "print mutator utilization, allocation speed, gc speed") 889 DEFINE_BOOL(incremental_marking, true, "use incremental marking") 890 DEFINE_BOOL(incremental_marking_wrappers, true, 891 "use incremental marking for marking wrappers") 892 DEFINE_BOOL(trace_unmapper, false, "Trace the unmapping") 893 DEFINE_BOOL(parallel_scavenge, true, "parallel scavenge") 894 DEFINE_BOOL(trace_parallel_scavenge, false, "trace parallel scavenge") 895 DEFINE_BOOL(write_protect_code_memory, true, "write protect code memory") 896 #ifdef V8_CONCURRENT_MARKING 897 #define V8_CONCURRENT_MARKING_BOOL true 898 #else 899 #define V8_CONCURRENT_MARKING_BOOL false 900 #endif 901 DEFINE_BOOL(concurrent_marking, V8_CONCURRENT_MARKING_BOOL, 902 "use concurrent marking") 903 #ifdef V8_ARRAY_BUFFER_EXTENSION 904 #define V8_ARRAY_BUFFER_EXTENSION_BOOL true 905 #else 906 #define V8_ARRAY_BUFFER_EXTENSION_BOOL false 907 #endif 908 DEFINE_BOOL_READONLY(array_buffer_extension, V8_ARRAY_BUFFER_EXTENSION_BOOL, 909 "enable array buffer tracking using extension objects") 910 DEFINE_IMPLICATION(array_buffer_extension, always_promote_young_mc) 911 DEFINE_BOOL(concurrent_array_buffer_sweeping, true, 912 "concurrently sweep array buffers") 913 DEFINE_BOOL(local_heaps, false, "allow heap access from background tasks") 914 DEFINE_BOOL(parallel_marking, true, "use parallel marking in atomic pause") 915 DEFINE_INT(ephemeron_fixpoint_iterations, 10, 916 "number of fixpoint iterations it takes to switch to linear " 917 "ephemeron algorithm") 918 DEFINE_BOOL(trace_concurrent_marking, false, "trace concurrent marking") 919 DEFINE_BOOL(concurrent_store_buffer, true, 920 "use concurrent store buffer processing") 921 DEFINE_BOOL(concurrent_sweeping, true, "use concurrent sweeping") 922 DEFINE_BOOL(parallel_compaction, true, "use parallel compaction") 923 DEFINE_BOOL(parallel_pointer_update, true, 924 "use parallel pointer update during compaction") 925 DEFINE_BOOL(detect_ineffective_gcs_near_heap_limit, true, 926 "trigger out-of-memory failure to avoid GC storm near heap limit") 927 DEFINE_BOOL(trace_incremental_marking, false, 928 "trace progress of the incremental marking") 929 DEFINE_BOOL(trace_stress_marking, false, "trace stress marking progress") 930 DEFINE_BOOL(trace_stress_scavenge, false, "trace stress scavenge progress") 931 DEFINE_BOOL(track_gc_object_stats, false, 932 "track object counts and memory usage") 933 DEFINE_BOOL(trace_gc_object_stats, false, 934 "trace object counts and memory usage") 935 DEFINE_BOOL(trace_zone_stats, false, "trace zone memory usage") 936 DEFINE_BOOL(track_retaining_path, false, 937 "enable support for tracking retaining path") 938 DEFINE_DEBUG_BOOL(trace_backing_store, false, "trace backing store events") 939 DEFINE_BOOL(concurrent_array_buffer_freeing, true, 940 "free array buffer allocations on a background thread") 941 DEFINE_INT(gc_stats, 0, "Used by tracing internally to enable gc statistics") 942 DEFINE_IMPLICATION(trace_gc_object_stats, track_gc_object_stats) 943 DEFINE_GENERIC_IMPLICATION( 944 track_gc_object_stats, 945 TracingFlags::gc_stats.store( 946 v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) 947 DEFINE_GENERIC_IMPLICATION( 948 trace_gc_object_stats, 949 TracingFlags::gc_stats.store( 950 v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) 951 DEFINE_NEG_IMPLICATION(trace_gc_object_stats, incremental_marking) 952 DEFINE_NEG_IMPLICATION(track_retaining_path, incremental_marking) 953 DEFINE_NEG_IMPLICATION(track_retaining_path, parallel_marking) 954 DEFINE_NEG_IMPLICATION(track_retaining_path, concurrent_marking) 955 DEFINE_BOOL(track_detached_contexts, true, 956 "track native contexts that are expected to be garbage collected") 957 DEFINE_BOOL(trace_detached_contexts, false, 958 "trace native contexts that are expected to be garbage collected") 959 DEFINE_IMPLICATION(trace_detached_contexts, track_detached_contexts) 960 #ifdef VERIFY_HEAP 961 DEFINE_BOOL(verify_heap, false, "verify heap pointers before and after GC") 962 DEFINE_BOOL(verify_heap_skip_remembered_set, false, 963 "disable remembered set verification") 964 #endif 965 DEFINE_BOOL(move_object_start, true, "enable moving of object starts") 966 DEFINE_BOOL(memory_reducer, true, "use memory reducer") 967 DEFINE_BOOL(memory_reducer_for_small_heaps, true, 968 "use memory reducer for small heaps") 969 DEFINE_INT(heap_growing_percent, 0, 970 "specifies heap growing factor as (1 + heap_growing_percent/100)") 971 DEFINE_INT(v8_os_page_size, 0, "override OS page size (in KBytes)") 972 DEFINE_BOOL(always_compact, false, "Perform compaction on every full GC") 973 DEFINE_BOOL(never_compact, false, 974 "Never perform compaction on full GC - testing only") 975 DEFINE_BOOL(compact_code_space, true, "Compact code space on full collections") 976 DEFINE_BOOL(flush_bytecode, true, 977 "flush of bytecode when it has not been executed recently") 978 DEFINE_BOOL(stress_flush_bytecode, false, "stress bytecode flushing") 979 DEFINE_IMPLICATION(stress_flush_bytecode, flush_bytecode) 980 DEFINE_BOOL(use_marking_progress_bar, true, 981 "Use a progress bar to scan large objects in increments when " 982 "incremental marking is active.") 983 DEFINE_BOOL(stress_per_context_marking_worklist, false, 984 "Use per-context worklist for marking") 985 DEFINE_BOOL(force_marking_deque_overflows, false, 986 "force overflows of marking deque by reducing it's size " 987 "to 64 words") 988 DEFINE_BOOL(stress_compaction, false, 989 "stress the GC compactor to flush out bugs (implies " 990 "--force_marking_deque_overflows)") 991 DEFINE_BOOL(stress_compaction_random, false, 992 "Stress GC compaction by selecting random percent of pages as " 993 "evacuation candidates. It overrides stress_compaction.") 994 DEFINE_BOOL(stress_incremental_marking, false, 995 "force incremental marking for small heaps and run it more often") 996 997 DEFINE_BOOL(fuzzer_gc_analysis, false, 998 "prints number of allocations and enables analysis mode for gc " 999 "fuzz testing, e.g. --stress-marking, --stress-scavenge") 1000 DEFINE_INT(stress_marking, 0, 1001 "force marking at random points between 0 and X (inclusive) percent " 1002 "of the regular marking start limit") 1003 DEFINE_INT(stress_scavenge, 0, 1004 "force scavenge at random points between 0 and X (inclusive) " 1005 "percent of the new space capacity") 1006 DEFINE_IMPLICATION(fuzzer_gc_analysis, stress_marking) 1007 DEFINE_IMPLICATION(fuzzer_gc_analysis, stress_scavenge) 1008 1009 // These flags will be removed after experiments. Do not rely on them. 1010 DEFINE_BOOL(gc_experiment_background_schedule, false, 1011 "new background GC schedule heuristics") 1012 DEFINE_BOOL(gc_experiment_less_compaction, false, 1013 "less compaction in non-memory reducing mode") 1014 1015 DEFINE_BOOL(disable_abortjs, false, "disables AbortJS runtime function") 1016 1017 DEFINE_BOOL(randomize_all_allocations, false, 1018 "randomize virtual memory reservations by ignoring any hints " 1019 "passed when allocating pages") 1020 1021 DEFINE_BOOL(manual_evacuation_candidates_selection, false, 1022 "Test mode only flag. It allows an unit test to select evacuation " 1023 "candidates pages (requires --stress_compaction).") 1024 DEFINE_BOOL(fast_promotion_new_space, false, 1025 "fast promote new space on high survival rates") 1026 1027 DEFINE_BOOL(clear_free_memory, false, "initialize free memory with 0") 1028 1029 DEFINE_BOOL(young_generation_large_objects, true, 1030 "allocates large objects by default in the young generation large " 1031 "object space") 1032 1033 // assembler-ia32.cc / assembler-arm.cc / assembler-x64.cc 1034 DEFINE_BOOL(debug_code, DEBUG_BOOL, 1035 "generate extra code (assertions) for debugging") 1036 DEFINE_BOOL(code_comments, false, 1037 "emit comments in code disassembly; for more readable source " 1038 "positions you should add --no-concurrent_recompilation") 1039 DEFINE_BOOL(enable_sse3, true, "enable use of SSE3 instructions if available") 1040 DEFINE_BOOL(enable_ssse3, true, "enable use of SSSE3 instructions if available") 1041 DEFINE_BOOL(enable_sse4_1, true, 1042 "enable use of SSE4.1 instructions if available") 1043 DEFINE_BOOL(enable_sse4_2, true, 1044 "enable use of SSE4.2 instructions if available") 1045 DEFINE_BOOL(enable_sahf, true, 1046 "enable use of SAHF instruction if available (X64 only)") 1047 DEFINE_BOOL(enable_avx, true, "enable use of AVX instructions if available") 1048 DEFINE_BOOL(enable_fma3, true, "enable use of FMA3 instructions if available") 1049 DEFINE_BOOL(enable_bmi1, true, "enable use of BMI1 instructions if available") 1050 DEFINE_BOOL(enable_bmi2, true, "enable use of BMI2 instructions if available") 1051 DEFINE_BOOL(enable_lzcnt, true, "enable use of LZCNT instruction if available") 1052 DEFINE_BOOL(enable_popcnt, true, 1053 "enable use of POPCNT instruction if available") 1054 DEFINE_STRING(arm_arch, ARM_ARCH_DEFAULT, 1055 "generate instructions for the selected ARM architecture if " 1056 "available: armv6, armv7, armv7+sudiv or armv8") 1057 DEFINE_BOOL(force_long_branches, false, 1058 "force all emitted branches to be in long mode (MIPS/PPC only)") 1059 DEFINE_STRING(mcpu, "auto", "enable optimization for specific cpu") 1060 DEFINE_BOOL(partial_constant_pool, true, 1061 "enable use of partial constant pools (X64 only)") 1062 1063 // Controlling source positions for Torque/CSA code. 1064 DEFINE_BOOL(enable_source_at_csa_bind, false, 1065 "Include source information in the binary at CSA bind locations.") 1066 1067 // Deprecated ARM flags (replaced by arm_arch). 1068 DEFINE_MAYBE_BOOL(enable_armv7, "deprecated (use --arm_arch instead)") 1069 DEFINE_MAYBE_BOOL(enable_vfp3, "deprecated (use --arm_arch instead)") 1070 DEFINE_MAYBE_BOOL(enable_32dregs, "deprecated (use --arm_arch instead)") 1071 DEFINE_MAYBE_BOOL(enable_neon, "deprecated (use --arm_arch instead)") 1072 DEFINE_MAYBE_BOOL(enable_sudiv, "deprecated (use --arm_arch instead)") 1073 DEFINE_MAYBE_BOOL(enable_armv8, "deprecated (use --arm_arch instead)") 1074 1075 // regexp-macro-assembler-*.cc 1076 DEFINE_BOOL(enable_regexp_unaligned_accesses, true, 1077 "enable unaligned accesses for the regexp engine") 1078 1079 // api.cc 1080 DEFINE_BOOL(script_streaming, true, "enable parsing on background") 1081 DEFINE_BOOL( 1082 finalize_streaming_on_background, false, 1083 "perform the script streaming finalization on the background thread") 1084 DEFINE_BOOL(disable_old_api_accessors, false, 1085 "Disable old-style API accessors whose setters trigger through the " 1086 "prototype chain") 1087 1088 // bootstrapper.cc 1089 DEFINE_BOOL(expose_gc, false, "expose gc extension") 1090 DEFINE_STRING(expose_gc_as, nullptr, 1091 "expose gc extension under the specified name") 1092 DEFINE_IMPLICATION(expose_gc_as, expose_gc) 1093 DEFINE_BOOL(expose_externalize_string, false, 1094 "expose externalize string extension") 1095 DEFINE_BOOL(expose_trigger_failure, false, "expose trigger-failure extension") 1096 DEFINE_INT(stack_trace_limit, 10, "number of stack frames to capture") 1097 DEFINE_BOOL(builtins_in_stack_traces, false, 1098 "show built-in functions in stack traces") 1099 DEFINE_BOOL(experimental_stack_trace_frames, false, 1100 "enable experimental frames (API/Builtins) and stack trace layout") 1101 DEFINE_BOOL(disallow_code_generation_from_strings, false, 1102 "disallow eval and friends") 1103 DEFINE_BOOL(expose_async_hooks, false, "expose async_hooks object") 1104 DEFINE_STRING(expose_cputracemark_as, nullptr, 1105 "expose cputracemark extension under the specified name") 1106 #ifdef ENABLE_VTUNE_TRACEMARK 1107 DEFINE_BOOL(enable_vtune_domain_support, true, "enable vtune domain support") 1108 #endif // ENABLE_VTUNE_TRACEMARK 1109 1110 // builtins.cc 1111 DEFINE_BOOL(allow_unsafe_function_constructor, false, 1112 "allow invoking the function constructor without security checks") 1113 DEFINE_BOOL(force_slow_path, false, "always take the slow path for builtins") 1114 DEFINE_BOOL(test_small_max_function_context_stub_size, false, 1115 "enable testing the function context size overflow path " 1116 "by making the maximum size smaller") 1117 1118 DEFINE_BOOL(inline_new, true, "use fast inline allocation") 1119 DEFINE_NEG_NEG_IMPLICATION(inline_new, turbo_allocation_folding) 1120 1121 // codegen-ia32.cc / codegen-arm.cc 1122 DEFINE_BOOL(trace, false, "trace function calls") 1123 1124 // codegen.cc 1125 DEFINE_BOOL(lazy, true, "use lazy compilation") 1126 DEFINE_BOOL(max_lazy, false, "ignore eager compilation hints") 1127 DEFINE_IMPLICATION(max_lazy, lazy) 1128 DEFINE_BOOL(trace_opt, false, "trace lazy optimization") 1129 DEFINE_BOOL(trace_opt_verbose, false, "extra verbose compilation tracing") 1130 DEFINE_IMPLICATION(trace_opt_verbose, trace_opt) 1131 DEFINE_BOOL(trace_opt_stats, false, "trace lazy optimization statistics") 1132 DEFINE_BOOL(trace_deopt, false, "trace optimize function deoptimization") 1133 DEFINE_BOOL(trace_file_names, false, 1134 "include file names in trace-opt/trace-deopt output") 1135 DEFINE_BOOL(always_opt, false, "always try to optimize functions") 1136 DEFINE_BOOL(always_osr, false, "always try to OSR functions") 1137 DEFINE_BOOL(prepare_always_opt, false, "prepare for turning on always opt") 1138 1139 DEFINE_BOOL(trace_serializer, false, "print code serializer trace") 1140 #ifdef DEBUG 1141 DEFINE_BOOL(external_reference_stats, false, 1142 "print statistics on external references used during serialization") 1143 #endif // DEBUG 1144 1145 // compilation-cache.cc 1146 DEFINE_BOOL(compilation_cache, true, "enable compilation cache") 1147 1148 DEFINE_BOOL(cache_prototype_transitions, true, "cache prototype transitions") 1149 1150 // compiler-dispatcher.cc 1151 DEFINE_BOOL(parallel_compile_tasks, false, "enable parallel compile tasks") 1152 DEFINE_BOOL(compiler_dispatcher, false, "enable compiler dispatcher") 1153 DEFINE_IMPLICATION(parallel_compile_tasks, compiler_dispatcher) 1154 DEFINE_BOOL(trace_compiler_dispatcher, false, 1155 "trace compiler dispatcher activity") 1156 1157 // cpu-profiler.cc 1158 DEFINE_INT(cpu_profiler_sampling_interval, 1000, 1159 "CPU profiler sampling interval in microseconds") 1160 1161 // debugger 1162 DEFINE_BOOL( 1163 trace_side_effect_free_debug_evaluate, false, 1164 "print debug messages for side-effect-free debug-evaluate for testing") 1165 DEFINE_BOOL(hard_abort, true, "abort by crashing") 1166 1167 // inspector 1168 DEFINE_BOOL(expose_inspector_scripts, false, 1169 "expose injected-script-source.js for debugging") 1170 1171 // execution.cc 1172 DEFINE_INT(stack_size, V8_DEFAULT_STACK_SIZE_KB, 1173 "default size of stack region v8 is allowed to use (in kBytes)") 1174 1175 // frames.cc 1176 DEFINE_INT(max_stack_trace_source_length, 300, 1177 "maximum length of function source code printed in a stack trace.") 1178 1179 // execution.cc, messages.cc 1180 DEFINE_BOOL(clear_exceptions_on_js_entry, false, 1181 "clear pending exceptions when entering JavaScript") 1182 1183 // counters.cc 1184 DEFINE_INT(histogram_interval, 600000, 1185 "time interval in ms for aggregating memory histograms") 1186 1187 // heap-snapshot-generator.cc 1188 DEFINE_BOOL(heap_profiler_trace_objects, false, 1189 "Dump heap object allocations/movements/size_updates") 1190 DEFINE_BOOL(heap_profiler_use_embedder_graph, true, 1191 "Use the new EmbedderGraph API to get embedder nodes") 1192 DEFINE_INT(heap_snapshot_string_limit, 1024, 1193 "truncate strings to this length in the heap snapshot") 1194 1195 // sampling-heap-profiler.cc 1196 DEFINE_BOOL(sampling_heap_profiler_suppress_randomness, false, 1197 "Use constant sample intervals to eliminate test flakiness") 1198 1199 // v8.cc 1200 DEFINE_BOOL(use_idle_notification, true, 1201 "Use idle notification to reduce memory footprint.") 1202 // ic.cc 1203 DEFINE_BOOL(trace_ic, false, 1204 "trace inline cache state transitions for tools/ic-processor") 1205 DEFINE_IMPLICATION(trace_ic, log_code) 1206 DEFINE_GENERIC_IMPLICATION( 1207 trace_ic, TracingFlags::ic_stats.store( 1208 v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) 1209 DEFINE_BOOL_READONLY(fast_map_update, false, 1210 "enable fast map update by caching the migration target") 1211 DEFINE_BOOL(modify_field_representation_inplace, true, 1212 "enable in-place field representation updates") 1213 DEFINE_INT(max_polymorphic_map_count, 4, 1214 "maximum number of maps to track in POLYMORPHIC state") 1215 1216 DEFINE_BOOL(native_code_counters, DEBUG_BOOL, 1217 "generate extra code for manipulating stats counters") 1218 1219 // objects.cc 1220 DEFINE_BOOL(thin_strings, true, "Enable ThinString support") 1221 DEFINE_BOOL(trace_prototype_users, false, 1222 "Trace updates to prototype user tracking") 1223 DEFINE_BOOL(use_verbose_printer, true, "allows verbose printing") 1224 DEFINE_BOOL(trace_for_in_enumerate, false, "Trace for-in enumerate slow-paths") 1225 DEFINE_BOOL(trace_maps, false, "trace map creation") 1226 DEFINE_BOOL(trace_maps_details, true, "also log map details") 1227 DEFINE_IMPLICATION(trace_maps, log_code) 1228 1229 // parser.cc 1230 DEFINE_BOOL(allow_natives_syntax, false, "allow natives syntax") 1231 DEFINE_BOOL(allow_natives_for_fuzzing, false, 1232 "allow only natives explicitly whitelisted for fuzzers") 1233 DEFINE_BOOL(allow_natives_for_differential_fuzzing, false, 1234 "allow only natives explicitly whitelisted for differential " 1235 "fuzzers") 1236 DEFINE_IMPLICATION(allow_natives_for_differential_fuzzing, allow_natives_syntax) 1237 DEFINE_IMPLICATION(allow_natives_for_fuzzing, allow_natives_syntax) 1238 DEFINE_IMPLICATION(allow_natives_for_differential_fuzzing, 1239 allow_natives_for_fuzzing) 1240 DEFINE_BOOL(parse_only, false, "only parse the sources") 1241 1242 // simulator-arm.cc, simulator-arm64.cc and simulator-mips.cc 1243 DEFINE_BOOL(trace_sim, false, "Trace simulator execution") 1244 DEFINE_BOOL(debug_sim, false, "Enable debugging the simulator") 1245 DEFINE_BOOL(check_icache, false, 1246 "Check icache flushes in ARM and MIPS simulator") 1247 DEFINE_INT(stop_sim_at, 0, "Simulator stop after x number of instructions") 1248 #if defined(V8_TARGET_ARCH_ARM64) || defined(V8_TARGET_ARCH_MIPS64) || \ 1249 defined(V8_TARGET_ARCH_PPC64) 1250 DEFINE_INT(sim_stack_alignment, 16, 1251 "Stack alignment in bytes in simulator. This must be a power of two " 1252 "and it must be at least 16. 16 is default.") 1253 #else 1254 DEFINE_INT(sim_stack_alignment, 8, 1255 "Stack alingment in bytes in simulator (4 or 8, 8 is default)") 1256 #endif 1257 DEFINE_INT(sim_stack_size, 2 * MB / KB, 1258 "Stack size of the ARM64, MIPS64 and PPC64 simulator " 1259 "in kBytes (default is 2 MB)") 1260 DEFINE_BOOL(log_colour, ENABLE_LOG_COLOUR, 1261 "When logging, try to use coloured output.") 1262 DEFINE_BOOL(trace_sim_messages, false, 1263 "Trace simulator debug messages. Implied by --trace-sim.") 1264 1265 // isolate.cc 1266 DEFINE_BOOL(async_stack_traces, true, 1267 "include async stack traces in Error.stack") 1268 DEFINE_BOOL(stack_trace_on_illegal, false, 1269 "print stack trace when an illegal exception is thrown") 1270 DEFINE_BOOL(abort_on_uncaught_exception, false, 1271 "abort program (dump core) when an uncaught exception is thrown") 1272 DEFINE_BOOL(correctness_fuzzer_suppressions, false, 1273 "Suppress certain unspecified behaviors to ease correctness " 1274 "fuzzing: Abort program when the stack overflows or a string " 1275 "exceeds maximum length (as opposed to throwing RangeError). " 1276 "Use a fixed suppression string for error messages.") 1277 DEFINE_BOOL(randomize_hashes, true, 1278 "randomize hashes to avoid predictable hash collisions " 1279 "(with snapshots this option cannot override the baked-in seed)") 1280 DEFINE_BOOL(rehash_snapshot, true, 1281 "rehash strings from the snapshot to override the baked-in seed") 1282 DEFINE_UINT64(hash_seed, 0, 1283 "Fixed seed to use to hash property keys (0 means random)" 1284 "(with snapshots this option cannot override the baked-in seed)") 1285 DEFINE_INT(random_seed, 0, 1286 "Default seed for initializing random generator " 1287 "(0, the default, means to use system random).") 1288 DEFINE_INT(fuzzer_random_seed, 0, 1289 "Default seed for initializing fuzzer random generator " 1290 "(0, the default, means to use v8's random number generator seed).") 1291 DEFINE_BOOL(trace_rail, false, "trace RAIL mode") 1292 DEFINE_BOOL(print_all_exceptions, false, 1293 "print exception object and stack trace on each thrown exception") 1294 DEFINE_BOOL( 1295 detailed_error_stack_trace, false, 1296 "includes arguments for each function call in the error stack frames array") 1297 DEFINE_BOOL(adjust_os_scheduling_parameters, true, 1298 "adjust OS specific scheduling params for the isolate") 1299 1300 // runtime.cc 1301 DEFINE_BOOL(runtime_call_stats, false, "report runtime call counts and times") 1302 DEFINE_GENERIC_IMPLICATION( 1303 runtime_call_stats, 1304 TracingFlags::runtime_stats.store( 1305 v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) 1306 DEFINE_BOOL(rcs, false, "report runtime call counts and times") 1307 DEFINE_IMPLICATION(rcs, runtime_call_stats) 1308 1309 DEFINE_BOOL(rcs_cpu_time, false, 1310 "report runtime times in cpu time (the default is wall time)") 1311 DEFINE_IMPLICATION(rcs_cpu_time, rcs) 1312 1313 // snapshot-common.cc 1314 DEFINE_BOOL(profile_deserialization, false, 1315 "Print the time it takes to deserialize the snapshot.") 1316 DEFINE_BOOL(serialization_statistics, false, 1317 "Collect statistics on serialized objects.") 1318 #ifdef V8_ENABLE_THIRD_PARTY_HEAP 1319 DEFINE_UINT_READONLY(serialization_chunk_size, 1, 1320 "Custom size for serialization chunks") 1321 #else 1322 DEFINE_UINT(serialization_chunk_size, 4096, 1323 "Custom size for serialization chunks") 1324 #endif 1325 // Regexp 1326 DEFINE_BOOL(regexp_optimization, true, "generate optimized regexp code") 1327 DEFINE_BOOL(regexp_mode_modifiers, false, "enable inline flags in regexp.") 1328 DEFINE_BOOL(regexp_interpret_all, false, "interpret all regexp code") 1329 #ifdef V8_TARGET_BIG_ENDIAN 1330 #define REGEXP_PEEPHOLE_OPTIMIZATION_BOOL false 1331 #else 1332 #define REGEXP_PEEPHOLE_OPTIMIZATION_BOOL true 1333 #endif 1334 DEFINE_BOOL(regexp_tier_up, true, 1335 "enable regexp interpreter and tier up to the compiler after the " 1336 "number of executions set by the tier up ticks flag") 1337 DEFINE_INT(regexp_tier_up_ticks, 1, 1338 "set the number of executions for the regexp interpreter before " 1339 "tiering-up to the compiler") 1340 DEFINE_BOOL(regexp_peephole_optimization, REGEXP_PEEPHOLE_OPTIMIZATION_BOOL, 1341 "enable peephole optimization for regexp bytecode") 1342 DEFINE_BOOL(trace_regexp_peephole_optimization, false, 1343 "trace regexp bytecode peephole optimization") 1344 DEFINE_BOOL(trace_regexp_bytecodes, false, "trace regexp bytecode execution") 1345 DEFINE_BOOL(trace_regexp_assembler, false, 1346 "trace regexp macro assembler calls.") 1347 DEFINE_BOOL(trace_regexp_parser, false, "trace regexp parsing") 1348 DEFINE_BOOL(trace_regexp_tier_up, false, "trace regexp tiering up execution") 1349 1350 // Testing flags test/cctest/test-{flags,api,serialization}.cc 1351 DEFINE_BOOL(testing_bool_flag, true, "testing_bool_flag") 1352 DEFINE_MAYBE_BOOL(testing_maybe_bool_flag, "testing_maybe_bool_flag") 1353 DEFINE_INT(testing_int_flag, 13, "testing_int_flag") 1354 DEFINE_FLOAT(testing_float_flag, 2.5, "float-flag") 1355 DEFINE_STRING(testing_string_flag, "Hello, world!", "string-flag") 1356 DEFINE_INT(testing_prng_seed, 42, "Seed used for threading test randomness") 1357 1358 // Test flag for a check in %OptimizeFunctionOnNextCall 1359 DEFINE_BOOL( 1360 testing_d8_test_runner, false, 1361 "test runner turns on this flag to enable a check that the funciton was " 1362 "prepared for optimization before marking it for optimization") 1363 1364 // mksnapshot.cc 1365 DEFINE_STRING(embedded_src, nullptr, 1366 "Path for the generated embedded data file. (mksnapshot only)") 1367 DEFINE_STRING( 1368 embedded_variant, nullptr, 1369 "Label to disambiguate symbols in embedded data file. (mksnapshot only)") 1370 DEFINE_STRING(startup_src, nullptr, 1371 "Write V8 startup as C++ src. (mksnapshot only)") 1372 DEFINE_STRING(startup_blob, nullptr, 1373 "Write V8 startup blob file. (mksnapshot only)") 1374 DEFINE_STRING(target_arch, nullptr, 1375 "The mksnapshot target arch. (mksnapshot only)") 1376 DEFINE_STRING(target_os, nullptr, "The mksnapshot target os. (mksnapshot only)") 1377 DEFINE_BOOL(target_is_simulator, false, 1378 "Instruct mksnapshot that the target is meant to run in the " 1379 "simulator and it can generate simulator-specific instructions. " 1380 "(mksnapshot only)") 1381 1382 // 1383 // Minor mark compact collector flags. 1384 // 1385 #ifdef ENABLE_MINOR_MC 1386 DEFINE_BOOL(minor_mc_parallel_marking, true, 1387 "use parallel marking for the young generation") 1388 DEFINE_BOOL(trace_minor_mc_parallel_marking, false, 1389 "trace parallel marking for the young generation") 1390 DEFINE_BOOL(minor_mc, false, "perform young generation mark compact GCs") 1391 #else 1392 DEFINE_BOOL_READONLY(minor_mc, false, 1393 "perform young generation mark compact GCs") 1394 #endif // ENABLE_MINOR_MC 1395 1396 // 1397 // Dev shell flags 1398 // 1399 1400 DEFINE_BOOL(help, false, "Print usage message, including flags, on console") 1401 DEFINE_BOOL(dump_counters, false, "Dump counters on exit") 1402 DEFINE_BOOL(dump_counters_nvp, false, 1403 "Dump counters as name-value pairs on exit") 1404 DEFINE_BOOL(use_external_strings, false, "Use external strings for source code") 1405 1406 DEFINE_STRING(map_counters, "", "Map counters to a file") 1407 DEFINE_BOOL(mock_arraybuffer_allocator, false, 1408 "Use a mock ArrayBuffer allocator for testing.") 1409 DEFINE_SIZE_T(mock_arraybuffer_allocator_limit, 0, 1410 "Memory limit for mock ArrayBuffer allocator used to simulate " 1411 "OOM for testing.") 1412 #if V8_OS_LINUX 1413 DEFINE_BOOL(multi_mapped_mock_allocator, false, 1414 "Use a multi-mapped mock ArrayBuffer allocator for testing.") 1415 #endif 1416 1417 // Flags for Wasm GDB remote debugging. 1418 #ifdef V8_ENABLE_WASM_GDB_REMOTE_DEBUGGING 1419 #define DEFAULT_WASM_GDB_REMOTE_PORT 8765 1420 DEFINE_BOOL(wasm_gdb_remote, false, 1421 "enable GDB-remote for WebAssembly debugging") 1422 DEFINE_INT(wasm_gdb_remote_port, DEFAULT_WASM_GDB_REMOTE_PORT, 1423 "default port for WebAssembly debugging with LLDB.") 1424 DEFINE_BOOL(wasm_pause_waiting_for_debugger, false, 1425 "pause at the first Webassembly instruction waiting for a debugger " 1426 "to attach") 1427 #endif // V8_ENABLE_WASM_GDB_REMOTE_DEBUGGING 1428 1429 // 1430 // GDB JIT integration flags. 1431 // 1432 #undef FLAG 1433 #ifdef ENABLE_GDB_JIT_INTERFACE 1434 #define FLAG FLAG_FULL 1435 #else 1436 #define FLAG FLAG_READONLY 1437 #endif 1438 1439 DEFINE_BOOL(gdbjit, false, "enable GDBJIT interface") 1440 DEFINE_BOOL(gdbjit_full, false, "enable GDBJIT interface for all code objects") 1441 DEFINE_BOOL(gdbjit_dump, false, "dump elf objects with debug info to disk") 1442 DEFINE_STRING(gdbjit_dump_filter, "", 1443 "dump only objects containing this substring") 1444 1445 #ifdef ENABLE_GDB_JIT_INTERFACE 1446 DEFINE_IMPLICATION(gdbjit_full, gdbjit) 1447 DEFINE_IMPLICATION(gdbjit_dump, gdbjit) 1448 #endif 1449 DEFINE_NEG_IMPLICATION(gdbjit, compact_code_space) 1450 1451 // 1452 // Debug only flags 1453 // 1454 #undef FLAG 1455 #ifdef DEBUG 1456 #define FLAG FLAG_FULL 1457 #else 1458 #define FLAG FLAG_READONLY 1459 #endif 1460 1461 // checks.cc 1462 #ifdef ENABLE_SLOW_DCHECKS 1463 DEFINE_BOOL(enable_slow_asserts, true, 1464 "enable asserts that are slow to execute") 1465 #endif 1466 1467 // codegen-ia32.cc / codegen-arm.cc / macro-assembler-*.cc 1468 DEFINE_BOOL(print_ast, false, "print source AST") 1469 DEFINE_BOOL(trap_on_abort, false, "replace aborts by breakpoints") 1470 1471 // compiler.cc 1472 DEFINE_BOOL(print_scopes, false, "print scopes") 1473 1474 // contexts.cc 1475 DEFINE_BOOL(trace_contexts, false, "trace contexts operations") 1476 1477 // heap.cc 1478 DEFINE_BOOL(gc_verbose, false, "print stuff during garbage collection") 1479 DEFINE_BOOL(code_stats, false, "report code statistics after GC") 1480 DEFINE_BOOL(print_handles, false, "report handles after GC") 1481 DEFINE_BOOL(check_handle_count, false, 1482 "Check that there are not too many handles at GC") 1483 DEFINE_BOOL(print_global_handles, false, "report global handles after GC") 1484 1485 // TurboFan debug-only flags. 1486 DEFINE_BOOL(trace_turbo_escape, false, "enable tracing in escape analysis") 1487 1488 // objects.cc 1489 DEFINE_BOOL(trace_module_status, false, 1490 "Trace status transitions of ECMAScript modules") 1491 DEFINE_BOOL(trace_normalization, false, 1492 "prints when objects are turned into dictionaries.") 1493 1494 // runtime.cc 1495 DEFINE_BOOL(trace_lazy, false, "trace lazy compilation") 1496 1497 // spaces.cc 1498 DEFINE_BOOL(collect_heap_spill_statistics, false, 1499 "report heap spill statistics along with heap_stats " 1500 "(requires heap_stats)") 1501 DEFINE_BOOL(trace_isolates, false, "trace isolate state changes") 1502 1503 // Regexp 1504 DEFINE_BOOL(regexp_possessive_quantifier, false, 1505 "enable possessive quantifier syntax for testing") 1506 1507 // Debugger 1508 DEFINE_BOOL(print_break_location, false, "print source location on debug break") 1509 1510 // wasm instance management 1511 DEFINE_DEBUG_BOOL(trace_wasm_instances, false, 1512 "trace creation and collection of wasm instances") 1513 1514 #ifdef V8_ENABLE_WASM_GDB_REMOTE_DEBUGGING 1515 DEFINE_BOOL(trace_wasm_gdb_remote, false, "trace Webassembly GDB-remote server") 1516 #endif // V8_ENABLE_WASM_GDB_REMOTE_DEBUGGING 1517 1518 // 1519 // Logging and profiling flags 1520 // 1521 #undef FLAG 1522 #define FLAG FLAG_FULL 1523 1524 // log.cc 1525 DEFINE_BOOL(log, false, 1526 "Minimal logging (no API, code, GC, suspect, or handles samples).") 1527 DEFINE_BOOL(log_all, false, "Log all events to the log file.") 1528 DEFINE_BOOL(log_api, false, "Log API events to the log file.") 1529 DEFINE_BOOL(log_code, false, 1530 "Log code events to the log file without profiling.") 1531 DEFINE_BOOL(log_handles, false, "Log global handle events.") 1532 DEFINE_BOOL(log_suspect, false, "Log suspect operations.") 1533 DEFINE_BOOL(log_source_code, false, "Log source code.") 1534 DEFINE_BOOL(log_function_events, false, 1535 "Log function events " 1536 "(parse, compile, execute) separately.") 1537 DEFINE_BOOL(prof, false, 1538 "Log statistical profiling information (implies --log-code).") 1539 1540 DEFINE_BOOL(detailed_line_info, false, 1541 "Always generate detailed line information for CPU profiling.") 1542 1543 #if defined(ANDROID) 1544 // Phones and tablets have processors that are much slower than desktop 1545 // and laptop computers for which current heuristics are tuned. 1546 #define DEFAULT_PROF_SAMPLING_INTERVAL 5000 1547 #else 1548 #define DEFAULT_PROF_SAMPLING_INTERVAL 1000 1549 #endif 1550 DEFINE_INT(prof_sampling_interval, DEFAULT_PROF_SAMPLING_INTERVAL, 1551 "Interval for --prof samples (in microseconds).") 1552 #undef DEFAULT_PROF_SAMPLING_INTERVAL 1553 1554 DEFINE_BOOL(prof_cpp, false, "Like --prof, but ignore generated code.") 1555 DEFINE_IMPLICATION(prof, prof_cpp) 1556 DEFINE_BOOL(prof_browser_mode, true, 1557 "Used with --prof, turns on browser-compatible mode for profiling.") 1558 DEFINE_STRING(logfile, "v8.log", "Specify the name of the log file.") 1559 DEFINE_BOOL(logfile_per_isolate, true, "Separate log files for each isolate.") 1560 DEFINE_BOOL(ll_prof, false, "Enable low-level linux profiler.") 1561 1562 #if V8_OS_LINUX 1563 #define DEFINE_PERF_PROF_BOOL(nam, cmt) DEFINE_BOOL(nam, false, cmt) 1564 #define DEFINE_PERF_PROF_IMPLICATION DEFINE_IMPLICATION 1565 #else 1566 #define DEFINE_PERF_PROF_BOOL(nam, cmt) DEFINE_BOOL_READONLY(nam, false, cmt) 1567 #define DEFINE_PERF_PROF_IMPLICATION(...) 1568 #endif 1569 1570 DEFINE_PERF_PROF_BOOL(perf_basic_prof, 1571 "Enable perf linux profiler (basic support).") 1572 DEFINE_NEG_IMPLICATION(perf_basic_prof, compact_code_space) 1573 DEFINE_PERF_PROF_BOOL( 1574 perf_basic_prof_only_functions, 1575 "Only report function code ranges to perf (i.e. no stubs).") 1576 DEFINE_PERF_PROF_IMPLICATION(perf_basic_prof_only_functions, perf_basic_prof) 1577 DEFINE_PERF_PROF_BOOL( 1578 perf_prof, "Enable perf linux profiler (experimental annotate support).") 1579 DEFINE_PERF_PROF_BOOL( 1580 perf_prof_annotate_wasm, 1581 "Used with --perf-prof, load wasm source map and provide annotate " 1582 "support (experimental).") 1583 DEFINE_PERF_PROF_BOOL( 1584 perf_prof_delete_file, 1585 "Remove the perf file right after creating it (for testing only).") 1586 DEFINE_NEG_IMPLICATION(perf_prof, compact_code_space) 1587 // TODO(v8:8462) Remove implication once perf supports remapping. 1588 DEFINE_NEG_IMPLICATION(perf_prof, write_protect_code_memory) 1589 DEFINE_NEG_IMPLICATION(perf_prof, wasm_write_protect_code_memory) 1590 1591 // --perf-prof-unwinding-info is available only on selected architectures. 1592 #if !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_X64 && \ 1593 !V8_TARGET_ARCH_S390X && !V8_TARGET_ARCH_PPC64 1594 #undef DEFINE_PERF_PROF_BOOL 1595 #define DEFINE_PERF_PROF_BOOL(nam, cmt) DEFINE_BOOL_READONLY(nam, false, cmt) 1596 #undef DEFINE_PERF_PROF_IMPLICATION 1597 #define DEFINE_PERF_PROF_IMPLICATION(...) 1598 #endif 1599 1600 DEFINE_PERF_PROF_BOOL( 1601 perf_prof_unwinding_info, 1602 "Enable unwinding info for perf linux profiler (experimental).") 1603 DEFINE_PERF_PROF_IMPLICATION(perf_prof, perf_prof_unwinding_info) 1604 1605 #undef DEFINE_PERF_PROF_BOOL 1606 #undef DEFINE_PERF_PROF_IMPLICATION 1607 1608 DEFINE_STRING(gc_fake_mmap, "/tmp/__v8_gc__", 1609 "Specify the name of the file for fake gc mmap used in ll_prof") 1610 DEFINE_BOOL(log_internal_timer_events, false, "Time internal events.") 1611 DEFINE_IMPLICATION(log_internal_timer_events, prof) 1612 1613 DEFINE_BOOL(redirect_code_traces, false, 1614 "output deopt information and disassembly into file " 1615 "code-<pid>-<isolate id>.asm") 1616 DEFINE_STRING(redirect_code_traces_to, nullptr, 1617 "output deopt information and disassembly into the given file") 1618 1619 DEFINE_BOOL(print_opt_source, false, 1620 "print source code of optimized and inlined functions") 1621 1622 DEFINE_BOOL(vtune_prof_annotate_wasm, false, 1623 "Used when v8_enable_vtunejit is enabled, load wasm source map and " 1624 "provide annotate support (experimental).") 1625 1626 DEFINE_BOOL(win64_unwinding_info, true, "Enable unwinding info for Windows/x64") 1627 1628 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_S390X) 1629 // Unsupported on above architectures. See https://crbug.com/v8/8713. 1630 DEFINE_BOOL_READONLY( 1631 interpreted_frames_native_stack, false, 1632 "Show interpreted frames on the native stack (useful for external " 1633 "profilers).") 1634 #else 1635 DEFINE_BOOL(interpreted_frames_native_stack, false, 1636 "Show interpreted frames on the native stack (useful for external " 1637 "profilers).") 1638 #endif 1639 1640 // 1641 // Disassembler only flags 1642 // 1643 #undef FLAG 1644 #ifdef ENABLE_DISASSEMBLER 1645 #define FLAG FLAG_FULL 1646 #else 1647 #define FLAG FLAG_READONLY 1648 #endif 1649 1650 // elements.cc 1651 DEFINE_BOOL(trace_elements_transitions, false, "trace elements transitions") 1652 1653 DEFINE_BOOL(trace_creation_allocation_sites, false, 1654 "trace the creation of allocation sites") 1655 1656 DEFINE_BOOL(print_code, false, "print generated code") 1657 DEFINE_BOOL(print_opt_code, false, "print optimized code") 1658 DEFINE_STRING(print_opt_code_filter, "*", "filter for printing optimized code") 1659 DEFINE_BOOL(print_code_verbose, false, "print more information for code") 1660 DEFINE_BOOL(print_builtin_code, false, "print generated code for builtins") 1661 DEFINE_STRING(print_builtin_code_filter, "*", 1662 "filter for printing builtin code") 1663 DEFINE_BOOL(print_regexp_code, false, "print generated regexp code") 1664 DEFINE_BOOL(print_regexp_bytecode, false, "print generated regexp bytecode") 1665 DEFINE_BOOL(print_builtin_size, false, "print code size for builtins") 1666 1667 #ifdef ENABLE_DISASSEMBLER 1668 DEFINE_BOOL(sodium, false, 1669 "print generated code output suitable for use with " 1670 "the Sodium code viewer") 1671 1672 DEFINE_IMPLICATION(sodium, print_code) 1673 DEFINE_IMPLICATION(sodium, print_opt_code) 1674 DEFINE_IMPLICATION(sodium, code_comments) 1675 1676 DEFINE_BOOL(print_all_code, false, "enable all flags related to printing code") 1677 DEFINE_IMPLICATION(print_all_code, print_code) 1678 DEFINE_IMPLICATION(print_all_code, print_opt_code) 1679 DEFINE_IMPLICATION(print_all_code, print_code_verbose) 1680 DEFINE_IMPLICATION(print_all_code, print_builtin_code) 1681 DEFINE_IMPLICATION(print_all_code, print_regexp_code) 1682 DEFINE_IMPLICATION(print_all_code, code_comments) 1683 #endif 1684 1685 #undef FLAG 1686 #define FLAG FLAG_FULL 1687 1688 // 1689 // Predictable mode related flags. 1690 // 1691 1692 DEFINE_BOOL(predictable, false, "enable predictable mode") 1693 DEFINE_IMPLICATION(predictable, single_threaded) 1694 DEFINE_NEG_IMPLICATION(predictable, memory_reducer) 1695 DEFINE_VALUE_IMPLICATION(single_threaded, wasm_num_compilation_tasks, 0) 1696 DEFINE_NEG_IMPLICATION(single_threaded, wasm_async_compilation) 1697 1698 DEFINE_BOOL(predictable_gc_schedule, false, 1699 "Predictable garbage collection schedule. Fixes heap growing, " 1700 "idle, and memory reducing behavior.") 1701 DEFINE_VALUE_IMPLICATION(predictable_gc_schedule, min_semi_space_size, 4) 1702 DEFINE_VALUE_IMPLICATION(predictable_gc_schedule, max_semi_space_size, 4) 1703 DEFINE_VALUE_IMPLICATION(predictable_gc_schedule, heap_growing_percent, 30) 1704 DEFINE_NEG_IMPLICATION(predictable_gc_schedule, memory_reducer) 1705 1706 // 1707 // Threading related flags. 1708 // 1709 1710 DEFINE_BOOL(single_threaded, false, "disable the use of background tasks") 1711 DEFINE_IMPLICATION(single_threaded, single_threaded_gc) 1712 DEFINE_NEG_IMPLICATION(single_threaded, concurrent_recompilation) 1713 DEFINE_NEG_IMPLICATION(single_threaded, compiler_dispatcher) 1714 1715 // 1716 // Parallel and concurrent GC (Orinoco) related flags. 1717 // 1718 DEFINE_BOOL(single_threaded_gc, false, "disable the use of background gc tasks") 1719 DEFINE_NEG_IMPLICATION(single_threaded_gc, concurrent_marking) 1720 DEFINE_NEG_IMPLICATION(single_threaded_gc, concurrent_sweeping) 1721 DEFINE_NEG_IMPLICATION(single_threaded_gc, parallel_compaction) 1722 DEFINE_NEG_IMPLICATION(single_threaded_gc, parallel_marking) 1723 DEFINE_NEG_IMPLICATION(single_threaded_gc, parallel_pointer_update) 1724 DEFINE_NEG_IMPLICATION(single_threaded_gc, parallel_scavenge) 1725 DEFINE_NEG_IMPLICATION(single_threaded_gc, concurrent_store_buffer) 1726 #ifdef ENABLE_MINOR_MC 1727 DEFINE_NEG_IMPLICATION(single_threaded_gc, minor_mc_parallel_marking) 1728 #endif // ENABLE_MINOR_MC 1729 DEFINE_NEG_IMPLICATION(single_threaded_gc, concurrent_array_buffer_freeing) 1730 DEFINE_NEG_IMPLICATION(single_threaded_gc, concurrent_array_buffer_sweeping) 1731 1732 #undef FLAG 1733 1734 #ifdef VERIFY_PREDICTABLE 1735 #define FLAG FLAG_FULL 1736 #else 1737 #define FLAG FLAG_READONLY 1738 #endif 1739 1740 DEFINE_BOOL(verify_predictable, false, 1741 "this mode is used for checking that V8 behaves predictably") 1742 DEFINE_INT(dump_allocations_digest_at_alloc, -1, 1743 "dump allocations digest each n-th allocation") 1744 1745 // 1746 // Read-only flags 1747 // 1748 #undef FLAG 1749 #define FLAG FLAG_READONLY 1750 1751 // assembler.h 1752 DEFINE_BOOL(enable_embedded_constant_pool, V8_EMBEDDED_CONSTANT_POOL, 1753 "enable use of embedded constant pools (PPC only)") 1754 1755 DEFINE_BOOL(unbox_double_fields, V8_DOUBLE_FIELDS_UNBOXING, 1756 "enable in-object double fields unboxing (64-bit only)") 1757 DEFINE_IMPLICATION(unbox_double_fields, track_double_fields) 1758 1759 // Cleanup... 1760 #undef FLAG_FULL 1761 #undef FLAG_READONLY 1762 #undef FLAG 1763 #undef FLAG_ALIAS 1764 1765 #undef DEFINE_BOOL 1766 #undef DEFINE_MAYBE_BOOL 1767 #undef DEFINE_DEBUG_BOOL 1768 #undef DEFINE_INT 1769 #undef DEFINE_STRING 1770 #undef DEFINE_FLOAT 1771 #undef DEFINE_IMPLICATION 1772 #undef DEFINE_NEG_IMPLICATION 1773 #undef DEFINE_NEG_VALUE_IMPLICATION 1774 #undef DEFINE_VALUE_IMPLICATION 1775 #undef DEFINE_GENERIC_IMPLICATION 1776 #undef DEFINE_ALIAS_BOOL 1777 #undef DEFINE_ALIAS_INT 1778 #undef DEFINE_ALIAS_STRING 1779 #undef DEFINE_ALIAS_FLOAT 1780 1781 #undef FLAG_MODE_DECLARE 1782 #undef FLAG_MODE_DEFINE 1783 #undef FLAG_MODE_DEFINE_DEFAULTS 1784 #undef FLAG_MODE_META 1785 #undef FLAG_MODE_DEFINE_IMPLICATIONS 1786 #undef FLAG_MODE_APPLY 1787 1788 #undef COMMA 1789