LCOV - code coverage report
Current view: top level - src - flag-definitions.h (source / functions) Hit Total Coverage
Test: app.info Lines: 91 91 100.0 %
Date: 2019-01-20 Functions: 0 0 -

          Line data    Source code
       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             :   ,
      57             : #define FLAG_ALIAS(ftype, ctype, alias, nam)                     \
      58             :   {                                                              \
      59             :     Flag::TYPE_##ftype, #alias, &FLAG_##nam, &FLAGDEFAULT_##nam, \
      60             :         "alias for --" #nam, false                               \
      61             :   }                                                              \
      62             :   ,
      63             : 
      64             : // We produce the code to set flags when it is implied by another flag.
      65             : #elif defined(FLAG_MODE_DEFINE_IMPLICATIONS)
      66             : #define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value) \
      67             :   if (FLAG_##whenflag) FLAG_##thenflag = value;
      68             : 
      69             : #define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value) \
      70             :   if (!FLAG_##whenflag) FLAG_##thenflag = value;
      71             : 
      72             : #else
      73             : #error No mode supplied when including flags.defs
      74             : #endif
      75             : 
      76             : // Dummy defines for modes where it is not relevant.
      77             : #ifndef FLAG_FULL
      78             : #define FLAG_FULL(ftype, ctype, nam, def, cmt)
      79             : #endif
      80             : 
      81             : #ifndef FLAG_READONLY
      82             : #define FLAG_READONLY(ftype, ctype, nam, def, cmt)
      83             : #endif
      84             : 
      85             : #ifndef FLAG_ALIAS
      86             : #define FLAG_ALIAS(ftype, ctype, alias, nam)
      87             : #endif
      88             : 
      89             : #ifndef DEFINE_VALUE_IMPLICATION
      90             : #define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value)
      91             : #endif
      92             : 
      93             : #ifndef DEFINE_NEG_VALUE_IMPLICATION
      94             : #define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value)
      95             : #endif
      96             : 
      97             : #define COMMA ,
      98             : 
      99             : #ifdef FLAG_MODE_DECLARE
     100             : 
     101             : struct MaybeBoolFlag {
     102             :   static MaybeBoolFlag Create(bool has_value, bool value) {
     103             :     MaybeBoolFlag flag;
     104             :     flag.has_value = has_value;
     105          25 :     flag.value = value;
     106             :     return flag;
     107             :   }
     108             :   bool has_value;
     109             :   bool value;
     110             : };
     111             : #endif
     112             : 
     113             : #ifdef DEBUG
     114             : #define DEBUG_BOOL true
     115             : #else
     116             : #define DEBUG_BOOL false
     117             : #endif
     118             : 
     119             : #ifdef V8_COMPRESS_POINTERS
     120             : #define COMPRESS_POINTERS_BOOL true
     121             : #else
     122             : #define COMPRESS_POINTERS_BOOL false
     123             : #endif
     124             : 
     125             : // Supported ARM configurations are:
     126             : //  "armv6":       ARMv6 + VFPv2
     127             : //  "armv7":       ARMv7 + VFPv3-D32 + NEON
     128             : //  "armv7+sudiv": ARMv7 + VFPv4-D32 + NEON + SUDIV
     129             : //  "armv8":       ARMv8 (including all of the above)
     130             : #if !defined(ARM_TEST_NO_FEATURE_PROBE) ||                            \
     131             :     (defined(CAN_USE_ARMV8_INSTRUCTIONS) &&                           \
     132             :      defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(CAN_USE_SUDIV) && \
     133             :      defined(CAN_USE_NEON) && defined(CAN_USE_VFP3_INSTRUCTIONS))
     134             : #define ARM_ARCH_DEFAULT "armv8"
     135             : #elif defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(CAN_USE_SUDIV) && \
     136             :     defined(CAN_USE_NEON) && defined(CAN_USE_VFP3_INSTRUCTIONS)
     137             : #define ARM_ARCH_DEFAULT "armv7+sudiv"
     138             : #elif defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(CAN_USE_NEON) && \
     139             :     defined(CAN_USE_VFP3_INSTRUCTIONS)
     140             : #define ARM_ARCH_DEFAULT "armv7"
     141             : #else
     142             : #define ARM_ARCH_DEFAULT "armv6"
     143             : #endif
     144             : 
     145             : #ifdef V8_OS_WIN
     146             : # define ENABLE_LOG_COLOUR false
     147             : #else
     148             : # define ENABLE_LOG_COLOUR true
     149             : #endif
     150             : 
     151             : #define DEFINE_BOOL(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt)
     152             : #define DEFINE_BOOL_READONLY(nam, def, cmt) \
     153             :   FLAG_READONLY(BOOL, bool, nam, def, cmt)
     154             : #define DEFINE_MAYBE_BOOL(nam, cmt) \
     155             :   FLAG(MAYBE_BOOL, MaybeBoolFlag, nam, {false COMMA false}, cmt)
     156             : #define DEFINE_INT(nam, def, cmt) FLAG(INT, int, nam, def, cmt)
     157             : #define DEFINE_UINT(nam, def, cmt) FLAG(UINT, unsigned int, nam, def, cmt)
     158             : #define DEFINE_UINT64(nam, def, cmt) FLAG(UINT64, uint64_t, nam, def, cmt)
     159             : #define DEFINE_FLOAT(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt)
     160             : #define DEFINE_SIZE_T(nam, def, cmt) FLAG(SIZE_T, size_t, nam, def, cmt)
     161             : #define DEFINE_STRING(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt)
     162             : #define DEFINE_ALIAS_BOOL(alias, nam) FLAG_ALIAS(BOOL, bool, alias, nam)
     163             : #define DEFINE_ALIAS_INT(alias, nam) FLAG_ALIAS(INT, int, alias, nam)
     164             : #define DEFINE_ALIAS_FLOAT(alias, nam) FLAG_ALIAS(FLOAT, double, alias, nam)
     165             : #define DEFINE_ALIAS_SIZE_T(alias, nam) FLAG_ALIAS(SIZE_T, size_t, alias, nam)
     166             : #define DEFINE_ALIAS_STRING(alias, nam) \
     167             :   FLAG_ALIAS(STRING, const char*, alias, nam)
     168             : 
     169             : #ifdef DEBUG
     170             : #define DEFINE_DEBUG_BOOL DEFINE_BOOL
     171             : #else
     172             : #define DEFINE_DEBUG_BOOL DEFINE_BOOL_READONLY
     173             : #endif
     174             : 
     175             : //
     176             : // Flags in all modes.
     177             : //
     178             : #define FLAG FLAG_FULL
     179             : 
     180             : // Flags for language modes and experimental language features.
     181             : DEFINE_BOOL(use_strict, false, "enforce strict mode")
     182             : 
     183             : DEFINE_BOOL(es_staging, false,
     184             :             "enable test-worthy harmony features (for internal use only)")
     185             : DEFINE_BOOL(harmony, false, "enable all completed harmony features")
     186             : DEFINE_BOOL(harmony_shipping, true, "enable all shipped harmony features")
     187      168676 : DEFINE_IMPLICATION(es_staging, harmony)
     188             : // Enabling import.meta requires to also enable import()
     189      168676 : DEFINE_IMPLICATION(harmony_import_meta, harmony_dynamic_import)
     190             : 
     191      168676 : DEFINE_IMPLICATION(harmony_class_fields, harmony_public_fields)
     192      168676 : DEFINE_IMPLICATION(harmony_class_fields, harmony_static_fields)
     193      168676 : DEFINE_IMPLICATION(harmony_class_fields, harmony_private_fields)
     194             : 
     195      168676 : DEFINE_IMPLICATION(harmony_private_methods, harmony_private_fields)
     196             : 
     197             : // Update bootstrapper.cc whenever adding a new feature flag.
     198             : 
     199             : // Features that are still work in progress (behind individual flags).
     200             : #define HARMONY_INPROGRESS_BASE(V)                                        \
     201             :   V(harmony_class_fields, "harmony fields in class literals")             \
     202             :   V(harmony_private_methods, "harmony private methods in class literals") \
     203             :   V(harmony_regexp_sequence, "RegExp Unicode sequence properties")        \
     204             :   V(harmony_weak_refs, "harmony weak references")                         \
     205             : 
     206             : #ifdef V8_INTL_SUPPORT
     207             : #define HARMONY_INPROGRESS(V) \
     208             :   HARMONY_INPROGRESS_BASE(V)  \
     209             :   V(harmony_locale, "Intl.Locale")
     210             : #else
     211             : #define HARMONY_INPROGRESS(V) HARMONY_INPROGRESS_BASE(V)
     212             : #endif
     213             : 
     214             : // Features that are complete (but still behind --harmony/es-staging flag).
     215             : #define HARMONY_STAGED_BASE(V)                                             \
     216             :   V(harmony_private_fields, "harmony private fields in class literals")    \
     217             :   V(harmony_numeric_separator, "harmony numeric separator between digits") \
     218             :   V(harmony_hashbang, "harmony hashbang syntax")
     219             : 
     220             : #ifdef V8_INTL_SUPPORT
     221             : #define HARMONY_STAGED(V)                        \
     222             :   HARMONY_STAGED_BASE(V)                         \
     223             :   V(harmony_intl_segmenter, "Intl.Segmenter")
     224             : #else
     225             : #define HARMONY_STAGED(V) HARMONY_STAGED_BASE(V)
     226             : #endif
     227             : 
     228             : // Features that are shipping (turned on by default, but internal flag remains).
     229             : #define HARMONY_SHIPPING_BASE(V)                                               \
     230             :   V(harmony_namespace_exports,                                                 \
     231             :     "harmony namespace exports (export * as foo from 'bar')")                  \
     232             :   V(harmony_sharedarraybuffer, "harmony sharedarraybuffer")                    \
     233             :   V(harmony_import_meta, "harmony import.meta property")                       \
     234             :   V(harmony_dynamic_import, "harmony dynamic import")                          \
     235             :   V(harmony_array_flat, "harmony Array.prototype.{flat,flatMap}")              \
     236             :   V(harmony_symbol_description, "harmony Symbol.prototype.description")        \
     237             :   V(harmony_global, "harmony global")                                          \
     238             :   V(harmony_json_stringify, "well-formed JSON.stringify")                      \
     239             :   V(harmony_public_fields, "harmony public instance fields in class literals") \
     240             :   V(harmony_static_fields, "harmony static fields in class literals")          \
     241             :   V(harmony_string_matchall, "harmony String.prototype.matchAll")              \
     242             :   V(harmony_object_from_entries, "harmony Object.fromEntries()")               \
     243             :   V(harmony_await_optimization, "harmony await taking 1 tick")
     244             : 
     245             : #ifdef V8_INTL_SUPPORT
     246             : #define HARMONY_SHIPPING(V)                      \
     247             :   HARMONY_SHIPPING_BASE(V)                       \
     248             :   V(harmony_intl_list_format, "Intl.ListFormat") \
     249             :   V(harmony_intl_relative_time_format, "Intl.RelativeTimeFormat")
     250             : #else
     251             : #define HARMONY_SHIPPING(V) HARMONY_SHIPPING_BASE(V)
     252             : #endif
     253             : 
     254             : // Once a shipping feature has proved stable in the wild, it will be dropped
     255             : // from HARMONY_SHIPPING, all occurrences of the FLAG_ variable are removed,
     256             : // and associated tests are moved from the harmony directory to the appropriate
     257             : // esN directory.
     258             : 
     259             : 
     260             : #define FLAG_INPROGRESS_FEATURES(id, description) \
     261             :   DEFINE_BOOL(id, false, "enable " #description " (in progress)")
     262             : HARMONY_INPROGRESS(FLAG_INPROGRESS_FEATURES)
     263             : #undef FLAG_INPROGRESS_FEATURES
     264             : 
     265             : #define FLAG_STAGED_FEATURES(id, description) \
     266             :   DEFINE_BOOL(id, false, "enable " #description) \
     267             :   DEFINE_IMPLICATION(harmony, id)
     268      168676 : HARMONY_STAGED(FLAG_STAGED_FEATURES)
     269             : #undef FLAG_STAGED_FEATURES
     270             : 
     271             : #define FLAG_SHIPPING_FEATURES(id, description) \
     272             :   DEFINE_BOOL(id, true, "enable " #description) \
     273             :   DEFINE_NEG_NEG_IMPLICATION(harmony_shipping, id)
     274      168676 : HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES)
     275             : #undef FLAG_SHIPPING_FEATURES
     276             : 
     277             : #ifdef V8_INTL_SUPPORT
     278             : DEFINE_BOOL(icu_timezone_data, true, "get information about timezones from ICU")
     279             : #endif
     280             : 
     281             : #ifdef V8_LITE_MODE
     282             : #define V8_LITE_BOOL true
     283             : #else
     284             : #define V8_LITE_BOOL false
     285             : #endif
     286             : 
     287             : #ifdef V8_ENABLE_FUTURE
     288             : #define FUTURE_BOOL true
     289             : #else
     290             : #define FUTURE_BOOL false
     291             : #endif
     292             : DEFINE_BOOL(future, FUTURE_BOOL,
     293             :             "Implies all staged features that we want to ship in the "
     294             :             "not-too-far future")
     295             : 
     296      168676 : DEFINE_IMPLICATION(future, write_protect_code_memory)
     297      168676 : DEFINE_IMPLICATION(future, flush_bytecode)
     298             : 
     299             : // Flags for experimental implementation features.
     300             : DEFINE_BOOL(allocation_site_pretenuring, true,
     301             :             "pretenure with allocation sites")
     302             : DEFINE_BOOL(page_promotion, true, "promote pages based on utilization")
     303             : DEFINE_INT(page_promotion_threshold, 70,
     304             :            "min percentage of live bytes on a page to enable fast evacuation")
     305             : DEFINE_BOOL(trace_pretenuring, false,
     306             :             "trace pretenuring decisions of HAllocate instructions")
     307             : DEFINE_BOOL(trace_pretenuring_statistics, false,
     308             :             "trace allocation site pretenuring statistics")
     309             : DEFINE_BOOL(track_fields, true, "track fields with only smi values")
     310             : DEFINE_BOOL(track_double_fields, true, "track fields with double values")
     311             : DEFINE_BOOL(track_heap_object_fields, true, "track fields with heap values")
     312             : DEFINE_BOOL(track_computed_fields, true, "track computed boilerplate fields")
     313      168676 : DEFINE_IMPLICATION(track_double_fields, track_fields)
     314      168676 : DEFINE_IMPLICATION(track_heap_object_fields, track_fields)
     315      168676 : DEFINE_IMPLICATION(track_computed_fields, track_fields)
     316             : DEFINE_BOOL(track_field_types, true, "track field types")
     317      168676 : DEFINE_IMPLICATION(track_field_types, track_fields)
     318      168676 : DEFINE_IMPLICATION(track_field_types, track_heap_object_fields)
     319             : DEFINE_BOOL(trace_block_coverage, false,
     320             :             "trace collected block coverage information")
     321             : DEFINE_BOOL(feedback_normalization, false,
     322             :             "feed back normalization to constructors")
     323             : // TODO(jkummerow): This currently adds too much load on the stub cache.
     324             : DEFINE_BOOL_READONLY(internalize_on_the_fly, true,
     325             :                      "internalize string keys for generic keyed ICs on the fly")
     326             : 
     327             : // Flag for one shot optimiztions.
     328             : DEFINE_BOOL(enable_one_shot_optimization, true,
     329             :             "Enable size optimizations for the code that will "
     330             :             "only be executed once")
     331             : 
     332             : 
     333             : // Flags for data representation optimizations
     334             : DEFINE_BOOL(unbox_double_arrays, true, "automatically unbox arrays of doubles")
     335             : DEFINE_BOOL_READONLY(string_slices, true, "use string slices")
     336             : 
     337             : // Flags for Ignition for no-snapshot builds.
     338             : #undef FLAG
     339             : #ifndef V8_USE_SNAPSHOT
     340             : #define FLAG FLAG_FULL
     341             : #else
     342             : #define FLAG FLAG_READONLY
     343             : #endif
     344             : DEFINE_INT(interrupt_budget, 144 * KB,
     345             :            "interrupt budget which should be used for the profiler counter")
     346             : #undef FLAG
     347             : #define FLAG FLAG_FULL
     348             : 
     349             : // Flags for Ignition.
     350             : DEFINE_BOOL(ignition_elide_noneffectful_bytecodes, true,
     351             :             "elide bytecodes which won't have any external effect")
     352             : DEFINE_BOOL(ignition_reo, true, "use ignition register equivalence optimizer")
     353             : DEFINE_BOOL(ignition_filter_expression_positions, true,
     354             :             "filter expression positions before the bytecode pipeline")
     355             : DEFINE_BOOL(ignition_share_named_property_feedback, true,
     356             :             "share feedback slots when loading the same named property from "
     357             :             "the same object")
     358             : DEFINE_BOOL(print_bytecode, false,
     359             :             "print bytecode generated by ignition interpreter")
     360             : DEFINE_STRING(print_bytecode_filter, "*",
     361             :               "filter for selecting which functions to print bytecode")
     362             : #ifdef V8_TRACE_IGNITION
     363             : DEFINE_BOOL(trace_ignition, false,
     364             :             "trace the bytecodes executed by the ignition interpreter")
     365             : #endif
     366             : #ifdef V8_TRACE_FEEDBACK_UPDATES
     367             : DEFINE_BOOL(
     368             :     trace_feedback_updates, false,
     369             :     "trace updates to feedback vectors during ignition interpreter execution.")
     370             : #endif
     371             : DEFINE_BOOL(trace_ignition_codegen, false,
     372             :             "trace the codegen of ignition interpreter bytecode handlers")
     373             : DEFINE_BOOL(trace_ignition_dispatches, false,
     374             :             "traces the dispatches to bytecode handlers by the ignition "
     375             :             "interpreter")
     376             : DEFINE_STRING(trace_ignition_dispatches_output_file, nullptr,
     377             :               "the file to which the bytecode handler dispatch table is "
     378             :               "written (by default, the table is not written to a file)")
     379             : 
     380             : DEFINE_BOOL(fast_math, true, "faster (but maybe less accurate) math functions")
     381             : DEFINE_BOOL(trace_track_allocation_sites, false,
     382             :             "trace the tracking of allocation sites")
     383             : DEFINE_BOOL(trace_migration, false, "trace object migration")
     384             : DEFINE_BOOL(trace_generalization, false, "trace map generalization")
     385             : 
     386             : // Flags for concurrent recompilation.
     387             : DEFINE_BOOL(concurrent_recompilation, true,
     388             :             "optimizing hot functions asynchronously on a separate thread")
     389             : DEFINE_BOOL(trace_concurrent_recompilation, false,
     390             :             "track concurrent recompilation")
     391             : DEFINE_INT(concurrent_recompilation_queue_length, 8,
     392             :            "the length of the concurrent compilation queue")
     393             : DEFINE_INT(concurrent_recompilation_delay, 0,
     394             :            "artificial compilation delay in ms")
     395             : DEFINE_BOOL(block_concurrent_recompilation, false,
     396             :             "block queued jobs until released")
     397             : DEFINE_BOOL(concurrent_inlining, false,
     398             :             "run optimizing compiler's inlining phase on a separate thread")
     399      168676 : DEFINE_IMPLICATION(future, concurrent_inlining)
     400             : DEFINE_BOOL(trace_heap_broker, false, "trace the heap broker")
     401             : 
     402             : // Flags for stress-testing the compiler.
     403             : DEFINE_INT(stress_runs, 0, "number of stress runs")
     404             : DEFINE_INT(deopt_every_n_times, 0,
     405             :            "deoptimize every n times a deopt point is passed")
     406             : DEFINE_BOOL(print_deopt_stress, false, "print number of possible deopt points")
     407             : 
     408             : // Flags for TurboFan.
     409             : DEFINE_BOOL(turbo_sp_frame_access, false,
     410             :             "use stack pointer-relative access to frame wherever possible")
     411             : DEFINE_BOOL(turbo_preprocess_ranges, true,
     412             :             "run pre-register allocation heuristics")
     413             : DEFINE_STRING(turbo_filter, "*", "optimization filter for TurboFan compiler")
     414             : DEFINE_BOOL(trace_turbo, false, "trace generated TurboFan IR")
     415             : DEFINE_STRING(trace_turbo_path, nullptr,
     416             :               "directory to dump generated TurboFan IR to")
     417             : DEFINE_STRING(trace_turbo_filter, "*",
     418             :               "filter for tracing turbofan compilation")
     419             : DEFINE_BOOL(trace_turbo_graph, false, "trace generated TurboFan graphs")
     420             : DEFINE_BOOL(trace_turbo_scheduled, false, "trace TurboFan IR with schedule")
     421      168676 : DEFINE_IMPLICATION(trace_turbo_scheduled, trace_turbo_graph)
     422             : DEFINE_STRING(trace_turbo_cfg_file, nullptr,
     423             :               "trace turbo cfg graph (for C1 visualizer) to a given file name")
     424             : DEFINE_BOOL(trace_turbo_types, true, "trace TurboFan's types")
     425             : DEFINE_BOOL(trace_turbo_scheduler, false, "trace TurboFan's scheduler")
     426             : DEFINE_BOOL(trace_turbo_reduction, false, "trace TurboFan's various reducers")
     427             : DEFINE_BOOL(trace_turbo_trimming, false, "trace TurboFan's graph trimmer")
     428             : DEFINE_BOOL(trace_turbo_jt, false, "trace TurboFan's jump threading")
     429             : DEFINE_BOOL(trace_turbo_ceq, false, "trace TurboFan's control equivalence")
     430             : DEFINE_BOOL(trace_turbo_loop, false, "trace TurboFan's loop optimizations")
     431             : DEFINE_BOOL(trace_alloc, false, "trace register allocator")
     432             : DEFINE_BOOL(trace_all_uses, false, "trace all use positions")
     433             : DEFINE_BOOL(trace_representation, false, "trace representation types")
     434             : DEFINE_BOOL(turbo_verify, DEBUG_BOOL, "verify TurboFan graphs at each phase")
     435             : DEFINE_STRING(turbo_verify_machine_graph, nullptr,
     436             :               "verify TurboFan machine graph before instruction selection")
     437             : #ifdef ENABLE_VERIFY_CSA
     438             : DEFINE_BOOL(verify_csa, DEBUG_BOOL,
     439             :             "verify TurboFan machine graph of code stubs")
     440             : #else
     441             : // Define the flag as read-only-false so that code still compiles even in the
     442             : // non-ENABLE_VERIFY_CSA configuration.
     443             : DEFINE_BOOL_READONLY(verify_csa, false,
     444             :                      "verify TurboFan machine graph of code stubs")
     445             : #endif
     446             : DEFINE_BOOL(trace_verify_csa, false, "trace code stubs verification")
     447             : DEFINE_STRING(csa_trap_on_node, nullptr,
     448             :               "trigger break point when a node with given id is created in "
     449             :               "given stub. The format is: StubName,NodeId")
     450             : DEFINE_BOOL_READONLY(fixed_array_bounds_checks, DEBUG_BOOL,
     451             :                      "enable FixedArray bounds checks")
     452             : DEFINE_BOOL(turbo_stats, false, "print TurboFan statistics")
     453             : DEFINE_BOOL(turbo_stats_nvp, false,
     454             :             "print TurboFan statistics in machine-readable format")
     455             : DEFINE_BOOL(turbo_stats_wasm, false,
     456             :             "print TurboFan statistics of wasm compilations")
     457             : DEFINE_BOOL(turbo_splitting, true, "split nodes during scheduling in TurboFan")
     458             : DEFINE_BOOL(function_context_specialization, false,
     459             :             "enable function context specialization in TurboFan")
     460             : DEFINE_BOOL(turbo_inlining, true, "enable inlining in TurboFan")
     461             : DEFINE_INT(max_inlined_bytecode_size, 500,
     462             :            "maximum size of bytecode for a single inlining")
     463             : DEFINE_INT(max_inlined_bytecode_size_cumulative, 1000,
     464             :            "maximum cumulative size of bytecode considered for inlining")
     465             : DEFINE_INT(max_inlined_bytecode_size_absolute, 5000,
     466             :            "maximum cumulative size of bytecode considered for inlining")
     467             : DEFINE_FLOAT(reserve_inline_budget_scale_factor, 1.2,
     468             :              "maximum cumulative size of bytecode considered for inlining")
     469             : DEFINE_INT(max_inlined_bytecode_size_small, 30,
     470             :            "maximum size of bytecode considered for small function inlining")
     471             : DEFINE_FLOAT(min_inlining_frequency, 0.15, "minimum frequency for inlining")
     472             : DEFINE_BOOL(polymorphic_inlining, true, "polymorphic inlining")
     473             : DEFINE_BOOL(stress_inline, false,
     474             :             "set high thresholds for inlining to inline as much as possible")
     475      168676 : DEFINE_VALUE_IMPLICATION(stress_inline, max_inlined_bytecode_size, 999999)
     476      168676 : DEFINE_VALUE_IMPLICATION(stress_inline, max_inlined_bytecode_size_cumulative,
     477             :                          999999)
     478      168676 : DEFINE_VALUE_IMPLICATION(stress_inline, max_inlined_bytecode_size_absolute,
     479             :                          999999)
     480      168676 : DEFINE_VALUE_IMPLICATION(stress_inline, min_inlining_frequency, 0)
     481      168676 : DEFINE_VALUE_IMPLICATION(stress_inline, polymorphic_inlining, true)
     482             : DEFINE_BOOL(trace_turbo_inlining, false, "trace TurboFan inlining")
     483             : DEFINE_BOOL(inline_accessors, true, "inline JavaScript accessors")
     484             : DEFINE_BOOL(inline_into_try, true, "inline into try blocks")
     485             : DEFINE_BOOL(turbo_inline_array_builtins, true,
     486             :             "inline array builtins in TurboFan code")
     487             : DEFINE_BOOL(use_osr, true, "use on-stack replacement")
     488             : DEFINE_BOOL(trace_osr, false, "trace on-stack replacement")
     489             : DEFINE_BOOL(analyze_environment_liveness, true,
     490             :             "analyze liveness of environment slots and zap dead values")
     491             : DEFINE_BOOL(trace_environment_liveness, false,
     492             :             "trace liveness of local variable slots")
     493             : DEFINE_BOOL(turbo_load_elimination, true, "enable load elimination in TurboFan")
     494             : DEFINE_BOOL(trace_turbo_load_elimination, false,
     495             :             "trace TurboFan load elimination")
     496             : DEFINE_BOOL(turbo_profiling, false, "enable profiling in TurboFan")
     497             : DEFINE_BOOL(turbo_verify_allocation, DEBUG_BOOL,
     498             :             "verify register allocation in TurboFan")
     499             : DEFINE_BOOL(turbo_move_optimization, true, "optimize gap moves in TurboFan")
     500             : DEFINE_BOOL(turbo_jt, true, "enable jump threading in TurboFan")
     501             : DEFINE_BOOL(turbo_loop_peeling, true, "Turbofan loop peeling")
     502             : DEFINE_BOOL(turbo_loop_variable, true, "Turbofan loop variable optimization")
     503             : DEFINE_BOOL(turbo_loop_rotation, true, "Turbofan loop rotation")
     504             : DEFINE_BOOL(turbo_cf_optimization, true, "optimize control flow in TurboFan")
     505             : DEFINE_BOOL(turbo_escape, true, "enable escape analysis")
     506             : DEFINE_BOOL(turbo_allocation_folding, true, "Turbofan allocation folding")
     507             : DEFINE_BOOL(turbo_instruction_scheduling, false,
     508             :             "enable instruction scheduling in TurboFan")
     509             : DEFINE_BOOL(turbo_stress_instruction_scheduling, false,
     510             :             "randomly schedule instructions to stress dependency tracking")
     511             : DEFINE_BOOL(turbo_store_elimination, true,
     512             :             "enable store-store elimination in TurboFan")
     513             : DEFINE_BOOL(trace_store_elimination, false, "trace store elimination")
     514             : DEFINE_BOOL(turbo_rewrite_far_jumps, true,
     515             :             "rewrite far to near jumps (ia32,x64)")
     516             : DEFINE_BOOL(experimental_inline_promise_constructor, true,
     517             :             "inline the Promise constructor in TurboFan")
     518             : DEFINE_BOOL(
     519             :     stress_gc_during_compilation, false,
     520             :     "simulate GC/compiler thread race related to https://crbug.com/v8/8520")
     521             : 
     522             : #ifdef DISABLE_UNTRUSTED_CODE_MITIGATIONS
     523             : #define V8_DEFAULT_UNTRUSTED_CODE_MITIGATIONS false
     524             : #else
     525             : #define V8_DEFAULT_UNTRUSTED_CODE_MITIGATIONS true
     526             : #endif
     527             : DEFINE_BOOL(untrusted_code_mitigations, V8_DEFAULT_UNTRUSTED_CODE_MITIGATIONS,
     528             :             "Enable mitigations for executing untrusted code")
     529             : #undef V8_DEFAULT_UNTRUSTED_CODE_MITIGATIONS
     530             : 
     531             : // Flags for native WebAssembly.
     532             : DEFINE_BOOL(expose_wasm, true, "expose wasm interface to JavaScript")
     533             : DEFINE_BOOL(assume_asmjs_origin, false,
     534             :             "force wasm decoder to assume input is internal asm-wasm format")
     535             : DEFINE_BOOL(wasm_disable_structured_cloning, false,
     536             :             "disable wasm structured cloning")
     537             : DEFINE_INT(wasm_num_compilation_tasks, 10,
     538             :            "number of parallel compilation tasks for wasm")
     539             : DEFINE_DEBUG_BOOL(trace_wasm_native_heap, false,
     540             :                   "trace wasm native heap events")
     541             : DEFINE_BOOL(wasm_write_protect_code_memory, false,
     542             :             "write protect code memory on the wasm native heap")
     543             : DEFINE_BOOL(trace_wasm_serialization, false,
     544             :             "trace serialization/deserialization")
     545             : DEFINE_BOOL(wasm_async_compilation, true,
     546             :             "enable actual asynchronous compilation for WebAssembly.compile")
     547             : DEFINE_BOOL(wasm_test_streaming, false,
     548             :             "use streaming compilation instead of async compilation for tests")
     549             : DEFINE_UINT(wasm_max_mem_pages, v8::internal::wasm::kV8MaxWasmMemoryPages,
     550             :             "maximum number of 64KiB memory pages of a wasm instance")
     551             : DEFINE_UINT(wasm_max_table_size, v8::internal::wasm::kV8MaxWasmTableSize,
     552             :             "maximum table size of a wasm instance")
     553             : DEFINE_UINT(wasm_max_code_space, v8::internal::kMaxWasmCodeMB,
     554             :             "maximum committed code space for wasm (in MB)")
     555             : // Enable Liftoff by default on ia32 and x64. More architectures will follow
     556             : // once they are implemented and sufficiently tested.
     557             : #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64
     558             : DEFINE_BOOL(
     559             :     wasm_tier_up, true,
     560             :     "enable wasm baseline compilation and tier up to the optimizing compiler")
     561             : #else
     562             : DEFINE_BOOL(
     563             :     wasm_tier_up, false,
     564             :     "enable wasm baseline compilation and tier up to the optimizing compiler")
     565             : DEFINE_IMPLICATION(future, wasm_tier_up)
     566             : #endif
     567      168676 : DEFINE_IMPLICATION(wasm_tier_up, liftoff)
     568             : DEFINE_DEBUG_BOOL(trace_wasm_decoder, false, "trace decoding of wasm code")
     569             : DEFINE_DEBUG_BOOL(trace_wasm_decode_time, false,
     570             :                   "trace decoding time of wasm code")
     571             : DEFINE_DEBUG_BOOL(trace_wasm_compiler, false, "trace compiling of wasm code")
     572             : DEFINE_DEBUG_BOOL(trace_wasm_interpreter, false,
     573             :                   "trace interpretation of wasm code")
     574             : DEFINE_DEBUG_BOOL(trace_wasm_streaming, false,
     575             :                   "trace streaming compilation of wasm code")
     576             : DEFINE_INT(trace_wasm_ast_start, 0,
     577             :            "start function for wasm AST trace (inclusive)")
     578             : DEFINE_INT(trace_wasm_ast_end, 0, "end function for wasm AST trace (exclusive)")
     579             : DEFINE_BOOL(liftoff, false,
     580             :             "enable Liftoff, the baseline compiler for WebAssembly")
     581             : DEFINE_DEBUG_BOOL(trace_liftoff, false,
     582             :                   "trace Liftoff, the baseline compiler for WebAssembly")
     583             : DEFINE_DEBUG_BOOL(wasm_break_on_decoder_error, false,
     584             :                   "debug break when wasm decoder encounters an error")
     585             : DEFINE_BOOL(trace_wasm_memory, false,
     586             :             "print all memory updates performed in wasm code")
     587             : // Fuzzers use {wasm_tier_mask_for_testing} together with {liftoff} and
     588             : // {no_wasm_tier_up} to force some functions to be compiled with Turbofan.
     589             : DEFINE_INT(wasm_tier_mask_for_testing, 0,
     590             :            "bitmask of functions to compile with TurboFan instead of Liftoff")
     591             : 
     592             : DEFINE_BOOL(validate_asm, true, "validate asm.js modules before compiling")
     593             : DEFINE_BOOL(suppress_asm_messages, false,
     594             :             "don't emit asm.js related messages (for golden file testing)")
     595             : DEFINE_BOOL(trace_asm_time, false, "log asm.js timing info to the console")
     596             : DEFINE_BOOL(trace_asm_scanner, false,
     597             :             "log tokens encountered by asm.js scanner")
     598             : DEFINE_BOOL(trace_asm_parser, false, "verbose logging of asm.js parse failures")
     599             : DEFINE_BOOL(stress_validate_asm, false, "try to validate everything as asm.js")
     600             : 
     601             : DEFINE_DEBUG_BOOL(dump_wasm_module, false, "dump wasm module bytes")
     602             : DEFINE_STRING(dump_wasm_module_path, nullptr,
     603             :               "directory to dump wasm modules to")
     604             : 
     605             : // Declare command-line flags for WASM features. Warning: avoid using these
     606             : // flags directly in the implementation. Instead accept wasm::WasmFeatures
     607             : // for configurability.
     608             : #include "src/wasm/wasm-feature-flags.h"
     609             : 
     610             : #define SPACE
     611             : #define DECL_WASM_FLAG(feat, desc, val)      \
     612             :   DEFINE_BOOL(experimental_wasm_##feat, val, \
     613             :               "enable prototype " desc " for wasm")
     614             : FOREACH_WASM_FEATURE_FLAG(DECL_WASM_FLAG, SPACE)
     615             : #undef DECL_WASM_FLAG
     616             : #undef SPACE
     617             : 
     618             : DEFINE_BOOL(wasm_opt, false, "enable wasm optimization")
     619             : DEFINE_BOOL(wasm_no_bounds_checks, false,
     620             :             "disable bounds checks (performance testing only)")
     621             : DEFINE_BOOL(wasm_no_stack_checks, false,
     622             :             "disable stack checks (performance testing only)")
     623             : DEFINE_BOOL(wasm_math_intrinsics, true,
     624             :             "intrinsify some Math imports into wasm")
     625             : 
     626             : DEFINE_BOOL(wasm_shared_engine, true,
     627             :             "shares one wasm engine between all isolates within a process")
     628      168676 : DEFINE_IMPLICATION(future, wasm_shared_engine)
     629             : DEFINE_BOOL(wasm_shared_code, true,
     630             :             "shares code underlying a wasm module when it is transferred")
     631      168676 : DEFINE_IMPLICATION(future, wasm_shared_code)
     632             : DEFINE_BOOL(wasm_trap_handler, true,
     633             :             "use signal handlers to catch out of bounds memory access in wasm"
     634             :             " (currently Linux x86_64 only)")
     635             : DEFINE_BOOL(wasm_trap_handler_fallback, false,
     636             :             "Use bounds checks if guarded memory is not available")
     637             : DEFINE_BOOL(wasm_fuzzer_gen_test, false,
     638             :             "Generate a test case when running a wasm fuzzer")
     639      168676 : DEFINE_IMPLICATION(wasm_fuzzer_gen_test, single_threaded)
     640             : DEFINE_BOOL(print_wasm_code, false, "Print WebAssembly code")
     641             : DEFINE_BOOL(print_wasm_stub_code, false, "Print WebAssembly stub code")
     642             : DEFINE_BOOL(wasm_interpret_all, false,
     643             :             "Execute all wasm code in the wasm interpreter")
     644             : DEFINE_BOOL(asm_wasm_lazy_compilation, false,
     645             :             "enable lazy compilation for asm-wasm modules")
     646      168676 : DEFINE_IMPLICATION(validate_asm, asm_wasm_lazy_compilation)
     647             : DEFINE_BOOL(wasm_lazy_compilation, false,
     648             :             "enable lazy compilation for all wasm modules")
     649             : DEFINE_DEBUG_BOOL(trace_wasm_lazy_compilation, false,
     650             :                   "trace lazy compilation of wasm functions")
     651             : // wasm-interpret-all resets {asm-,}wasm-lazy-compilation.
     652      168676 : DEFINE_NEG_IMPLICATION(wasm_interpret_all, asm_wasm_lazy_compilation)
     653      168676 : DEFINE_NEG_IMPLICATION(wasm_interpret_all, wasm_lazy_compilation)
     654             : 
     655             : // Profiler flags.
     656             : DEFINE_INT(frame_count, 1, "number of stack frames inspected by the profiler")
     657             : DEFINE_INT(type_info_threshold, 25,
     658             :            "percentage of ICs that must have type info to allow optimization")
     659             : 
     660             : DEFINE_INT(stress_sampling_allocation_profiler, 0,
     661             :            "Enables sampling allocation profiler with X as a sample interval")
     662             : 
     663             : // Garbage collections flags.
     664             : DEFINE_SIZE_T(min_semi_space_size, 0,
     665             :               "min size of a semi-space (in MBytes), the new space consists of "
     666             :               "two semi-spaces")
     667             : DEFINE_SIZE_T(max_semi_space_size, 0,
     668             :               "max size of a semi-space (in MBytes), the new space consists of "
     669             :               "two semi-spaces")
     670             : DEFINE_INT(semi_space_growth_factor, 2, "factor by which to grow the new space")
     671             : DEFINE_BOOL(experimental_new_space_growth_heuristic, false,
     672             :             "Grow the new space based on the percentage of survivors instead "
     673             :             "of their absolute value.")
     674             : DEFINE_SIZE_T(max_old_space_size, 0, "max size of the old space (in Mbytes)")
     675             : DEFINE_SIZE_T(initial_old_space_size, 0, "initial old space size (in Mbytes)")
     676             : DEFINE_BOOL(gc_global, false, "always perform global GCs")
     677             : DEFINE_INT(random_gc_interval, 0,
     678             :            "Collect garbage after random(0, X) allocations. It overrides "
     679             :            "gc_interval.")
     680             : DEFINE_INT(gc_interval, -1, "garbage collect after <n> allocations")
     681             : DEFINE_INT(retain_maps_for_n_gc, 2,
     682             :            "keeps maps alive for <n> old space garbage collections")
     683             : DEFINE_BOOL(trace_gc, false,
     684             :             "print one trace line following each garbage collection")
     685             : DEFINE_BOOL(trace_gc_nvp, false,
     686             :             "print one detailed trace line in name=value format "
     687             :             "after each garbage collection")
     688             : DEFINE_BOOL(trace_gc_ignore_scavenger, false,
     689             :             "do not print trace line after scavenger collection")
     690             : DEFINE_BOOL(trace_idle_notification, false,
     691             :             "print one trace line following each idle notification")
     692             : DEFINE_BOOL(trace_idle_notification_verbose, false,
     693             :             "prints the heap state used by the idle notification")
     694             : DEFINE_BOOL(trace_gc_verbose, false,
     695             :             "print more details following each garbage collection")
     696             : DEFINE_INT(trace_allocation_stack_interval, -1,
     697             :            "print stack trace after <n> free-list allocations")
     698             : DEFINE_INT(trace_duplicate_threshold_kb, 0,
     699             :            "print duplicate objects in the heap if their size is more than "
     700             :            "given threshold")
     701             : DEFINE_BOOL(trace_fragmentation, false, "report fragmentation for old space")
     702             : DEFINE_BOOL(trace_fragmentation_verbose, false,
     703             :             "report fragmentation for old space (detailed)")
     704             : DEFINE_BOOL(trace_evacuation, false, "report evacuation statistics")
     705             : DEFINE_BOOL(trace_mutator_utilization, false,
     706             :             "print mutator utilization, allocation speed, gc speed")
     707             : DEFINE_BOOL(incremental_marking, true, "use incremental marking")
     708             : DEFINE_BOOL(incremental_marking_wrappers, true,
     709             :             "use incremental marking for marking wrappers")
     710             : DEFINE_BOOL(trace_unmapper, false, "Trace the unmapping")
     711             : DEFINE_BOOL(parallel_scavenge, true, "parallel scavenge")
     712             : DEFINE_BOOL(trace_parallel_scavenge, false, "trace parallel scavenge")
     713             : DEFINE_BOOL(write_protect_code_memory, true, "write protect code memory")
     714             : #ifdef V8_CONCURRENT_MARKING
     715             : #define V8_CONCURRENT_MARKING_BOOL true
     716             : #else
     717             : #define V8_CONCURRENT_MARKING_BOOL false
     718             : #endif
     719             : DEFINE_BOOL(concurrent_marking, V8_CONCURRENT_MARKING_BOOL,
     720             :             "use concurrent marking")
     721             : DEFINE_BOOL(parallel_marking, true, "use parallel marking in atomic pause")
     722             : DEFINE_INT(ephemeron_fixpoint_iterations, 10,
     723             :            "number of fixpoint iterations it takes to switch to linear "
     724             :            "ephemeron algorithm")
     725             : DEFINE_BOOL(trace_concurrent_marking, false, "trace concurrent marking")
     726             : DEFINE_BOOL(black_allocation, true, "use black allocation")
     727             : DEFINE_BOOL(concurrent_store_buffer, true,
     728             :             "use concurrent store buffer processing")
     729             : DEFINE_BOOL(concurrent_sweeping, true, "use concurrent sweeping")
     730             : DEFINE_BOOL(parallel_compaction, true, "use parallel compaction")
     731             : DEFINE_BOOL(parallel_pointer_update, true,
     732             :             "use parallel pointer update during compaction")
     733             : DEFINE_BOOL(detect_ineffective_gcs_near_heap_limit, true,
     734             :             "trigger out-of-memory failure to avoid GC storm near heap limit")
     735             : DEFINE_BOOL(trace_incremental_marking, false,
     736             :             "trace progress of the incremental marking")
     737             : DEFINE_BOOL(trace_stress_marking, false, "trace stress marking progress")
     738             : DEFINE_BOOL(trace_stress_scavenge, false, "trace stress scavenge progress")
     739             : DEFINE_BOOL(track_gc_object_stats, false,
     740             :             "track object counts and memory usage")
     741             : DEFINE_BOOL(trace_gc_object_stats, false,
     742             :             "trace object counts and memory usage")
     743             : DEFINE_BOOL(trace_zone_stats, false, "trace zone memory usage")
     744             : DEFINE_BOOL(track_retaining_path, false,
     745             :             "enable support for tracking retaining path")
     746             : DEFINE_BOOL(concurrent_array_buffer_freeing, true,
     747             :             "free array buffer allocations on a background thread")
     748             : DEFINE_INT(gc_stats, 0, "Used by tracing internally to enable gc statistics")
     749      168676 : DEFINE_IMPLICATION(trace_gc_object_stats, track_gc_object_stats)
     750      168676 : DEFINE_VALUE_IMPLICATION(track_gc_object_stats, gc_stats, 1)
     751      168676 : DEFINE_VALUE_IMPLICATION(trace_gc_object_stats, gc_stats, 1)
     752      168676 : DEFINE_NEG_IMPLICATION(trace_gc_object_stats, incremental_marking)
     753      168676 : DEFINE_NEG_IMPLICATION(track_retaining_path, incremental_marking)
     754      168676 : DEFINE_NEG_IMPLICATION(track_retaining_path, parallel_marking)
     755      168676 : DEFINE_NEG_IMPLICATION(track_retaining_path, concurrent_marking)
     756             : DEFINE_BOOL(track_detached_contexts, true,
     757             :             "track native contexts that are expected to be garbage collected")
     758             : DEFINE_BOOL(trace_detached_contexts, false,
     759             :             "trace native contexts that are expected to be garbage collected")
     760      168676 : DEFINE_IMPLICATION(trace_detached_contexts, track_detached_contexts)
     761             : #ifdef VERIFY_HEAP
     762             : DEFINE_BOOL(verify_heap, false, "verify heap pointers before and after GC")
     763             : DEFINE_BOOL(verify_heap_skip_remembered_set, false,
     764             :             "disable remembered set verification")
     765             : #endif
     766             : DEFINE_BOOL(move_object_start, true, "enable moving of object starts")
     767             : DEFINE_BOOL(memory_reducer, true, "use memory reducer")
     768             : DEFINE_INT(heap_growing_percent, 0,
     769             :            "specifies heap growing factor as (1 + heap_growing_percent/100)")
     770             : DEFINE_INT(v8_os_page_size, 0, "override OS page size (in KBytes)")
     771             : DEFINE_BOOL(always_compact, false, "Perform compaction on every full GC")
     772             : DEFINE_BOOL(never_compact, false,
     773             :             "Never perform compaction on full GC - testing only")
     774             : DEFINE_BOOL(compact_code_space, true, "Compact code space on full collections")
     775             : DEFINE_BOOL(flush_bytecode, V8_LITE_BOOL,
     776             :             "flush of bytecode when it has not been executed recently")
     777             : DEFINE_BOOL(stress_flush_bytecode, false, "stress bytecode flushing")
     778      168676 : DEFINE_IMPLICATION(stress_flush_bytecode, flush_bytecode)
     779             : DEFINE_BOOL(use_marking_progress_bar, true,
     780             :             "Use a progress bar to scan large objects in increments when "
     781             :             "incremental marking is active.")
     782             : DEFINE_BOOL(force_marking_deque_overflows, false,
     783             :             "force overflows of marking deque by reducing it's size "
     784             :             "to 64 words")
     785             : DEFINE_BOOL(stress_compaction, false,
     786             :             "stress the GC compactor to flush out bugs (implies "
     787             :             "--force_marking_deque_overflows)")
     788             : DEFINE_BOOL(stress_compaction_random, false,
     789             :             "Stress GC compaction by selecting random percent of pages as "
     790             :             "evacuation candidates. It overrides stress_compaction.")
     791             : DEFINE_BOOL(stress_incremental_marking, false,
     792             :             "force incremental marking for small heaps and run it more often")
     793             : 
     794             : DEFINE_BOOL(fuzzer_gc_analysis, false,
     795             :             "prints number of allocations and enables analysis mode for gc "
     796             :             "fuzz testing, e.g. --stress-marking, --stress-scavenge")
     797             : DEFINE_INT(stress_marking, 0,
     798             :            "force marking at random points between 0 and X (inclusive) percent "
     799             :            "of the regular marking start limit")
     800             : DEFINE_INT(stress_scavenge, 0,
     801             :            "force scavenge at random points between 0 and X (inclusive) "
     802             :            "percent of the new space capacity")
     803      168676 : DEFINE_IMPLICATION(fuzzer_gc_analysis, stress_marking)
     804      168676 : DEFINE_IMPLICATION(fuzzer_gc_analysis, stress_scavenge)
     805             : 
     806             : DEFINE_BOOL(disable_abortjs, false, "disables AbortJS runtime function")
     807             : 
     808             : DEFINE_BOOL(manual_evacuation_candidates_selection, false,
     809             :             "Test mode only flag. It allows an unit test to select evacuation "
     810             :             "candidates pages (requires --stress_compaction).")
     811             : DEFINE_BOOL(fast_promotion_new_space, false,
     812             :             "fast promote new space on high survival rates")
     813             : 
     814             : DEFINE_BOOL(clear_free_memory, false, "initialize free memory with 0")
     815             : 
     816             : DEFINE_BOOL(young_generation_large_objects, false,
     817             :             "allocates large objects by default in the young generation large "
     818             :             "object space")
     819             : 
     820             : DEFINE_BOOL(idle_time_scavenge, true, "Perform scavenges in idle time.")
     821             : 
     822             : // assembler-ia32.cc / assembler-arm.cc / assembler-x64.cc
     823             : DEFINE_BOOL(debug_code, DEBUG_BOOL,
     824             :             "generate extra code (assertions) for debugging")
     825             : DEFINE_BOOL(code_comments, false,
     826             :             "emit comments in code disassembly; for more readable source "
     827             :             "positions you should add --no-concurrent_recompilation")
     828             : DEFINE_BOOL(enable_sse3, true, "enable use of SSE3 instructions if available")
     829             : DEFINE_BOOL(enable_ssse3, true, "enable use of SSSE3 instructions if available")
     830             : DEFINE_BOOL(enable_sse4_1, true,
     831             :             "enable use of SSE4.1 instructions if available")
     832             : DEFINE_BOOL(enable_sahf, true,
     833             :             "enable use of SAHF instruction if available (X64 only)")
     834             : DEFINE_BOOL(enable_avx, true, "enable use of AVX instructions if available")
     835             : DEFINE_BOOL(enable_fma3, true, "enable use of FMA3 instructions if available")
     836             : DEFINE_BOOL(enable_bmi1, true, "enable use of BMI1 instructions if available")
     837             : DEFINE_BOOL(enable_bmi2, true, "enable use of BMI2 instructions if available")
     838             : DEFINE_BOOL(enable_lzcnt, true, "enable use of LZCNT instruction if available")
     839             : DEFINE_BOOL(enable_popcnt, true,
     840             :             "enable use of POPCNT instruction if available")
     841             : DEFINE_STRING(arm_arch, ARM_ARCH_DEFAULT,
     842             :               "generate instructions for the selected ARM architecture if "
     843             :               "available: armv6, armv7, armv7+sudiv or armv8")
     844             : DEFINE_BOOL(force_long_branches, false,
     845             :             "force all emitted branches to be in long mode (MIPS/PPC only)")
     846             : DEFINE_STRING(mcpu, "auto", "enable optimization for specific cpu")
     847             : DEFINE_BOOL(partial_constant_pool, true,
     848             :             "enable use of partial constant pools (X64 only)")
     849             : 
     850             : // Deprecated ARM flags (replaced by arm_arch).
     851             : DEFINE_MAYBE_BOOL(enable_armv7, "deprecated (use --arm_arch instead)")
     852             : DEFINE_MAYBE_BOOL(enable_vfp3, "deprecated (use --arm_arch instead)")
     853             : DEFINE_MAYBE_BOOL(enable_32dregs, "deprecated (use --arm_arch instead)")
     854             : DEFINE_MAYBE_BOOL(enable_neon, "deprecated (use --arm_arch instead)")
     855             : DEFINE_MAYBE_BOOL(enable_sudiv, "deprecated (use --arm_arch instead)")
     856             : DEFINE_MAYBE_BOOL(enable_armv8, "deprecated (use --arm_arch instead)")
     857             : 
     858             : // regexp-macro-assembler-*.cc
     859             : DEFINE_BOOL(enable_regexp_unaligned_accesses, true,
     860             :             "enable unaligned accesses for the regexp engine")
     861             : 
     862             : // api.cc
     863             : DEFINE_BOOL(script_streaming, true, "enable parsing on background")
     864             : DEFINE_BOOL(disable_old_api_accessors, false,
     865             :             "Disable old-style API accessors whose setters trigger through the "
     866             :             "prototype chain")
     867             : 
     868             : // bootstrapper.cc
     869             : DEFINE_BOOL(expose_free_buffer, false, "expose freeBuffer extension")
     870             : DEFINE_BOOL(expose_gc, false, "expose gc extension")
     871             : DEFINE_STRING(expose_gc_as, nullptr,
     872             :               "expose gc extension under the specified name")
     873      168676 : DEFINE_IMPLICATION(expose_gc_as, expose_gc)
     874             : DEFINE_BOOL(expose_externalize_string, false,
     875             :             "expose externalize string extension")
     876             : DEFINE_BOOL(expose_trigger_failure, false, "expose trigger-failure extension")
     877             : DEFINE_INT(stack_trace_limit, 10, "number of stack frames to capture")
     878             : DEFINE_BOOL(builtins_in_stack_traces, false,
     879             :             "show built-in functions in stack traces")
     880             : DEFINE_BOOL(disallow_code_generation_from_strings, false,
     881             :             "disallow eval and friends")
     882             : DEFINE_BOOL(expose_async_hooks, false, "expose async_hooks object")
     883             : 
     884             : // builtins.cc
     885             : DEFINE_BOOL(allow_unsafe_function_constructor, false,
     886             :             "allow invoking the function constructor without security checks")
     887             : DEFINE_BOOL(force_slow_path, false, "always take the slow path for builtins")
     888             : DEFINE_BOOL(test_small_max_function_context_stub_size, false,
     889             :             "enable testing the function context size overflow path "
     890             :             "by making the maximum size smaller")
     891             : 
     892             : // builtins-ia32.cc
     893             : DEFINE_BOOL(inline_new, true, "use fast inline allocation")
     894             : 
     895             : // codegen-ia32.cc / codegen-arm.cc
     896             : DEFINE_BOOL(trace, false, "trace function calls")
     897             : 
     898             : // codegen.cc
     899             : DEFINE_BOOL(lazy, true, "use lazy compilation")
     900             : DEFINE_BOOL(trace_opt, false, "trace lazy optimization")
     901             : DEFINE_BOOL(trace_opt_verbose, false, "extra verbose compilation tracing")
     902      168676 : DEFINE_IMPLICATION(trace_opt_verbose, trace_opt)
     903             : DEFINE_BOOL(trace_opt_stats, false, "trace lazy optimization statistics")
     904             : DEFINE_BOOL(trace_deopt, false, "trace optimize function deoptimization")
     905             : DEFINE_BOOL(trace_file_names, false,
     906             :             "include file names in trace-opt/trace-deopt output")
     907             : DEFINE_BOOL(trace_interrupts, false, "trace interrupts when they are handled")
     908             : DEFINE_BOOL(always_opt, false, "always try to optimize functions")
     909             : DEFINE_BOOL(always_osr, false, "always try to OSR functions")
     910             : DEFINE_BOOL(prepare_always_opt, false, "prepare for turning on always opt")
     911             : 
     912             : DEFINE_BOOL(trace_serializer, false, "print code serializer trace")
     913             : #ifdef DEBUG
     914             : DEFINE_BOOL(external_reference_stats, false,
     915             :             "print statistics on external references used during serialization")
     916             : #endif  // DEBUG
     917             : 
     918             : // compilation-cache.cc
     919             : DEFINE_BOOL(compilation_cache, true, "enable compilation cache")
     920             : 
     921             : DEFINE_BOOL(cache_prototype_transitions, true, "cache prototype transitions")
     922             : 
     923             : // compiler-dispatcher.cc
     924             : DEFINE_BOOL(parallel_compile_tasks, false, "enable parallel compile tasks")
     925             : DEFINE_BOOL(compiler_dispatcher, false, "enable compiler dispatcher")
     926      168676 : DEFINE_IMPLICATION(parallel_compile_tasks, compiler_dispatcher)
     927             : DEFINE_BOOL(trace_compiler_dispatcher, false,
     928             :             "trace compiler dispatcher activity")
     929             : 
     930             : // cpu-profiler.cc
     931             : DEFINE_INT(cpu_profiler_sampling_interval, 1000,
     932             :            "CPU profiler sampling interval in microseconds")
     933             : 
     934             : // Array abuse tracing
     935             : DEFINE_BOOL(trace_js_array_abuse, false,
     936             :             "trace out-of-bounds accesses to JS arrays")
     937             : DEFINE_BOOL(trace_external_array_abuse, false,
     938             :             "trace out-of-bounds-accesses to external arrays")
     939             : DEFINE_BOOL(trace_array_abuse, false,
     940             :             "trace out-of-bounds accesses to all arrays")
     941      168676 : DEFINE_IMPLICATION(trace_array_abuse, trace_js_array_abuse)
     942      168676 : DEFINE_IMPLICATION(trace_array_abuse, trace_external_array_abuse)
     943             : 
     944             : // debugger
     945             : DEFINE_BOOL(
     946             :     trace_side_effect_free_debug_evaluate, false,
     947             :     "print debug messages for side-effect-free debug-evaluate for testing")
     948             : DEFINE_BOOL(hard_abort, true, "abort by crashing")
     949             : 
     950             : // inspector
     951             : DEFINE_BOOL(expose_inspector_scripts, false,
     952             :             "expose injected-script-source.js for debugging")
     953             : 
     954             : // execution.cc
     955             : DEFINE_INT(stack_size, V8_DEFAULT_STACK_SIZE_KB,
     956             :            "default size of stack region v8 is allowed to use (in kBytes)")
     957             : 
     958             : // frames.cc
     959             : DEFINE_INT(max_stack_trace_source_length, 300,
     960             :            "maximum length of function source code printed in a stack trace.")
     961             : 
     962             : // execution.cc, messages.cc
     963             : DEFINE_BOOL(clear_exceptions_on_js_entry, false,
     964             :             "clear pending exceptions when entering JavaScript")
     965             : 
     966             : // counters.cc
     967             : DEFINE_INT(histogram_interval, 600000,
     968             :            "time interval in ms for aggregating memory histograms")
     969             : 
     970             : // heap-snapshot-generator.cc
     971             : DEFINE_BOOL(heap_profiler_trace_objects, false,
     972             :             "Dump heap object allocations/movements/size_updates")
     973             : DEFINE_BOOL(heap_profiler_use_embedder_graph, true,
     974             :             "Use the new EmbedderGraph API to get embedder nodes")
     975             : DEFINE_INT(heap_snapshot_string_limit, 1024,
     976             :            "truncate strings to this length in the heap snapshot")
     977             : 
     978             : // sampling-heap-profiler.cc
     979             : DEFINE_BOOL(sampling_heap_profiler_suppress_randomness, false,
     980             :             "Use constant sample intervals to eliminate test flakiness")
     981             : 
     982             : // v8.cc
     983             : DEFINE_BOOL(use_idle_notification, true,
     984             :             "Use idle notification to reduce memory footprint.")
     985             : // ic.cc
     986             : DEFINE_BOOL(trace_ic, false,
     987             :             "trace inline cache state transitions for tools/ic-processor")
     988      168676 : DEFINE_IMPLICATION(trace_ic, log_code)
     989             : DEFINE_INT(ic_stats, 0, "inline cache state transitions statistics")
     990      168676 : DEFINE_VALUE_IMPLICATION(trace_ic, ic_stats, 1)
     991             : DEFINE_BOOL_READONLY(track_constant_fields, false,
     992             :                      "enable constant field tracking")
     993             : DEFINE_BOOL_READONLY(modify_map_inplace, false, "enable in-place map updates")
     994             : DEFINE_BOOL_READONLY(fast_map_update, false,
     995             :                      "enable fast map update by caching the migration target")
     996             : 
     997             : // macro-assembler-ia32.cc
     998             : DEFINE_BOOL(native_code_counters, false,
     999             :             "generate extra code for manipulating stats counters")
    1000             : 
    1001             : // objects.cc
    1002             : DEFINE_BOOL(thin_strings, true, "Enable ThinString support")
    1003             : DEFINE_BOOL(trace_prototype_users, false,
    1004             :             "Trace updates to prototype user tracking")
    1005             : DEFINE_BOOL(use_verbose_printer, true, "allows verbose printing")
    1006             : DEFINE_BOOL(trace_for_in_enumerate, false, "Trace for-in enumerate slow-paths")
    1007             : DEFINE_BOOL(trace_maps, false, "trace map creation")
    1008             : DEFINE_BOOL(trace_maps_details, true, "also log map details")
    1009      168676 : DEFINE_IMPLICATION(trace_maps, log_code)
    1010             : 
    1011             : // parser.cc
    1012             : DEFINE_BOOL(allow_natives_syntax, false, "allow natives syntax")
    1013             : 
    1014             : // simulator-arm.cc, simulator-arm64.cc and simulator-mips.cc
    1015             : DEFINE_BOOL(trace_sim, false, "Trace simulator execution")
    1016             : DEFINE_BOOL(debug_sim, false, "Enable debugging the simulator")
    1017             : DEFINE_BOOL(check_icache, false,
    1018             :             "Check icache flushes in ARM and MIPS simulator")
    1019             : DEFINE_INT(stop_sim_at, 0, "Simulator stop after x number of instructions")
    1020             : #if defined(V8_TARGET_ARCH_ARM64) || defined(V8_TARGET_ARCH_MIPS64) || \
    1021             :     defined(V8_TARGET_ARCH_PPC64)
    1022             : DEFINE_INT(sim_stack_alignment, 16,
    1023             :            "Stack alignment in bytes in simulator. This must be a power of two "
    1024             :            "and it must be at least 16. 16 is default.")
    1025             : #else
    1026             : DEFINE_INT(sim_stack_alignment, 8,
    1027             :            "Stack alingment in bytes in simulator (4 or 8, 8 is default)")
    1028             : #endif
    1029             : DEFINE_INT(sim_stack_size, 2 * MB / KB,
    1030             :            "Stack size of the ARM64, MIPS64 and PPC64 simulator "
    1031             :            "in kBytes (default is 2 MB)")
    1032             : DEFINE_BOOL(log_colour, ENABLE_LOG_COLOUR,
    1033             :             "When logging, try to use coloured output.")
    1034             : DEFINE_BOOL(ignore_asm_unimplemented_break, false,
    1035             :             "Don't break for ASM_UNIMPLEMENTED_BREAK macros.")
    1036             : DEFINE_BOOL(trace_sim_messages, false,
    1037             :             "Trace simulator debug messages. Implied by --trace-sim.")
    1038             : 
    1039             : // isolate.cc
    1040             : DEFINE_BOOL(async_stack_traces, true,
    1041             :             "include async stack traces in Error.stack")
    1042      168676 : DEFINE_IMPLICATION(async_stack_traces, harmony_await_optimization)
    1043             : DEFINE_BOOL(stack_trace_on_illegal, false,
    1044             :             "print stack trace when an illegal exception is thrown")
    1045             : DEFINE_BOOL(abort_on_uncaught_exception, false,
    1046             :             "abort program (dump core) when an uncaught exception is thrown")
    1047             : DEFINE_BOOL(abort_on_stack_or_string_length_overflow, false,
    1048             :             "Abort program when the stack overflows or a string exceeds "
    1049             :             "maximum length (as opposed to throwing RangeError). This is "
    1050             :             "useful for fuzzing where the spec behaviour would introduce "
    1051             :             "nondeterminism.")
    1052             : DEFINE_BOOL(randomize_hashes, true,
    1053             :             "randomize hashes to avoid predictable hash collisions "
    1054             :             "(with snapshots this option cannot override the baked-in seed)")
    1055             : DEFINE_BOOL(rehash_snapshot, true,
    1056             :             "rehash strings from the snapshot to override the baked-in seed")
    1057             : DEFINE_UINT64(hash_seed, 0,
    1058             :               "Fixed seed to use to hash property keys (0 means random)"
    1059             :               "(with snapshots this option cannot override the baked-in seed)")
    1060             : DEFINE_INT(random_seed, 0,
    1061             :            "Default seed for initializing random generator "
    1062             :            "(0, the default, means to use system random).")
    1063             : DEFINE_INT(fuzzer_random_seed, 0,
    1064             :            "Default seed for initializing fuzzer random generator "
    1065             :            "(0, the default, means to use v8's random number generator seed).")
    1066             : DEFINE_BOOL(trace_rail, false, "trace RAIL mode")
    1067             : DEFINE_BOOL(print_all_exceptions, false,
    1068             :             "print exception object and stack trace on each thrown exception")
    1069             : 
    1070             : // runtime.cc
    1071             : DEFINE_BOOL(runtime_call_stats, false, "report runtime call counts and times")
    1072             : DEFINE_INT(runtime_stats, 0,
    1073             :            "internal usage only for controlling runtime statistics")
    1074      168676 : DEFINE_VALUE_IMPLICATION(runtime_call_stats, runtime_stats, 1)
    1075             : 
    1076             : // snapshot-common.cc
    1077             : #ifdef V8_EMBEDDED_BUILTINS
    1078             : #define V8_EMBEDDED_BUILTINS_BOOL true
    1079             : #else
    1080             : #define V8_EMBEDDED_BUILTINS_BOOL false
    1081             : #endif
    1082             : DEFINE_BOOL_READONLY(embedded_builtins, V8_EMBEDDED_BUILTINS_BOOL,
    1083             :                      "Embed builtin code into the binary.")
    1084             : DEFINE_BOOL(profile_deserialization, false,
    1085             :             "Print the time it takes to deserialize the snapshot.")
    1086             : DEFINE_BOOL(serialization_statistics, false,
    1087             :             "Collect statistics on serialized objects.")
    1088             : DEFINE_UINT(serialization_chunk_size, 4096,
    1089             :             "Custom size for serialization chunks")
    1090             : 
    1091             : // Regexp
    1092             : DEFINE_BOOL(regexp_optimization, true, "generate optimized regexp code")
    1093             : DEFINE_BOOL(regexp_mode_modifiers, false, "enable inline flags in regexp.")
    1094             : 
    1095             : // Testing flags test/cctest/test-{flags,api,serialization}.cc
    1096             : DEFINE_BOOL(testing_bool_flag, true, "testing_bool_flag")
    1097             : DEFINE_MAYBE_BOOL(testing_maybe_bool_flag, "testing_maybe_bool_flag")
    1098             : DEFINE_INT(testing_int_flag, 13, "testing_int_flag")
    1099             : DEFINE_FLOAT(testing_float_flag, 2.5, "float-flag")
    1100             : DEFINE_STRING(testing_string_flag, "Hello, world!", "string-flag")
    1101             : DEFINE_INT(testing_prng_seed, 42, "Seed used for threading test randomness")
    1102             : 
    1103             : // mksnapshot.cc
    1104             : DEFINE_STRING(embedded_src, nullptr,
    1105             :               "Path for the generated embedded data file. (mksnapshot only)")
    1106             : DEFINE_STRING(
    1107             :     embedded_variant, nullptr,
    1108             :     "Label to disambiguate symbols in embedded data file. (mksnapshot only)")
    1109             : DEFINE_STRING(startup_src, nullptr,
    1110             :               "Write V8 startup as C++ src. (mksnapshot only)")
    1111             : DEFINE_STRING(startup_blob, nullptr,
    1112             :               "Write V8 startup blob file. (mksnapshot only)")
    1113             : 
    1114             : //
    1115             : // Minor mark compact collector flags.
    1116             : //
    1117             : #ifdef ENABLE_MINOR_MC
    1118             : DEFINE_BOOL(minor_mc_parallel_marking, true,
    1119             :             "use parallel marking for the young generation")
    1120             : DEFINE_BOOL(trace_minor_mc_parallel_marking, false,
    1121             :             "trace parallel marking for the young generation")
    1122             : DEFINE_BOOL(minor_mc, false, "perform young generation mark compact GCs")
    1123             : #endif  // ENABLE_MINOR_MC
    1124             : 
    1125             : //
    1126             : // Dev shell flags
    1127             : //
    1128             : 
    1129             : DEFINE_BOOL(help, false, "Print usage message, including flags, on console")
    1130             : DEFINE_BOOL(dump_counters, false, "Dump counters on exit")
    1131             : DEFINE_BOOL(dump_counters_nvp, false,
    1132             :             "Dump counters as name-value pairs on exit")
    1133             : DEFINE_BOOL(use_external_strings, false, "Use external strings for source code")
    1134             : 
    1135             : DEFINE_STRING(map_counters, "", "Map counters to a file")
    1136             : DEFINE_BOOL(mock_arraybuffer_allocator, false,
    1137             :             "Use a mock ArrayBuffer allocator for testing.")
    1138             : DEFINE_SIZE_T(mock_arraybuffer_allocator_limit, 0,
    1139             :               "Memory limit for mock ArrayBuffer allocator used to simulate "
    1140             :               "OOM for testing.")
    1141             : 
    1142             : //
    1143             : // Flags only available in non-Lite modes.
    1144             : //
    1145             : #undef FLAG
    1146             : #ifdef V8_LITE_MODE
    1147             : #define FLAG FLAG_READONLY
    1148             : #else
    1149             : #define FLAG FLAG_FULL
    1150             : #endif
    1151             : 
    1152             : DEFINE_BOOL(jitless, V8_LITE_BOOL,
    1153             :             "Disable runtime allocation of executable memory.")
    1154             : 
    1155             : // Jitless V8 has a few implications:
    1156             : #ifndef V8_LITE_MODE
    1157             : // Optimizations (i.e. jitting) are disabled.
    1158      168676 : DEFINE_NEG_IMPLICATION(jitless, opt)
    1159             : #endif
    1160             : // asm.js validation is disabled since it triggers wasm code generation.
    1161      168676 : DEFINE_NEG_IMPLICATION(jitless, validate_asm)
    1162             : // Wasm is put into interpreter-only mode. We repeat flag implications down
    1163             : // here to ensure they're applied correctly by setting the --jitless flag.
    1164      168676 : DEFINE_IMPLICATION(jitless, wasm_interpret_all)
    1165      168676 : DEFINE_NEG_IMPLICATION(jitless, asm_wasm_lazy_compilation)
    1166      168676 : DEFINE_NEG_IMPLICATION(jitless, wasm_lazy_compilation)
    1167             : 
    1168             : // Enable recompilation of function with optimized code.
    1169             : DEFINE_BOOL(opt, !V8_LITE_BOOL, "use adaptive optimizations")
    1170             : 
    1171             : // Enable use of inline caches to optimize object access operations.
    1172             : DEFINE_BOOL(use_ic, !V8_LITE_BOOL, "use inline caching")
    1173             : 
    1174             : // Favor memory over execution speed.
    1175             : DEFINE_BOOL(optimize_for_size, V8_LITE_BOOL,
    1176             :             "Enables optimizations which favor memory size over execution "
    1177             :             "speed")
    1178      168676 : DEFINE_VALUE_IMPLICATION(optimize_for_size, max_semi_space_size, 1)
    1179             : 
    1180             : //
    1181             : // GDB JIT integration flags.
    1182             : //
    1183             : #undef FLAG
    1184             : #ifdef ENABLE_GDB_JIT_INTERFACE
    1185             : #define FLAG FLAG_FULL
    1186             : #else
    1187             : #define FLAG FLAG_READONLY
    1188             : #endif
    1189             : 
    1190             : DEFINE_BOOL(gdbjit, false, "enable GDBJIT interface")
    1191             : DEFINE_BOOL(gdbjit_full, false, "enable GDBJIT interface for all code objects")
    1192             : DEFINE_BOOL(gdbjit_dump, false, "dump elf objects with debug info to disk")
    1193             : DEFINE_STRING(gdbjit_dump_filter, "",
    1194             :               "dump only objects containing this substring")
    1195             : 
    1196             : #ifdef ENABLE_GDB_JIT_INTERFACE
    1197      168676 : DEFINE_IMPLICATION(gdbjit_full, gdbjit)
    1198      168676 : DEFINE_IMPLICATION(gdbjit_dump, gdbjit)
    1199             : #endif
    1200      168676 : DEFINE_NEG_IMPLICATION(gdbjit, compact_code_space)
    1201             : 
    1202             : //
    1203             : // Debug only flags
    1204             : //
    1205             : #undef FLAG
    1206             : #ifdef DEBUG
    1207             : #define FLAG FLAG_FULL
    1208             : #else
    1209             : #define FLAG FLAG_READONLY
    1210             : #endif
    1211             : 
    1212             : // checks.cc
    1213             : #ifdef ENABLE_SLOW_DCHECKS
    1214             : DEFINE_BOOL(enable_slow_asserts, true,
    1215             :             "enable asserts that are slow to execute")
    1216             : #endif
    1217             : 
    1218             : // codegen-ia32.cc / codegen-arm.cc / macro-assembler-*.cc
    1219             : DEFINE_BOOL(print_ast, false, "print source AST")
    1220             : DEFINE_BOOL(trap_on_abort, false, "replace aborts by breakpoints")
    1221             : 
    1222             : // compiler.cc
    1223             : DEFINE_BOOL(print_builtin_scopes, false, "print scopes for builtins")
    1224             : DEFINE_BOOL(print_scopes, false, "print scopes")
    1225             : 
    1226             : // contexts.cc
    1227             : DEFINE_BOOL(trace_contexts, false, "trace contexts operations")
    1228             : 
    1229             : // heap.cc
    1230             : DEFINE_BOOL(gc_verbose, false, "print stuff during garbage collection")
    1231             : DEFINE_BOOL(code_stats, false, "report code statistics after GC")
    1232             : DEFINE_BOOL(print_handles, false, "report handles after GC")
    1233             : DEFINE_BOOL(check_handle_count, false,
    1234             :             "Check that there are not too many handles at GC")
    1235             : DEFINE_BOOL(print_global_handles, false, "report global handles after GC")
    1236             : 
    1237             : // TurboFan debug-only flags.
    1238             : DEFINE_BOOL(trace_turbo_escape, false, "enable tracing in escape analysis")
    1239             : 
    1240             : // objects.cc
    1241             : DEFINE_BOOL(trace_module_status, false,
    1242             :             "Trace status transitions of ECMAScript modules")
    1243             : DEFINE_BOOL(trace_normalization, false,
    1244             :             "prints when objects are turned into dictionaries.")
    1245             : 
    1246             : // runtime.cc
    1247             : DEFINE_BOOL(trace_lazy, false, "trace lazy compilation")
    1248             : 
    1249             : // spaces.cc
    1250             : DEFINE_BOOL(collect_heap_spill_statistics, false,
    1251             :             "report heap spill statistics along with heap_stats "
    1252             :             "(requires heap_stats)")
    1253             : DEFINE_BOOL(trace_isolates, false, "trace isolate state changes")
    1254             : 
    1255             : // Regexp
    1256             : DEFINE_BOOL(regexp_possessive_quantifier, false,
    1257             :             "enable possessive quantifier syntax for testing")
    1258             : DEFINE_BOOL(trace_regexp_bytecodes, false, "trace regexp bytecode execution")
    1259             : DEFINE_BOOL(trace_regexp_assembler, false,
    1260             :             "trace regexp macro assembler calls.")
    1261             : DEFINE_BOOL(trace_regexp_parser, false, "trace regexp parsing")
    1262             : 
    1263             : // Debugger
    1264             : DEFINE_BOOL(print_break_location, false, "print source location on debug break")
    1265             : 
    1266             : // wasm instance management
    1267             : DEFINE_DEBUG_BOOL(trace_wasm_instances, false,
    1268             :                   "trace creation and collection of wasm instances")
    1269             : 
    1270             : //
    1271             : // Logging and profiling flags
    1272             : //
    1273             : #undef FLAG
    1274             : #define FLAG FLAG_FULL
    1275             : 
    1276             : // log.cc
    1277             : DEFINE_BOOL(log, false,
    1278             :             "Minimal logging (no API, code, GC, suspect, or handles samples).")
    1279             : DEFINE_BOOL(log_all, false, "Log all events to the log file.")
    1280             : DEFINE_BOOL(log_api, false, "Log API events to the log file.")
    1281             : DEFINE_BOOL(log_code, false,
    1282             :             "Log code events to the log file without profiling.")
    1283             : DEFINE_BOOL(log_handles, false, "Log global handle events.")
    1284             : DEFINE_BOOL(log_suspect, false, "Log suspect operations.")
    1285             : DEFINE_BOOL(log_source_code, false, "Log source code.")
    1286             : DEFINE_BOOL(log_function_events, false,
    1287             :             "Log function events "
    1288             :             "(parse, compile, execute) separately.")
    1289             : DEFINE_BOOL(prof, false,
    1290             :             "Log statistical profiling information (implies --log-code).")
    1291             : 
    1292             : DEFINE_BOOL(detailed_line_info, false,
    1293             :             "Always generate detailed line information for CPU profiling.")
    1294             : 
    1295             : #if defined(ANDROID)
    1296             : // Phones and tablets have processors that are much slower than desktop
    1297             : // and laptop computers for which current heuristics are tuned.
    1298             : #define DEFAULT_PROF_SAMPLING_INTERVAL 5000
    1299             : #else
    1300             : #define DEFAULT_PROF_SAMPLING_INTERVAL 1000
    1301             : #endif
    1302             : DEFINE_INT(prof_sampling_interval, DEFAULT_PROF_SAMPLING_INTERVAL,
    1303             :            "Interval for --prof samples (in microseconds).")
    1304             : #undef DEFAULT_PROF_SAMPLING_INTERVAL
    1305             : 
    1306             : DEFINE_BOOL(prof_cpp, false, "Like --prof, but ignore generated code.")
    1307      168676 : DEFINE_IMPLICATION(prof, prof_cpp)
    1308             : DEFINE_BOOL(prof_browser_mode, true,
    1309             :             "Used with --prof, turns on browser-compatible mode for profiling.")
    1310             : DEFINE_STRING(logfile, "v8.log", "Specify the name of the log file.")
    1311             : DEFINE_BOOL(logfile_per_isolate, true, "Separate log files for each isolate.")
    1312             : DEFINE_BOOL(ll_prof, false, "Enable low-level linux profiler.")
    1313             : DEFINE_BOOL(interpreted_frames_native_stack, false,
    1314             :             "Show interpreted frames on the native stack (useful for external "
    1315             :             "profilers).")
    1316             : DEFINE_BOOL(perf_basic_prof, false,
    1317             :             "Enable perf linux profiler (basic support).")
    1318      168676 : DEFINE_NEG_IMPLICATION(perf_basic_prof, compact_code_space)
    1319             : DEFINE_BOOL(perf_basic_prof_only_functions, false,
    1320             :             "Only report function code ranges to perf (i.e. no stubs).")
    1321      168676 : DEFINE_IMPLICATION(perf_basic_prof_only_functions, perf_basic_prof)
    1322             : DEFINE_BOOL(perf_prof, false,
    1323             :             "Enable perf linux profiler (experimental annotate support).")
    1324      168676 : DEFINE_NEG_IMPLICATION(perf_prof, compact_code_space)
    1325             : // TODO(v8:8462) Remove implication once perf supports remapping.
    1326      168676 : DEFINE_NEG_IMPLICATION(perf_prof, write_protect_code_memory)
    1327      168676 : DEFINE_NEG_IMPLICATION(perf_prof, wasm_write_protect_code_memory)
    1328             : DEFINE_BOOL(perf_prof_unwinding_info, false,
    1329             :             "Enable unwinding info for perf linux profiler (experimental).")
    1330      168676 : DEFINE_IMPLICATION(perf_prof, perf_prof_unwinding_info)
    1331             : DEFINE_STRING(gc_fake_mmap, "/tmp/__v8_gc__",
    1332             :               "Specify the name of the file for fake gc mmap used in ll_prof")
    1333             : DEFINE_BOOL(log_internal_timer_events, false, "Time internal events.")
    1334             : DEFINE_BOOL(log_timer_events, false,
    1335             :             "Time events including external callbacks.")
    1336      168676 : DEFINE_IMPLICATION(log_timer_events, log_internal_timer_events)
    1337      168676 : DEFINE_IMPLICATION(log_internal_timer_events, prof)
    1338             : DEFINE_BOOL(log_instruction_stats, false, "Log AArch64 instruction statistics.")
    1339             : DEFINE_STRING(log_instruction_file, "arm64_inst.csv",
    1340             :               "AArch64 instruction statistics log file.")
    1341             : DEFINE_INT(log_instruction_period, 1 << 22,
    1342             :            "AArch64 instruction statistics logging period.")
    1343             : 
    1344             : DEFINE_BOOL(redirect_code_traces, false,
    1345             :             "output deopt information and disassembly into file "
    1346             :             "code-<pid>-<isolate id>.asm")
    1347             : DEFINE_STRING(redirect_code_traces_to, nullptr,
    1348             :               "output deopt information and disassembly into the given file")
    1349             : 
    1350             : DEFINE_BOOL(print_opt_source, false,
    1351             :             "print source code of optimized and inlined functions")
    1352             : 
    1353             : //
    1354             : // Disassembler only flags
    1355             : //
    1356             : #undef FLAG
    1357             : #ifdef ENABLE_DISASSEMBLER
    1358             : #define FLAG FLAG_FULL
    1359             : #else
    1360             : #define FLAG FLAG_READONLY
    1361             : #endif
    1362             : 
    1363             : // elements.cc
    1364             : DEFINE_BOOL(trace_elements_transitions, false, "trace elements transitions")
    1365             : 
    1366             : DEFINE_BOOL(trace_creation_allocation_sites, false,
    1367             :             "trace the creation of allocation sites")
    1368             : 
    1369             : // codegen-ia32.cc / codegen-arm.cc
    1370             : DEFINE_BOOL(print_code, false, "print generated code")
    1371             : DEFINE_BOOL(print_opt_code, false, "print optimized code")
    1372             : DEFINE_STRING(print_opt_code_filter, "*", "filter for printing optimized code")
    1373             : DEFINE_BOOL(print_code_verbose, false, "print more information for code")
    1374             : DEFINE_BOOL(print_builtin_code, false, "print generated code for builtins")
    1375             : DEFINE_STRING(print_builtin_code_filter, "*",
    1376             :               "filter for printing builtin code")
    1377             : DEFINE_BOOL(print_builtin_size, false, "print code size for builtins")
    1378             : 
    1379             : #ifdef ENABLE_DISASSEMBLER
    1380             : DEFINE_BOOL(sodium, false,
    1381             :             "print generated code output suitable for use with "
    1382             :             "the Sodium code viewer")
    1383             : 
    1384             : DEFINE_IMPLICATION(sodium, print_code)
    1385             : DEFINE_IMPLICATION(sodium, print_opt_code)
    1386             : DEFINE_IMPLICATION(sodium, code_comments)
    1387             : 
    1388             : DEFINE_BOOL(print_all_code, false, "enable all flags related to printing code")
    1389             : DEFINE_IMPLICATION(print_all_code, print_code)
    1390             : DEFINE_IMPLICATION(print_all_code, print_opt_code)
    1391             : DEFINE_IMPLICATION(print_all_code, print_code_verbose)
    1392             : DEFINE_IMPLICATION(print_all_code, print_builtin_code)
    1393             : DEFINE_IMPLICATION(print_all_code, code_comments)
    1394             : #endif
    1395             : 
    1396             : #undef FLAG
    1397             : #define FLAG FLAG_FULL
    1398             : 
    1399             : //
    1400             : // Predictable mode related flags.
    1401             : //
    1402             : 
    1403             : DEFINE_BOOL(predictable, false, "enable predictable mode")
    1404      168676 : DEFINE_IMPLICATION(predictable, single_threaded)
    1405      168676 : DEFINE_NEG_IMPLICATION(predictable, memory_reducer)
    1406      168676 : DEFINE_VALUE_IMPLICATION(single_threaded, wasm_num_compilation_tasks, 0)
    1407      168676 : DEFINE_NEG_IMPLICATION(single_threaded, wasm_async_compilation)
    1408             : 
    1409             : DEFINE_BOOL(predictable_gc_schedule, false,
    1410             :             "Predictable garbage collection schedule. Fixes heap growing, "
    1411             :             "idle, and memory reducing behavior.")
    1412      168676 : DEFINE_VALUE_IMPLICATION(predictable_gc_schedule, min_semi_space_size, 4)
    1413      168676 : DEFINE_VALUE_IMPLICATION(predictable_gc_schedule, max_semi_space_size, 4)
    1414      168676 : DEFINE_VALUE_IMPLICATION(predictable_gc_schedule, heap_growing_percent, 30)
    1415      168676 : DEFINE_NEG_IMPLICATION(predictable_gc_schedule, idle_time_scavenge)
    1416      168676 : DEFINE_NEG_IMPLICATION(predictable_gc_schedule, memory_reducer)
    1417             : 
    1418             : //
    1419             : // Threading related flags.
    1420             : //
    1421             : 
    1422             : DEFINE_BOOL(single_threaded, false, "disable the use of background tasks")
    1423      168676 : DEFINE_IMPLICATION(single_threaded, single_threaded_gc)
    1424      168676 : DEFINE_NEG_IMPLICATION(single_threaded, concurrent_recompilation)
    1425      168676 : DEFINE_NEG_IMPLICATION(single_threaded, compiler_dispatcher)
    1426             : 
    1427             : //
    1428             : // Parallel and concurrent GC (Orinoco) related flags.
    1429             : //
    1430             : DEFINE_BOOL(single_threaded_gc, false, "disable the use of background gc tasks")
    1431      168676 : DEFINE_NEG_IMPLICATION(single_threaded_gc, concurrent_marking)
    1432      168676 : DEFINE_NEG_IMPLICATION(single_threaded_gc, concurrent_sweeping)
    1433      168676 : DEFINE_NEG_IMPLICATION(single_threaded_gc, parallel_compaction)
    1434      168676 : DEFINE_NEG_IMPLICATION(single_threaded_gc, parallel_marking)
    1435      168676 : DEFINE_NEG_IMPLICATION(single_threaded_gc, parallel_pointer_update)
    1436      168676 : DEFINE_NEG_IMPLICATION(single_threaded_gc, parallel_scavenge)
    1437      168676 : DEFINE_NEG_IMPLICATION(single_threaded_gc, concurrent_store_buffer)
    1438             : #ifdef ENABLE_MINOR_MC
    1439      168676 : DEFINE_NEG_IMPLICATION(single_threaded_gc, minor_mc_parallel_marking)
    1440             : #endif  // ENABLE_MINOR_MC
    1441      168676 : DEFINE_NEG_IMPLICATION(single_threaded_gc, concurrent_array_buffer_freeing)
    1442             : 
    1443             : #undef FLAG
    1444             : 
    1445             : #ifdef VERIFY_PREDICTABLE
    1446             : #define FLAG FLAG_FULL
    1447             : #else
    1448             : #define FLAG FLAG_READONLY
    1449             : #endif
    1450             : 
    1451             : DEFINE_BOOL(verify_predictable, false,
    1452             :             "this mode is used for checking that V8 behaves predictably")
    1453             : DEFINE_INT(dump_allocations_digest_at_alloc, -1,
    1454             :            "dump allocations digest each n-th allocation")
    1455             : 
    1456             : //
    1457             : // Read-only flags
    1458             : //
    1459             : #undef FLAG
    1460             : #define FLAG FLAG_READONLY
    1461             : 
    1462             : // assembler.h
    1463             : DEFINE_BOOL(enable_embedded_constant_pool, V8_EMBEDDED_CONSTANT_POOL,
    1464             :             "enable use of embedded constant pools (PPC only)")
    1465             : 
    1466             : DEFINE_BOOL(unbox_double_fields, V8_DOUBLE_FIELDS_UNBOXING,
    1467             :             "enable in-object double fields unboxing (64-bit only)")
    1468      168676 : DEFINE_IMPLICATION(unbox_double_fields, track_double_fields)
    1469             : 
    1470             : DEFINE_BOOL(lite_mode, V8_LITE_BOOL,
    1471             :             "enables trade-off of performance for memory savings "
    1472             :             "(Lite mode only)")
    1473             : 
    1474             : // Cleanup...
    1475             : #undef FLAG_FULL
    1476             : #undef FLAG_READONLY
    1477             : #undef FLAG
    1478             : #undef FLAG_ALIAS
    1479             : 
    1480             : #undef DEFINE_BOOL
    1481             : #undef DEFINE_MAYBE_BOOL
    1482             : #undef DEFINE_DEBUG_BOOL
    1483             : #undef DEFINE_INT
    1484             : #undef DEFINE_STRING
    1485             : #undef DEFINE_FLOAT
    1486             : #undef DEFINE_IMPLICATION
    1487             : #undef DEFINE_NEG_IMPLICATION
    1488             : #undef DEFINE_NEG_VALUE_IMPLICATION
    1489             : #undef DEFINE_VALUE_IMPLICATION
    1490             : #undef DEFINE_ALIAS_BOOL
    1491             : #undef DEFINE_ALIAS_INT
    1492             : #undef DEFINE_ALIAS_STRING
    1493             : #undef DEFINE_ALIAS_FLOAT
    1494             : 
    1495             : #undef FLAG_MODE_DECLARE
    1496             : #undef FLAG_MODE_DEFINE
    1497             : #undef FLAG_MODE_DEFINE_DEFAULTS
    1498             : #undef FLAG_MODE_META
    1499             : #undef FLAG_MODE_DEFINE_IMPLICATIONS
    1500             : 
    1501             : #undef COMMA

Generated by: LCOV version 1.10