15#define DEFINE_IMPLICATION(whenflag, thenflag) \
16 DEFINE_VALUE_IMPLICATION(whenflag, thenflag, true)
20#define DEFINE_WEAK_IMPLICATION(whenflag, thenflag) \
21 DEFINE_WEAK_VALUE_IMPLICATION(whenflag, thenflag, true)
23#define DEFINE_WEAK_NEG_IMPLICATION(whenflag, thenflag) \
24 DEFINE_WEAK_VALUE_IMPLICATION(whenflag, thenflag, false)
26#define DEFINE_NEG_IMPLICATION(whenflag, thenflag) \
27 DEFINE_VALUE_IMPLICATION(whenflag, thenflag, false)
29#define DEFINE_NEG_NEG_IMPLICATION(whenflag, thenflag) \
30 DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, false)
34#if defined(FLAG_MODE_DECLARE)
35#define FLAG_FULL(ftype, ctype, nam, def, cmt) FlagValue<ctype> nam{def};
36#define FLAG_READONLY(ftype, ctype, nam, def, cmt) \
37 static constexpr FlagValue<ctype> nam{def};
42#elif defined(FLAG_MODE_DEFINE_DEFAULTS)
43#define FLAG_FULL(ftype, ctype, nam, def, cmt) \
44 static constexpr ctype FLAGDEFAULT_##nam{def};
45#define FLAG_READONLY(ftype, ctype, nam, def, cmt) \
46 static constexpr ctype FLAGDEFAULT_##nam{def};
50#elif defined(FLAG_MODE_META)
51#define FLAG_FULL(ftype, ctype, nam, def, cmt) \
52 {Flag::TYPE_##ftype, #nam, &v8_flags.nam, &FLAGDEFAULT_##nam, cmt, false},
55#define FLAG_READONLY(ftype, ctype, nam, def, cmt) \
56 {Flag::TYPE_##ftype, #nam, nullptr, &FLAGDEFAULT_##nam, cmt, false},
57#define FLAG_ALIAS(ftype, ctype, alias, nam) \
58 {Flag::TYPE_##ftype, #alias, &v8_flags.nam, &FLAGDEFAULT_##nam, \
59 "alias for --" #nam, false},
62#elif defined(FLAG_MODE_DEFINE_IMPLICATIONS)
63#define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value) \
64 changed |= TriggerImplication(v8_flags.whenflag, #whenflag, \
65 &v8_flags.thenflag, #thenflag, value, false);
69#define DEFINE_WEAK_VALUE_IMPLICATION(whenflag, thenflag, value) \
70 changed |= TriggerImplication(v8_flags.whenflag, #whenflag, \
71 &v8_flags.thenflag, #thenflag, value, true);
73#define DEFINE_GENERIC_IMPLICATION(whenflag, statement) \
74 if (v8_flags.whenflag) statement;
76#define DEFINE_REQUIREMENT(statement) CHECK(statement);
78#define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value) \
79 changed |= TriggerImplication(!v8_flags.whenflag, "!" #whenflag, \
80 &v8_flags.thenflag, #thenflag, value, false);
82#define DEFINE_NEG_VALUE_VALUE_IMPLICATION(whenflag, whenvalue, thenflag, \
85 TriggerImplication(v8_flags.whenflag != whenvalue, #whenflag, \
86 &v8_flags.thenflag, #thenflag, thenvalue, false);
88#define DEFINE_MIN_VALUE_IMPLICATION(flag, min_value) \
89 changed |= TriggerImplication(v8_flags.flag < min_value, #flag, \
90 &v8_flags.flag, #flag, min_value, false);
92#define DEFINE_DISABLE_FLAG_IMPLICATION(whenflag, thenflag) \
93 if (v8_flags.whenflag && v8_flags.thenflag) { \
94 PrintF(stderr, "Warning: disabling flag --" #thenflag \
95 " due to conflicting flags\n"); \
97 DEFINE_VALUE_IMPLICATION(whenflag, thenflag, false)
100#elif defined(FLAG_MODE_APPLY)
102#define FLAG_FULL FLAG_MODE_APPLY
105#error No mode supplied when including flags.defs
110#define FLAG_FULL(ftype, ctype, nam, def, cmt)
114#define FLAG_READONLY(ftype, ctype, nam, def, cmt)
118#define FLAG_ALIAS(ftype, ctype, alias, nam)
121#ifndef DEFINE_VALUE_IMPLICATION
122#define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value)
125#ifndef DEFINE_WEAK_VALUE_IMPLICATION
126#define DEFINE_WEAK_VALUE_IMPLICATION(whenflag, thenflag, value)
129#ifndef DEFINE_GENERIC_IMPLICATION
130#define DEFINE_GENERIC_IMPLICATION(whenflag, statement)
133#ifndef DEFINE_NEG_VALUE_IMPLICATION
134#define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value)
136#ifndef DEFINE_NEG_VALUE_VALUE_IMPLICATION
137#define DEFINE_NEG_VALUE_VALUE_IMPLICATION(whenflag, whenvalue, thenflag, \
141#ifndef DEFINE_MIN_VALUE_IMPLICATION
142#define DEFINE_MIN_VALUE_IMPLICATION(flag, min_value)
145#ifndef DEFINE_DISABLE_FLAG_IMPLICATION
146#define DEFINE_DISABLE_FLAG_IMPLICATION(whenflag, thenflag)
149#ifndef DEFINE_REQUIREMENT
150#define DEFINE_REQUIREMENT(statement)
154#error DEBUG_BOOL must be defined at this point.
157#if V8_ENABLE_SPARKPLUG
158#define ENABLE_SPARKPLUG_BY_DEFAULT true
160#define ENABLE_SPARKPLUG_BY_DEFAULT false
168#if !defined(ARM_TEST_NO_FEATURE_PROBE) || \
169 (defined(CAN_USE_ARMV8_INSTRUCTIONS) && \
170 defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(CAN_USE_SUDIV) && \
171 defined(CAN_USE_NEON) && defined(CAN_USE_VFP3_INSTRUCTIONS))
172#define ARM_ARCH_DEFAULT "armv8"
173#elif defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(CAN_USE_SUDIV) && \
174 defined(CAN_USE_NEON) && defined(CAN_USE_VFP3_INSTRUCTIONS)
175#define ARM_ARCH_DEFAULT "armv7+sudiv"
176#elif defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(CAN_USE_NEON) && \
177 defined(CAN_USE_VFP3_INSTRUCTIONS)
178#define ARM_ARCH_DEFAULT "armv7"
180#define ARM_ARCH_DEFAULT "armv6"
184#define ENABLE_LOG_COLOUR false
186#define ENABLE_LOG_COLOUR true
189#define DEFINE_BOOL(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt)
190#define DEFINE_BOOL_READONLY(nam, def, cmt) \
191 FLAG_READONLY(BOOL, bool, nam, def, cmt)
192#define DEFINE_MAYBE_BOOL(nam, cmt) \
193 FLAG(MAYBE_BOOL, std::optional<bool>, nam, std::nullopt, cmt)
194#define DEFINE_INT(nam, def, cmt) FLAG(INT, int, nam, def, cmt)
195#define DEFINE_UINT(nam, def, cmt) FLAG(UINT, unsigned int, nam, def, cmt)
196#define DEFINE_UINT_READONLY(nam, def, cmt) \
197 FLAG_READONLY(UINT, unsigned int, nam, def, cmt)
198#define DEFINE_UINT64(nam, def, cmt) FLAG(UINT64, uint64_t, nam, def, cmt)
199#define DEFINE_FLOAT(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt)
200#define DEFINE_SIZE_T(nam, def, cmt) FLAG(SIZE_T, size_t, nam, def, cmt)
201#define DEFINE_STRING(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt)
202#define DEFINE_ALIAS_BOOL(alias, nam) FLAG_ALIAS(BOOL, bool, alias, nam)
203#define DEFINE_ALIAS_INT(alias, nam) FLAG_ALIAS(INT, int, alias, nam)
204#define DEFINE_ALIAS_FLOAT(alias, nam) FLAG_ALIAS(FLOAT, double, alias, nam)
205#define DEFINE_ALIAS_SIZE_T(alias, nam) FLAG_ALIAS(SIZE_T, size_t, alias, nam)
206#define DEFINE_ALIAS_STRING(alias, nam) \
207 FLAG_ALIAS(STRING, const char*, alias, nam)
210#define DEFINE_DEBUG_BOOL DEFINE_BOOL
212#define DEFINE_DEBUG_BOOL DEFINE_BOOL_READONLY
218#define FLAG FLAG_FULL
229 "Indicates that V8 is running with experimental features enabled. "
230 "This flag is typically not set explicitly but instead enabled as "
231 "an implication of other flags which enable experimental features.")
232#define DEFINE_EXPERIMENTAL_FEATURE(nam, cmt) \
233 FLAG(BOOL, bool, nam, false, cmt " (experimental)") \
234 DEFINE_IMPLICATION(nam, experimental)
239 "Disallow flags or implications overriding each other.")
245 "Exit with return code 0 on contradictory flags.")
248 abort_on_contradictory_flags)
253 "temporary disable flag contradiction to allow overwriting just "
257DEFINE_BOOL(use_strict, false, "enforce strict mode")
259DEFINE_BOOL(trace_temporal, false, "trace temporal code")
261DEFINE_BOOL(harmony, false, "enable all completed harmony features")
262DEFINE_BOOL(harmony_shipping, true, "enable all shipped harmony features")
264DEFINE_BOOL(js_staging, false, "enable all completed JavaScript features")
265DEFINE_BOOL(js_shipping, true, "enable all shipped JavaScript features")
275#define HARMONY_INPROGRESS_BASE(V) \
276 V(harmony_temporal, "Temporal") \
277 V(harmony_shadow_realm, "harmony ShadowRealm") \
278 V(harmony_struct, "harmony structs, shared structs, and shared arrays")
280#define JAVASCRIPT_INPROGRESS_FEATURES_BASE(V) \
281 V(js_decorators, "decorators") \
282 V(js_source_phase_imports, "source phase imports") \
283 V(js_base_64, "Uint8Array to/from base64 and hex")
285#ifdef V8_INTL_SUPPORT
286#define HARMONY_INPROGRESS(V) \
287 HARMONY_INPROGRESS_BASE(V) \
288 V(harmony_intl_best_fit_matcher, "Intl BestFitMatcher")
289#define JAVASCRIPT_INPROGRESS_FEATURES(V) JAVASCRIPT_INPROGRESS_FEATURES_BASE(V)
291#define HARMONY_INPROGRESS(V) HARMONY_INPROGRESS_BASE(V)
292#define JAVASCRIPT_INPROGRESS_FEATURES(V) JAVASCRIPT_INPROGRESS_FEATURES_BASE(V)
296#define HARMONY_STAGED_BASE(V)
297#define JAVASCRIPT_STAGED_FEATURES_BASE(V) \
298 V(js_explicit_resource_management, "explicit resource management") \
300 "Float16Array, Math.f16round, DataView.getFloat16, DataView.setFloat16")
302#ifdef V8_INTL_SUPPORT
303#define HARMONY_STAGED(V) \
304 HARMONY_STAGED_BASE(V) \
305 V(harmony_remove_intl_locale_info_getters, \
306 "Remove Obsoleted Intl Locale Info getters")
307#define JAVASCRIPT_STAGED_FEATURES(V) JAVASCRIPT_STAGED_FEATURES_BASE(V)
309#define HARMONY_STAGED(V) HARMONY_STAGED_BASE(V)
310#define JAVASCRIPT_STAGED_FEATURES(V) JAVASCRIPT_STAGED_FEATURES_BASE(V)
314#define HARMONY_SHIPPING_BASE(V) \
315 V(harmony_import_attributes, "harmony import attributes")
317#define JAVASCRIPT_SHIPPING_FEATURES_BASE(V) \
318 V(js_regexp_duplicate_named_groups, "RegExp duplicate named groups") \
319 V(js_regexp_modifiers, "RegExp modifiers") \
320 V(js_promise_try, "Promise.try") \
321 V(js_atomics_pause, "Atomics.pause") \
322 V(js_error_iserror, "Error.isError") \
323 V(js_regexp_escape, "RegExp.escape")
325#ifdef V8_INTL_SUPPORT
326#define HARMONY_SHIPPING(V) HARMONY_SHIPPING_BASE(V)
327#define JAVASCRIPT_SHIPPING_FEATURES(V) JAVASCRIPT_SHIPPING_FEATURES_BASE(V)
329#define HARMONY_SHIPPING(V) HARMONY_SHIPPING_BASE(V)
330#define JAVASCRIPT_SHIPPING_FEATURES(V) JAVASCRIPT_SHIPPING_FEATURES_BASE(V)
341#define FLAG_INPROGRESS_FEATURES(id, description) \
342 DEFINE_BOOL(id, false, \
343 "enable " #description " (in progress / experimental)") \
344 DEFINE_IMPLICATION(id, experimental)
347#undef FLAG_INPROGRESS_FEATURES
349#define FLAG_STAGED_FEATURES(id, description) \
350 DEFINE_BOOL(id, false, "enable " #description) \
351 DEFINE_IMPLICATION(harmony, id) \
352 DEFINE_IMPLICATION(js_staging, id)
356#undef FLAG_STAGED_FEATURES
358#define FLAG_SHIPPING_FEATURES(id, description) \
359 DEFINE_BOOL(id, true, "enable " #description) \
360 DEFINE_NEG_NEG_IMPLICATION(harmony_shipping, id) \
361 DEFINE_NEG_NEG_IMPLICATION(js_shipping, id)
365#undef FLAG_SHIPPING_FEATURES
368 "subclassing support in built-in methods")
375 "enable the SharedArrayBuffer constructor per context")
377#ifdef V8_INTL_SUPPORT
378DEFINE_BOOL(icu_timezone_data,
true,
"get information about timezones from ICU")
381#ifdef V8_ENABLE_DOUBLE_CONST_STORE_CHECK
382#define V8_ENABLE_DOUBLE_CONST_STORE_CHECK_BOOL true
384#define V8_ENABLE_DOUBLE_CONST_STORE_CHECK_BOOL false
387#ifdef V8_ENABLE_LAZY_SOURCE_POSITIONS
388#define V8_LAZY_SOURCE_POSITIONS_BOOL true
390#define V8_LAZY_SOURCE_POSITIONS_BOOL false
394 "disables sharing of the read-only heap for testing")
405#define V8_LITE_MODE_BOOL true
407#define V8_LITE_MODE_BOOL false
411 "enables trade-off of performance for memory savings")
417#ifdef V8_ALLOCATION_FOLDING
418#define V8_ALLOCATION_FOLDING_BOOL true
420#define V8_ALLOCATION_FOLDING_BOOL false
424 "Use allocation folding globally")
427#ifdef V8_DISABLE_WRITE_BARRIERS
428#define V8_DISABLE_WRITE_BARRIERS_BOOL true
430#define V8_DISABLE_WRITE_BARRIERS_BOOL false
434 "disable write barriers when GC is non-incremental "
435 "and heap contains single generation.")
443#ifdef V8_ENABLE_UNCONDITIONAL_WRITE_BARRIERS
444#define V8_ENABLE_UNCONDITIONAL_WRITE_BARRIERS_BOOL true
446#define V8_ENABLE_UNCONDITIONAL_WRITE_BARRIERS_BOOL false
451 "always use full write barriers")
453#ifdef V8_ENABLE_SINGLE_GENERATION
454#define V8_SINGLE_GENERATION_BOOL true
456#define V8_SINGLE_GENERATION_BOOL false
461 "allocate all objects from young generation to old generation")
463#ifdef V8_ENABLE_CONSERVATIVE_STACK_SCANNING
464#define V8_ENABLE_CONSERVATIVE_STACK_SCANNING_BOOL true
466#define V8_ENABLE_CONSERVATIVE_STACK_SCANNING_BOOL false
470 "use conservative stack scanning")
472 scavenger_conservative_object_pinning)
475#ifdef V8_ENABLE_DIRECT_HANDLE
476#define V8_ENABLE_DIRECT_HANDLE_BOOL true
478#define V8_ENABLE_DIRECT_HANDLE_BOOL false
481 "use direct handles with conservative stack scanning")
487 "Objects reachable from the native stack during "
488 "scavenge will be pinned and "
491 stress_scavenger_conservative_object_pinning, false,
492 "Treat some precise references as conservative references to stress "
495 scavenger_conservative_object_pinning)
499 scavenger_max_new_space_capacity_mb, 1u)
500DEFINE_BOOL(stress_scavenger_conservative_object_pinning_random, false,
501 "Enables random stressing of
object pinning in
Scavenger, such "
502 "that each GC would randomly pick a subset of the precise "
503 "references to treat conservatively")
505 stress_scavenger_conservative_object_pinning)
507DEFINE_BOOL(scavenger_precise_object_pinning, false,
508 "Objects reachable from handles during scavenge "
509 "will be pinned and won't move.")
512 precise_object_pinning, false,
513 "Objects reachable from handles during GC will be pinned and won't move.")
516DEFINE_BOOL(scavenger_promote_quarantined_pages, true,
517 "Quarantined pages in the intermediate generation will be promoted "
520#ifdef V8_ENABLE_LOCAL_OFF_STACK_CHECK
521#define V8_ENABLE_LOCAL_OFF_STACK_CHECK_BOOL true
523#define V8_ENABLE_LOCAL_OFF_STACK_CHECK_BOOL false
527 "check for off-stack allocation of v8::Local")
529#ifdef V8_ENABLE_FUTURE
530#define FUTURE_BOOL true
532#define FUTURE_BOOL false
535 "Implies all staged features that we want to ship in the "
536 "not-too-far future")
539 "force emit tier-up logic from all non-turbofan code, even if it "
540 "is the top enabled tier")
541#ifdef V8_ENABLE_MAGLEV
542DEFINE_BOOL(maglev,
true,
"enable the maglev optimizing compiler")
550 "enable maglev features that we want to ship in the not-too-far future")
553 optimize_on_next_call_optimizes_to_maglev, false,
554 "make OptimizeFunctionOnNextCall optimize to maglev instead of turbofan")
558DEFINE_BOOL(stress_maglev, false, "trigger maglev compilation earlier")
565 maglev_future, false,
566 "enable maglev features that we want to ship in the not-too-far future")
569 optimize_on_next_call_optimizes_to_maglev, false,
570 "make OptimizeFunctionOnNextCall optimize to maglev instead of turbofan")
574 "enable inlining in the maglev optimizing compiler")
576 "enable loop peeling in the maglev optimizing compiler")
578 "enable aggressive optimizations for
loops (loop SPeeling) in the "
579 "maglev optimizing compiler")
581 "max loop size for loop peeling in the maglev optimizing compiler")
583 maglev_loop_peeling_max_size_cumulative, 900,
584 "max cumulative size for loop peeling in the maglev optimizing compiler")
586 "Generate deopt data on background thread")
588 "Generate code on background thread")
590 maglev_deopt_data_on_background)
592 "Destroy compilation jobs on background thread")
594 "Inline CallApiCallback builtin into generated code")
596 "Native support for cons strings and their elision in maglev.")
598 "Recursively pretenure values which are stored into pretenured "
612 concurrent_maglev_max_threads, 2,
613 "max number of threads that concurrent Maglev can use (0 for unbounded)")
614DEFINE_BOOL(concurrent_maglev_high_priority_threads, false,
615 "use high
priority compiler threads for concurrent Maglev")
618 max_maglev_inline_depth, 1,
619 "max depth of functions that Maglev will inline excl. small functions")
621 max_maglev_hard_inline_depth, 10,
622 "max depth of functions that Maglev will inline incl. small functions")
624 "maximum size of bytecode for a single inlining")
625DEFINE_INT(max_maglev_inlined_bytecode_size_cumulative, 920,
626 "maximum cumulative size of bytecode considered for inlining excl. "
629 "maximum size of bytecode considered for small function inlining")
631 "minimum frequency for inlining")
635 max_maglev_inlined_bytecode_size_cumulative, 920)
638 "reuse stack slots in the maglev optimizing compiler")
640 "enable phi untagging in the maglev optimizing compiler")
641DEFINE_BOOL(maglev_hoist_osr_value_phi_untagging, true,
642 "enable phi untagging to hoist untagging of osr values")
644 maglev_speculative_hoist_phi_untagging,
645 "enable phi untagging to hoist untagging of loop phi inputs (could "
646 "still cause deopt
loops)")
647DEFINE_BOOL(maglev_cse, true, "common subexpression elimination")
650 "enable Maglev non-eager inlining")
653 "enable
Turbolev non-eager inlining")
656DEFINE_BOOL(maglev_inlining_following_eager_order, false,
657 "enable Maglev non-eager inlining using the same order as eager "
658 "inlining (for testing)")
660 maglev_non_eager_inlining)
662DEFINE_STRING(maglev_filter, "*", "optimization filter for the maglev compiler")
664 "filter for maglev's tracing/printing options")
665DEFINE_BOOL(maglev_assert, false, "insert extra assertion in maglev code")
667 "insert stack size checks before every IR node")
670 "print feedback vector for maglev compiled code")
672 "print bytecode / feedback vectors also for inlined code")
674DEFINE_BOOL(print_maglev_code, false, "print maglev code")
675DEFINE_BOOL(trace_maglev_graph_building, false, "trace maglev graph building")
676DEFINE_BOOL(trace_maglev_loop_speeling, false, "trace maglev loop SPeeling")
678DEFINE_BOOL(trace_maglev_inlining, false, "trace maglev inlining")
680 "trace maglev inlining (verbose)")
683#ifdef V8_ENABLE_MAGLEV_GRAPH_PRINTER
684DEFINE_BOOL(print_maglev_deopt_verbose,
false,
"print verbose deopt info")
686DEFINE_BOOL(print_maglev_graph, false, "print the final maglev graph")
687DEFINE_BOOL(print_maglev_graphs, false, "print maglev graph across all phases")
688DEFINE_BOOL(trace_maglev_phi_untagging, false, "trace maglev phi untagging")
689DEFINE_BOOL(trace_maglev_regalloc, false, "trace maglev register allocation")
692 "print verbose deopt info")
695 "print maglev graph across all phases")
697 "trace maglev phi untagging")
699 "trace maglev register allocation")
702DEFINE_BOOL(maglev_stats,
false,
"print Maglev statistics")
704 "print Maglev statistics in machine-readable format")
707DEFINE_BOOL(maglev_function_context_specialization, true,
708 "enable function context specialization in maglev")
710DEFINE_BOOL(maglev_skip_migration_check_for_polymorphic_access, false,
711 "skip generating a migration check when some maps of polymorphic "
712 "property access are migration targets")
714#ifdef V8_ENABLE_SPARKPLUG
718#ifdef V8_TARGET_ARCH_64_BIT
720 "Enable the use of AdditiveSafeInteger feedback")
724 "Enable the use of AdditiveSafeInteger feedback")
728 enable_enumerated_keyed_access_bytecode,
true,
729 "enable generating GetEnumeratedKeyedProperty bytecode for keyed access")
733 "Use const tracking on dictionary properties")
736 "Use const tracking on top-level `let` variables")
738DEFINE_BOOL(script_context_mutable_heap_number, true,
739 "Use mutable
heap numbers in script contexts")
741#if defined(V8_31BIT_SMIS_ON_64BIT_ARCH) || defined(V8_TARGET_ARCH_32_BIT)
742#define SUPPORT_SCRIPT_CONTEXT_MUTABLE_HEAP_INT32
743DEFINE_BOOL(script_context_mutable_heap_int32,
true,
744 "Use mutable heap int32 number in script contexts")
746 script_context_mutable_heap_number)
749 "Use mutable heap int32 number in script contexts")
753 "Use compilation dependency to avoid dynamic checks for "
754 "non-empty context extensions")
756DEFINE_BOOL(json_stringify_fast_path, false, "Enable JSON.stringify fast-path")
759#ifdef V8_ENABLE_EXTENSIBLE_RO_SNAPSHOT
761 "Whether custom embedder snapshots may extend ReadOnlySpace")
764 extensible_ro_snapshot,
false,
765 "Whether custom embedder snapshots may extend ReadOnlySpace")
769 "Set the maximal optimisation tier: "
770 "> 3 == any, 0 == ignition/interpreter, 1 == sparkplug/baseline, "
771 "2 == maglev, 3 == turbofan")
773#ifdef V8_ENABLE_TURBOFAN
776#ifdef V8_ENABLE_MAGLEV
779#ifdef V8_ENABLE_SPARKPLUG
786 "Forces efficiency mode on or off, disregarding any dynamic "
787 "signals. Efficiency mode is optimized for situations with "
788 "no latency requirements and uses fewer threads.")
791 "Forces battery saver mode on or off, disregarding any dynamic signals. "
792 "Battery saver tries to conserve overall cpu cycles spent.")
796 "Forces memory saver mode on or off, disregarding any dynamic signals. "
797 "Memory saver tries to keep memory footprint low at the expense of extra "
801DEFINE_BOOL(efficiency_mode_for_tiering_heuristics, true,
802 "Use efficiency mode in tiering heuristics.")
803DEFINE_BOOL(efficiency_mode_disable_turbofan, false,
804 "Defer tier-up to turbofan while in efficiency mode.")
805DEFINE_INT(efficiency_mode_delay_turbofan, 15000,
806 "Delay tier-up to turbofan to a certain invocation count while in "
811 wasm_trace_native,
nullptr,
812 "Select which native code sequence to use for
wasm trace instruction: "
816#define V8_JITLESS_BOOL true
818 "Disable runtime allocation of executable memory.")
820#define V8_JITLESS_BOOL false
822 "Disable runtime allocation of executable memory.")
832#ifdef V8_ENABLE_SPARKPLUG
836#ifdef V8_ENABLE_MAGLEV
843 disable_optimizing_compilers,
false,
844 "Disable all optimizing compilers while leaving baseline compilers enabled")
850#if V8_ENABLE_WEBASSEMBLY
861 script_context_mutable_heap_number)
864 "protect code memory with PKU if available")
867 "generate runtime type assertions to test the typer")
872 turboshaft_assert_types,
873 "generate runtime type assertions to test the turboshaft type system")
879 "verify graph generated by simplified lowering")
881DEFINE_BOOL(trace_compilation_dependencies, false, "trace code dependencies")
885#ifdef V8_ALLOCATION_SITE_TRACKING
886#define V8_ALLOCATION_SITE_TRACKING_BOOL true
888#define V8_ALLOCATION_SITE_TRACKING_BOOL false
892 "Enable allocation site tracking")
894 allocation_site_pretenuring)
898 "pretenure with allocation sites")
899DEFINE_BOOL(page_promotion, true, "promote pages based on utilization")
901 "min percentage of live bytes on a page to enable fast evacuation "
903DEFINE_INT(minor_ms_page_promotion_threshold, 50,
904 "min percentage of live bytes on a page to enable fast evacuation "
906DEFINE_INT(minor_ms_page_promotion_max_lab_threshold, 30,
907 "max percentage of labs out of a page to still be considered for "
910 "max age for a page after which it is force promoted to old space")
912 "max new space capacity in MBs when using MinorMS. When pointer "
913 "compression is disabled, twice the capacity is used.")
917#define DEFAULT_SCAVENGER_MAX_NEW_SPACE_CAPACITY_MB 8
919#define DEFAULT_SCAVENGER_MAX_NEW_SPACE_CAPACITY_MB 32
923 "max new space capacity in MBs when using Scavenger. When pointer "
924 "compression is disabled, twice the capacity is used.")
926#undef DEFAULT_SCAVENGER_MAX_NEW_SPACE_CAPACITY_MB
928DEFINE_BOOL(trace_page_promotions,
false,
"trace page promotion decisions")
930 "trace pretenuring decisions of HAllocate instructions")
932 "trace allocation site pretenuring statistics")
933DEFINE_BOOL(track_field_types, true, "track field types")
935 "trace collected block coverage information")
937 "trace protector cell invalidations")
939 "decommit, rather than discard pooled pages")
941 zero_unused_memory, false,
942 "Zero unused memory (except for memory which was discarded) on memory "
945#ifdef V8_MINORMS_STRING_SHORTCUTTING
947 "short cut strings during marking")
952 "short cut strings during marking")
956 "feed back normalization to constructors")
959 "internalize
string keys for generic keyed ICs on the fly")
962DEFINE_BOOL(unbox_double_arrays, true, "automatically unbox arrays of doubles")
966DEFINE_INT(invocation_count_for_feedback_allocation, 8,
967 "invocation count required for allocating feedback vectors")
972 "invocation count required for optimizing with Maglev")
975 "invocation count required for optimizing with Maglev")
977DEFINE_INT(invocation_count_for_maglev_osr, 100,
978 "invocation count required for maglev OSR")
980 "whether we try to OSR to Turbofan from OSR'd Maglev")
982 osr_from_maglev_interrupt_scale_factor, 0.8,
983 "Scale interrupt budget reduction for OSR from Maglev vs. OSR to Maglev")
985 "whether we try to OSR to Turbofan from any Maglev")
989DEFINE_INT(invocation_count_for_turbofan, 3000,
990 "invocation count required for optimizing with TurboFan")
991DEFINE_INT(invocation_count_for_osr, 500, "invocation count required for OSR")
993 "number to decrease the invocation budget by when we follow OSR")
994DEFINE_INT(minimum_invocations_after_ic_update, 500,
995 "How
long to minimally wait after IC update before tier up")
996DEFINE_INT(minimum_invocations_before_optimization, 2,
997 "Minimum number of invocations we need before non-OSR optimization")
1007 "Set JIT tiering thresholds suitable for JIT fuzzing")
1020#if V8_ENABLE_WEBASSEMBLY
1028 "use std::pow instead of our custom implementation")
1032DEFINE_BOOL(lazy_feedback_allocation, true, "Allocate feedback vectors lazily")
1033DEFINE_BOOL(stress_ic, false, "exercise interesting paths in ICs more often")
1036DEFINE_BOOL(ignition_elide_noneffectful_bytecodes, true,
1037 "elide bytecodes which won't have any external effect")
1038DEFINE_BOOL(ignition_reo, true, "use ignition register equivalence optimizer")
1039DEFINE_BOOL(ignition_filter_expression_positions, true,
1040 "filter expression positions before the bytecode pipeline")
1041DEFINE_BOOL(ignition_share_named_property_feedback, true,
1042 "share feedback slots when loading the same named property from "
1044DEFINE_BOOL(ignition_elide_redundant_tdz_checks, true,
1045 "elide TDZ checks dominated by other TDZ checks")
1047 "print bytecode generated by ignition interpreter")
1049 "skip generating source positions during initial compile but "
1050 "regenerate when actually required")
1052 "collect lazy source positions immediately after lazy compile")
1054 "filter for selecting which functions to print bytecode")
1055DEFINE_BOOL(omit_default_ctors, true, "omit calling default ctors in bytecode")
1056#ifdef V8_TRACE_UNOPTIMIZED
1058 "trace the bytecodes executed by all unoptimized execution")
1060 "trace the bytecodes executed by the ignition interpreter")
1062 "trace the bytecodes executed by the baseline code")
1066#ifdef V8_TRACE_FEEDBACK_UPDATES
1068 trace_feedback_updates,
false,
1069 "trace updates to feedback vectors during ignition interpreter execution.")
1072 "trace the codegen of ignition interpreter bytecode handlers")
1074 trace_ignition_dispatches_output_file,
nullptr,
1075 "write the bytecode handler dispatch table to the specified file (d8 only) "
1076 "(requires building with v8_enable_ignition_dispatch_counting)")
1079 "trace the tracking of allocation sites")
1080DEFINE_BOOL(trace_migration, false, "trace
object migration")
1081DEFINE_BOOL(trace_generalization, false, "trace map generalization")
1089#if V8_ENABLE_SPARKPLUG
1090#define FLAG FLAG_FULL
1092#define FLAG FLAG_READONLY
1095 "enable Sparkplug baseline compiler")
1096DEFINE_BOOL(always_sparkplug, false, "directly tier up to Sparkplug code")
1097#if V8_ENABLE_SPARKPLUG
1099DEFINE_BOOL(baseline_batch_compilation,
true,
"batch compile Sparkplug code")
1100#if defined(V8_OS_DARWIN) && defined(V8_HOST_ARCH_ARM64) && \
1101 !V8_HEAP_USE_PTHREAD_JIT_WRITE_PROTECT && \
1102 !V8_HEAP_USE_BECORE_JIT_WRITE_PROTECT
1105 "compile Sparkplug code in a background thread")
1108 "compile Sparkplug code in a background thread")
1115 concurrent_sparkplug_max_threads, 1,
1116 "max number of threads that concurrent Sparkplug can use (0 for unbounded)")
1117DEFINE_BOOL(concurrent_sparkplug_high_priority_threads, false,
1118 "use high
priority compiler threads for concurrent Sparkplug")
1120DEFINE_BOOL(baseline_batch_compilation,
false,
"batch compile Sparkplug code")
1122 "compile Sparkplug code in a background thread")
1124DEFINE_STRING(sparkplug_filter,
"*",
"filter for Sparkplug baseline compiler")
1126 "only enable Sparkplug baseline compiler when "
1127 "--
short-builtin-calls are also enabled")
1128DEFINE_INT(baseline_batch_compilation_threshold, 4 * KB,
1129 "the estimated instruction size of a batch to trigger compilation")
1130DEFINE_BOOL(trace_baseline, false, "trace baseline compilation")
1131DEFINE_BOOL(trace_baseline_batch_compilation, false,
1132 "trace baseline batch compilation")
1135#define FLAG FLAG_FULL
1138DEFINE_BOOL(shared_string_table,
false,
"internalize strings into shared table")
1142 "use
string forwarding table instead of thin strings for "
1143 "all strings (experimental)")
1152DEFINE_BOOL(transition_strings_during_gc_with_stack, false,
1153 "Transition strings during a full GC with stack")
1156 "initial size of the shared
heap (in Mbytes); "
1157 "other
heap size flags (e.g. initial_heap_size) take precedence")
1159 max_shared_heap_size, 0,
1160 "max size of the shared
heap (in Mbytes); "
1161 "other
heap size flags (e.g. max_shared_heap_size) take precedence")
1164 "generate builtins concurrently on separate threads in mksnapshot")
1168 "optimizing hot functions asynchronously on a separate thread")
1170 "track concurrent recompilation")
1172 "the length of the concurrent compilation queue")
1174 "artificial compilation delay in ms")
1176 "move compile jobs to the front if recompilation is requested "
1179 concurrent_turbofan_max_threads, 4,
1180 "max number of threads that concurrent Turbofan can use (0 for unbounded)")
1182 stress_concurrent_inlining, false,
1183 "create additional concurrent optimization jobs but throw away
result")
1188 invocation_count_for_turbofan, 150)
1190 "whether maglev resets the interrupt budget")
1194 invocation_count_for_turbofan, 10000)
1196 "whether maglev resets the OSR interrupt budget")
1200 invocation_count_for_osr, 800)
1201DEFINE_BOOL(stress_concurrent_inlining_attach_code, false,
1202 "create additional concurrent optimization jobs")
1204 stress_concurrent_inlining)
1206 "maximum levels for nesting child serializers")
1208 "trace the
heap broker verbosely (all reports)")
1215DEFINE_INT(stress_runs, 0, "number of stress runs")
1217 "deoptimize every n times a deopt point is passed")
1221#ifdef V8_ENABLE_TURBOFAN
1222#define V8_ENABLE_TURBOFAN_BOOL true
1223DEFINE_BOOL(turbofan,
true,
"use the Turbofan optimizing compiler")
1228#define V8_ENABLE_TURBOFAN_BOOL false
1234 stress_turbo_late_spilling,
false,
1235 "optimize placement of all spill instructions, not just loop-top phis")
1237DEFINE_BOOL(turbo_wasm_address_reassociation, true,
1238 "refactor address components for immediate indexing")
1241 "allow concurrent compilation to happen in combination with "
1242 "trace-turbo* flags")
1245 optimize_maglev_optimizes_to_turbofan, false,
1246 "make OptimizeMaglevOnNextCall optimize to turbofan instead of maglev")
1248DEFINE_STRING(turbo_filter, "*", "optimization filter for TurboFan compiler")
1249DEFINE_BOOL(trace_turbo, false, "trace generated TurboFan IR")
1253 "directory to dump generated TurboFan IR to")
1255 "filter for tracing turbofan compilation")
1256DEFINE_BOOL(trace_turbo_graph, false, "trace generated TurboFan graphs")
1261 "trace turbo graph to a file with given prefix")
1263 "trace turbo cfg graph (for C1 visualizer) to a given file name")
1264DEFINE_BOOL(trace_turbo_types, true, "trace TurboFan's types")
1265DEFINE_BOOL(trace_turbo_scheduler, false, "trace TurboFan's scheduler")
1266DEFINE_BOOL(trace_turbo_reduction, false, "trace TurboFan's various reducers")
1267#ifdef V8_ENABLE_SLOW_TRACING
1268#define DEFINE_SLOW_TRACING_BOOL DEFINE_BOOL
1270#define DEFINE_SLOW_TRACING_BOOL DEFINE_BOOL_READONLY
1273 "trace TurboFan's graph trimmer")
1275 "trace TurboFan's jump threading")
1277 "trace TurboFan's control equivalence")
1279 "trace TurboFan's loop optimizations")
1281 "trace TurboFan's register allocator")
1284 "trace representation types")
1286 trace_turbo_stack_accesses, false,
1287 "trace stack load/store counters for optimized code in run-time (x64 only)")
1294DEFINE_BOOL(fuzzing_and_concurrent_recompilation, true,
1295 "fuzzing && concurrent_recompilation")
1298 fuzzing_and_concurrent_recompilation)
1304 trace_turbo_scheduled)
1306 trace_turbo_reduction)
1307#ifdef V8_ENABLE_SLOW_TRACING
1311 trace_turbo_trimming)
1323 trace_representation)
1326 trace_turbo_stack_accesses)
1330 "verify TurboFan machine graph before instruction selection")
1331#ifdef ENABLE_VERIFY_CSA
1333 "verify TurboFan machine graph of code stubs")
1338 "verify TurboFan machine graph of code stubs")
1340DEFINE_BOOL(trace_verify_csa,
false,
"trace code stubs verification")
1342 "trigger break point when a node with given
id is created in "
1343 "given stub. The format is: StubName,NodeId")
1345 "enable FixedArray bounds checks")
1346DEFINE_BOOL(turbo_stats, false, "print TurboFan statistics")
1348 "print TurboFan statistics in machine-readable format")
1350 "print TurboFan statistics of
wasm compilations")
1351DEFINE_BOOL(turbo_splitting, true, "split nodes during scheduling in TurboFan")
1352DEFINE_BOOL(turbo_inlining, true, "enable inlining in TurboFan")
1353DEFINE_BOOL(turbo_elide_frames, true, "enable frame elision in TurboFan")
1355 "maximum size of bytecode for a single inlining")
1356DEFINE_INT(max_inlined_bytecode_size_cumulative, 920,
1357 "maximum cumulative size of bytecode considered for inlining")
1359 "maximum absolute size of bytecode considered for inlining")
1361 reserve_inline_budget_scale_factor, 1.2,
1362 "
scale factor of bytecode size used to calculate the inlining budget")
1364 "maximum size of bytecode considered for small function inlining")
1366 "maximum bytecode size to "
1367 "be considered for turbofan optimization; too high values may cause "
1368 "the compiler to
hit (release) assertions")
1369DEFINE_FLOAT(min_inlining_frequency, 0.15, "minimum frequency for inlining")
1370DEFINE_BOOL(polymorphic_inlining, true, "polymorphic inlining")
1372 "set high thresholds for inlining to inline as much as possible")
1380DEFINE_BOOL(trace_turbo_inlining, false, "trace TurboFan inlining")
1382 "inline array builtins in TurboFan code")
1383DEFINE_BOOL(use_osr, true, "use on-stack replacement")
1384DEFINE_BOOL(maglev_osr, true, "use maglev as on-stack replacement target")
1390DEFINE_BOOL(concurrent_osr, true, "enable concurrent OSR")
1392DEFINE_INT(maglev_allocation_folding, 1, "maglev allocation folding level")
1395 "avoid inlined allocation of objects that cannot escape")
1396DEFINE_BOOL(trace_maglev_escape_analysis, false, "trace maglev escape analysis")
1398 "track
object changes to avoid escaping them")
1401 "trace load/stores from maglev virtual objects")
1403 trace_maglev_object_tracking)
1407 "use TurboFan fast
string builder")
1409DEFINE_BOOL(trace_osr, false, "trace on-stack replacement")
1411 "internal helper flag, please use --trace-osr instead.")
1416 "analyze liveness of environment slots and zap dead values")
1418 "trace liveness of local variable slots")
1419DEFINE_BOOL(turbo_load_elimination, true, "enable load elimination in TurboFan")
1421 "trace TurboFan load elimination")
1422DEFINE_BOOL(turbo_profiling, false, "enable basic block profiling in TurboFan")
1425 "enable basic block profiling in TurboFan, and include each "
1426 "function's
schedule and disassembly in the output")
1429 turbo_profiling_output,
nullptr,
1430 "emit data about basic block usage in builtins to this file "
1431 "(requires that V8 was built with v8_enable_builtins_profiling=true)")
1433 "enable builtin reordering when run mksnapshot.")
1437 "flag for mksnapshot, abort if builtins profile can't be applied")
1439 warn_about_builtin_profile_data, false,
1440 "flag for mksnapshot, emit warnings when applying builtin profile data")
1442 dump_builtins_hashes_to_file,
nullptr,
1443 "flag for mksnapshot, dump CSA builtins graph hashes to this file")
1446 "verify register allocation in TurboFan")
1447DEFINE_BOOL(turbo_move_optimization, true, "optimize gap moves in TurboFan")
1448DEFINE_BOOL(turbo_jt, true, "enable jump threading in TurboFan")
1449DEFINE_BOOL(turbo_loop_peeling, true, "TurboFan loop peeling")
1450DEFINE_BOOL(turbo_loop_variable, true, "TurboFan loop variable optimization")
1451DEFINE_BOOL(turbo_loop_rotation, true, "TurboFan loop rotation")
1452DEFINE_BOOL(turbo_cf_optimization, true, "optimize control flow in TurboFan")
1453DEFINE_BOOL(turbo_escape, true, "enable escape analysis")
1454DEFINE_BOOL(turbo_allocation_folding, true, "TurboFan allocation folding")
1456 "enable instruction scheduling in TurboFan")
1457DEFINE_BOOL(turbo_stress_instruction_scheduling, false,
1458 "randomly
schedule instructions to stress dependency tracking")
1460 turbo_instruction_scheduling)
1462 "enable store-store elimination in TurboFan")
1463DEFINE_BOOL(trace_store_elimination, false, "trace store elimination")
1465 "extra bounds checks to protect against some known typer "
1466 "mismatch exploit techniques (best effort)")
1468#if defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_IA32)
1470 "rewrite far to near jumps (ia32,x64)")
1473 "rewrite far to near jumps (ia32,x64)")
1477 stress_gc_during_compilation,
false,
1478 "simulate GC/compiler thread race related to https://crbug.com/v8/8520")
1479DEFINE_BOOL(turbo_fast_api_calls, true, "enable fast
API calls from TurboFan")
1482 "allow
float parameters to be passed in simulator mode")
1491DEFINE_BOOL(turbo_compress_frame_translations,
false,
1492 "compress deoptimization frame translations (experimental)")
1495 turbo_compress_frame_translations,
false,
1496 "compress deoptimization frame translations (experimental)")
1499 turbo_inline_js_wasm_calls,
true,
1500 "inline JS->Wasm calls (specifically: inline JS-to-Wasm wrappers and then "
1501 "the body of the Wasm function, if applicable)")
1503DEFINE_BOOL(turbo_optimize_inlined_js_wasm_wrappers, false,
1504 "Run additional optimizations (especially load-elimination) on "
1505 "inlined JS-to-Wasm wrappers")
1507 turbo_optimize_inlined_js_wasm_wrappers)
1510DEFINE_BOOL(turbo_optimize_apply, true, "optimize Function.prototype.apply")
1512 "optimize call math.min/max with
double array")
1514DEFINE_BOOL(turbo_collect_feedback_in_generic_lowering, false,
1515 "enable experimental feedback collection in generic lowering.")
1517DEFINE_BOOL(turboshaft, true, "enable TurboFan's Turboshaft phases for JS")
1522#ifdef V8_ENABLE_EXPERIMENTAL_TSA_BUILTINS
1524 "enables Turboshaft's DebugPrint, StaticAssert and "
1525 "CheckTurboshaftTypeOf operations")
1528 "enables Turboshaft's DebugPrint, StaticAssert and "
1529 "CheckTurboshaftTypeOf operations")
1532DEFINE_BOOL(turboshaft_wasm_load_elimination,
true,
1533 "enable Turboshaft's WasmLoadElimination")
1536 turboshaft_wasm_in_js_inlining,
1537 "inline Wasm code into JS functions via Turboshaft (instead of via "
1538 "TurboFan). Only the Wasm code is inlined in Turboshaft, the JS-to-Wasm "
1539 "wrappers are still inlined in TurboFan. For controlling whether to inline "
1540 "at all, see --turbo-inline-js-
wasm-calls.")
1548 "enable Turboshaft's low-level load elimination for JS")
1550 "enable Turboshaft's loop unrolling")
1551DEFINE_BOOL(turboshaft_string_concat_escape_analysis, true,
1552 "enable Turboshaft's escape analysis for
string concatenation")
1555 "enable an additional Turboshaft phase that "
1556 "performs optimizations based on type information")
1557#if V8_TARGET_ARCH_ARM64
1559 "enable optimizations for Webassembly SIMD")
1563 "use Turbolev (≈ Maglev + Turboshaft combined) as the 4th tier "
1564 "compiler instead of Turbofan")
1570 "enable
Turbolev features that we want to ship in the not-too-far future")
1573DEFINE_BOOL(turboshaft_csa, true, "run the CSA pipeline with turboshaft")
1577 typed_array_length_loading, true,
1578 "Enable specializing loading the TypedArray length in Maglev / Turbofan")
1581#if V8_ENABLE_WEBASSEMBLY
1587DEFINE_UINT64(turboshaft_opt_bisect_limit, std::numeric_limits<uint64_t>::max(),
1588 "stop applying optional optimizations after a specified number "
1589 "of steps, useful for bisecting optimization bugs")
1590DEFINE_UINT64(turboshaft_opt_bisect_break,
std::numeric_limits<uint64_t>::max(),
1591 "abort after a specified number of steps, useful for bisecting "
1592 "optimization bugs")
1594 "check that turboshaft reductions are correct with respect to "
1597 "print typing steps of turboshaft type inference")
1599 "trace individual Turboshaft reduction steps")
1600DEFINE_BOOL(turboshaft_trace_intermediate_reductions, false,
1601 "trace intermediate Turboshaft reduction steps")
1603 "trace emitted Turboshaft instructions")
1605 turboshaft_trace_reduction)
1607 "trace Turboshaft's loop unrolling reducer")
1609 "trace Turboshaft's loop peeling reducer")
1610DEFINE_BOOL(turboshaft_trace_load_elimination, false,
1611 "trace Turboshaft's late load elimination")
1614 "trace individual Turboshaft reduction steps")
1616 "trace emitted Turboshaft instructions")
1618 "trace intermediate Turboshaft reduction steps")
1621DEFINE_BOOL(profile_guided_optimization,
true,
"profile guided optimization")
1622DEFINE_BOOL(profile_guided_optimization_for_empty_feedback_vector, true,
1623 "profile guided optimization for empty feedback vector")
1624DEFINE_INT(invocation_count_for_early_optimization, 30,
1625 "invocation count threshold for early optimization")
1627 "invocation count for maglev for functions which according to "
1628 "profile_guided_optimization are likely to deoptimize before "
1629 "reaching this invocation count")
1633 "Enables optimizations which favor memory size over execution "
1638 "Immediately re-optimize code after some lazy deopts")
1641#if V8_ENABLE_WEBASSEMBLY
1644 "allow use of the generic js-to-wasm wrapper instead of "
1645 "per-signature wrappers")
1647 "maximum number of parallel compilation tasks for
wasm")
1652 "print details of
wasm off-
heap memory when the memory measurement "
1655 print_wasm_offheap_memory_size, false,
1656 "print off-
heap memory consumption per module and engine when they die")
1658 "trace serialization/deserialization")
1660 "enable actual asynchronous compilation for WebAssembly.compile")
1663 "use streaming compilation instead of async compilation for tests")
1664DEFINE_BOOL(wasm_native_module_cache, true, "enable the native module cache")
1667 "maximum number of 64KiB memory pages per
wasm memory")
1669 "maximum table size of a
wasm instance")
1670DEFINE_UINT(wasm_max_committed_code_mb, kMaxCommittedWasmCodeMB,
1671 "maximum committed code space for
wasm (in MB)")
1672DEFINE_UINT(wasm_max_code_space_size_mb, kDefaultMaxWasmCodeSpaceSizeMb,
1673 "maximum size of a single
wasm code space")
1675 "enable tier up to the optimizing compiler (requires --liftoff to "
1678 "enable dynamic tier up to the optimizing compiler")
1681 "run tier up jobs synchronously for testing")
1683 "budget for dynamic tiering (rough approximation of bytes executed")
1684DEFINE_INT(wasm_wrapper_tiering_budget,
wasm::kGenericWrapperBudget,
1685 "budget for wrapper tierup (number of calls until tier-up)")
1687 "maximum number of
wasm functions
defined in a module")
1689 wasm_caching_threshold, 1'000,
1690 "the amount of
wasm top tier code that triggers the next caching event")
1694DEFINE_INT(wasm_caching_hard_threshold, 1'000'000,
1695 "the amount of
wasm top tier code that triggers caching "
1696 "immediately, ignoring the --
wasm-caching-timeout-ms")
1698 wasm_caching_timeout_ms, 2000,
1699 "only trigger caching if no new code was compiled within this timeout (0 "
1700 "to disable this logic and only use --
wasm-caching-threshold)")
1702 "print how
long it took to compile each
wasm function")
1703DEFINE_INT(wasm_tier_up_filter, -1, "only tier-up function with this index")
1705 "eagerly tier-up function with this index")
1709 "trace streaming compilation of
wasm code")
1711 "trace
wasm stack switching")
1713 "Always run
wasm on a secondary stack, even when it is called "
1714 "with a regular (non-JSPI) export")
1716 "default size of stacks for
wasm stack-switching (in kB)")
1718 "enable Liftoff, the baseline compiler for WebAssembly")
1720 "disallow TurboFan compilation for WebAssembly (for testing)")
1726 enable_testing_opcode_in_wasm, false,
1727 "enables a testing opcode in
wasm that is only implemented in TurboFan")
1732 "trace Liftoff, the baseline compiler for WebAssembly")
1734 "print all memory updates performed in
wasm code")
1739 "bitmask of declared(!) function indices to compile with TurboFan "
1740 "instead of Liftoff")
1742 "bitmask of declared(!) function indices to compile for debugging, "
1743 "only applies if the tier is Liftoff")
1747 experimental_wasm_pgo_to_file, false,
1748 "experimental: dump Wasm PGO information to a local file (for testing)")
1751 experimental_wasm_pgo_from_file, false,
1752 "experimental: read and use Wasm PGO data from a local file (for testing)")
1755 "validate asm.js modules and translate them to Wasm")
1760#if V8_ENABLE_DRUMBRAKE
1768 "don't emit asm.js related messages (for golden file testing)")
1769DEFINE_BOOL(trace_asm_time, false, "print asm.js timing info to the console")
1771 "print tokens encountered by asm.js scanner")
1772DEFINE_BOOL(trace_asm_parser, false, "verbose logging of asm.js parse failures")
1773DEFINE_BOOL(stress_validate_asm, false, "try to validate everything as asm.js")
1777 "directory to dump
wasm modules to")
1780 "Enable direct calls from
wasm to fast
API functions with bound "
1781 "call function to pass the the
receiver as first parameter")
1783DEFINE_BOOL(wasm_deopt, false, "enable deopts in optimized
wasm functions")
1791 "limit of
wasm deopts for a single function after which no "
1792 "further deopt
points are emitted in Turbofan")
1797#include "src/wasm/wasm-feature-flags.h"
1799#define DECL_WASM_FLAG(feat, desc, val) \
1800 DEFINE_BOOL(experimental_wasm_##feat, val, "enable " desc " for Wasm")
1801#define DECL_EXPERIMENTAL_WASM_FLAG(feat, desc, val) \
1802 DEFINE_EXPERIMENTAL_FEATURE(experimental_wasm_##feat, \
1803 "enable " desc " for Wasm")
1810#undef DECL_WASM_FLAG
1811#undef DECL_EXPERIMENTAL_WASM_FLAG
1818 experimental_wasm_imported_strings)
1822 experimental_wasm_assume_ref_cast_succeeds,
1823 "assume ref.cast always succeeds and skip the related type check (unsafe)")
1825 "enable unsafe ref.cast_nop instruction")
1827 experimental_wasm_skip_null_checks,
1828 "skip
null checks for call.ref and array and struct operations (unsafe)")
1830 "skip array bounds checks (unsafe)")
1834#define WASM_STAGING_IMPLICATION(feat, desc, val) \
1835 DEFINE_IMPLICATION(wasm_staging, experimental_wasm_##feat)
1837#undef WASM_STAGING_IMPLICATION
1841 "enable bounds checks (disable for performance testing only)")
1843 "enable stack checks (disable for performance testing only)")
1845 wasm_enforce_bounds_checks, false,
1846 "enforce explicit bounds check even if the
trap handler is available")
1850 "intrinsify some Math imports into
wasm")
1853 "enable speculative inlining of Wasm indirect calls")
1860 "enable inlining of Wasm functions into Wasm functions")
1862 "maximum graph size (in TF nodes) that allows inlining more")
1864 "maximum function size (in wire bytes) that may be inlined")
1866 wasm_inlining_factor, 3,
1867 "maximum multiple graph size (in TF nodes) in comparison to initial size")
1869 "minimum graph size budget (in TF nodes) for which the "
1870 "wasm_inlinining_factor does not apply")
1871DEFINE_BOOL(wasm_inlining_ignore_call_counts, false,
1872 "Ignore call counts when considering inlining
candidates. The flag "
1873 "is supposed to be used for fuzzing")
1878 "enable loop unrolling for
wasm functions")
1879DEFINE_BOOL(wasm_loop_peeling, true, "enable loop peeling for
wasm functions")
1880DEFINE_SIZE_T(wasm_loop_peeling_max_size, 1000, "maximum size for peeling")
1883 "generate a test case when running a
wasm fuzzer")
1885DEFINE_BOOL(print_wasm_code, false, "print WebAssembly code")
1886DEFINE_INT(print_wasm_code_function_index, -1,
1887 "print WebAssembly code for function at index")
1888DEFINE_BOOL(print_wasm_stub_code, false, "print WebAssembly stub code")
1890 "enable lazy compilation for asm.js translated to
wasm (see "
1893 "enable lazy compilation for all
wasm modules")
1895 "trace lazy compilation of
wasm functions")
1897 wasm_lazy_validation,
1898 "enable lazy validation for lazily compiled
wasm functions")
1900DEFINE_BOOL(wasm_simd_ssse3_codegen, false, "allow
wasm SIMD SSSE3 codegen")
1902DEFINE_BOOL(wasm_code_gc, true, "enable garbage collection of
wasm code")
1903DEFINE_BOOL(trace_wasm_code_gc, false, "trace garbage collection of
wasm code")
1905 "stress test garbage collection of
wasm code")
1906DEFINE_INT(wasm_max_initial_code_space_reservation, 0,
1907 "maximum size of the initial
wasm code space reservation (in MB)")
1909 "always move non-shared bounds-checked Wasm memory on grow")
1911 "enable flushing liftoff code on memory pressure signal")
1913 "stress branch hinting by generating a random hint for each branch "
1918 "maximum allowed size of
wasm modules")
1920 "maximum size of produced disassembly (in MB, approximate)")
1923 "size of the thread pool used by the
wasm C
API, with 0 meaning the "
1924 "maximum number of threads")
1933#ifdef V8_ENABLE_WASM_GDB_REMOTE_DEBUGGING
1934#define DEFAULT_WASM_GDB_REMOTE_PORT 8765
1936 "enable GDB-remote for WebAssembly debugging")
1938DEFINE_INT(wasm_gdb_remote_port, DEFAULT_WASM_GDB_REMOTE_PORT,
1939 "default port for WebAssembly debugging with LLDB.")
1940DEFINE_BOOL(wasm_pause_waiting_for_debugger, false,
1941 "pause at the first Webassembly instruction waiting for a debugger "
1943DEFINE_BOOL(trace_wasm_gdb_remote, false, "trace Webassembly GDB-remote server")
1948 "trace creation and collection of wasm instances")
1951#ifdef V8_ENABLE_WASM_SIMD256_REVEC
1953 experimental_wasm_revectorize,
1954 "enable 128 to 256 bit revectorization for Webassembly SIMD")
1958#if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64
1960 "Use trap handling for Wasm memory64 bounds checks")
1963 "Use trap handling for Wasm memory64 bounds checks (not "
1964 "supported for this architecture)")
1967#ifdef V8_ENABLE_DRUMBRAKE
1970 "Execute all wasm code in the Wasm interpreter")
1971DEFINE_BOOL(wasm_jitless_if_available_for_testing, false,
1972 "Enables the Wasm interpreter, for testing, but only if "
1973 "the 'v8_enable_drumbrake' flag is set.")
1977 "Compress the Wasm interpreter bytecode")
1978DEFINE_BOOL(trace_drumbrake_compact_bytecode, false,
1979 "Traces the Wasm interpreter compact bytecode")
1981 "enable timeout for
wasm fuzzer (for testing)")
1983 "timeout for
wasm fuzzer (in ms)")
1984#ifdef V8_ENABLE_DRUMBRAKE_TRACING
1985DEFINE_BOOL(trace_drumbrake_bytecode_generator,
false,
1986 "trace drumbrake generation of interpreter bytecode")
1988 "trace drumbrake execution of
wasm code")
1989DEFINE_BOOL(trace_drumbrake_execution_verbose, false,
1990 "print more information for the drumbrake execution of
wasm code")
1993 "write drumbrake traces into file <pid>-<isolate
id>.dbt")
1995 trace_drumbrake_filter, "*",
1996 "filter for selecting which
wasm functions to trace in the interpreter")
1999 "enable drumbrake merged wasm instructions optimization")
2001 "enable passing the top stack value in a register in drumbrake")
2019DEFINE_BOOL(wasm_enable_exec_time_histograms, false,
2020 "enables histograms that track the time spent executing Wasm code")
2021DEFINE_INT(wasm_exec_time_histogram_sample_duration, 1000,
2022 "sample duration for V8.Jit[less]WasmExecutionPercentage, in msec")
2023DEFINE_INT(wasm_exec_time_histogram_sample_period, 4000,
2024 "sample period for V8.Jit[less]WasmExecutionPercentage, in msec")
2025DEFINE_INT(wasm_exec_time_histogram_slow_threshold, 10000,
2026 "V8.Jit[less]WasmExecutionPercentage threshold used to detect "
2027 "Wasm-intensive workloads (0-100000)")
2028DEFINE_INT(wasm_exec_time_slow_threshold_samples_count, 1,
2029 "number of V8.Jit[less]WasmExecutionPercentage samples used to "
2030 "calculate the threshold for the V8.Jit[less]WasmExecutionTooSlow "
2034 turbo_inline_js_wasm_calls)
2038 "execute all Wasm code in the Wasm interpreter")
2039DEFINE_BOOL(wasm_jitless_if_available_for_testing, false, "")
2044DEFINE_INT(stress_sampling_allocation_profiler, 0,
2045 "Enables sampling allocation profiler with X as a sample interval")
2049 "Enables the lazy new space shrinking strategy")
2051 "min size of a semi-space (in MBytes), the new space consists of "
2054 "max size of a semi-space (in MBytes), the new space consists of "
2056DEFINE_INT(semi_space_growth_factor, 2, "factor by which to grow the new space")
2059DEFINE_SIZE_T(max_old_space_size, 0, "max size of the old space (in Mbytes)")
2062 "max size of the
heap (in Mbytes) "
2063 "both max_semi_space_size and max_old_space_size take precedence. "
2064 "All three flags cannot be specified at the same time.")
2066DEFINE_SIZE_T(initial_old_space_size, 0, "initial old space size (in Mbytes)")
2067DEFINE_BOOL(gc_global, false, "always perform global GCs")
2074 "Collect garbage after random(0,
X) V8 allocations. It overrides "
2076DEFINE_INT(gc_interval, -1, "garbage collect after <n> allocations")
2078 "Collect garbage after random(0,
X)
cppgc allocations.")
2081 "keeps maps alive for <n> old space garbage collections")
2083 "print
one trace line following each garbage collection")
2085 "print
one detailed trace line in name=value format "
2086 "after each garbage collection")
2088 "do not print trace line after scavenger collection")
2089DEFINE_BOOL(trace_memory_reducer, false, "print memory reducer behavior")
2091 "print more details following each garbage collection")
2094 "prints details of each freelist before and after "
2095 "each major garbage collection")
2097 "prints details of freelists of each page before and after "
2098 "each major garbage collection")
2101 "print layout of pages in
heap before and after gc")
2102DEFINE_BOOL(trace_gc_heap_layout_ignore_minor_gc, true,
2103 "do not print trace line before and after minor-gc")
2105 "Show statistics about the pages evacuation by the compaction")
2108 "trace calls to Heap::IsAllocationPending that return true")
2110DEFINE_INT(trace_allocation_stack_interval, -1,
2111 "print stack trace after <n> free-list allocations")
2113 "print duplicate objects in the
heap if their size is more than "
2115DEFINE_BOOL(trace_fragmentation, false, "report fragmentation for old space")
2117 "report fragmentation for old space (detailed)")
2119 "trace fragmentation after marking")
2120DEFINE_BOOL(trace_evacuation, false, "report evacuation statistics")
2123DEFINE_BOOL(incremental_marking, true, "use incremental marking")
2124DEFINE_BOOL(incremental_marking_task, true, "use tasks for incremental marking")
2126 "Starts incremental marking with kUserVisible
priority.")
2127DEFINE_INT(incremental_marking_soft_trigger, 0,
2128 "threshold for starting incremental marking via a task in percent "
2129 "of available space: limit - size")
2130DEFINE_INT(incremental_marking_hard_trigger, 0,
2131 "threshold for starting incremental marking immediately in percent "
2132 "of available space: limit - size")
2133DEFINE_BOOL(incremental_marking_unified_schedule, false,
2135 "JS and C++ objects.")
2136DEFINE_BOOL(trace_unmapper, false, "Trace the unmapping")
2137DEFINE_BOOL(parallel_scavenge, true, "parallel scavenge")
2140 "minor GC task trigger in percent of the current
heap limit")
2141DEFINE_BOOL(minor_gc_task_with_lower_priority, true,
2142 "schedules the minor GC task with kUserVisible
priority.")
2143DEFINE_BOOL(trace_parallel_scavenge, false, "trace parallel scavenge")
2145 cppgc_young_generation,
2146 "run young generation garbage collections in Oilpan")
2152DEFINE_BOOL(optimize_gc_for_battery, false, "optimize GC for battery")
2153#if defined(V8_ATOMIC_OBJECT_FIELD_WRITES)
2154DEFINE_BOOL(concurrent_marking,
true,
"use concurrent marking")
2158DEFINE_BOOL(concurrent_marking,
false,
"use concurrent marking")
2161 concurrent_marking_max_worker_num, 7,
2162 "max worker number of concurrent marking, 0 for NumberOfWorkerThreads")
2164 "concurrently sweep array buffers")
2166 "
start background threads that allocate memory")
2167DEFINE_BOOL(parallel_marking, true, "use parallel marking in atomic pause")
2169 "number of fixpoint iterations it takes to switch to linear "
2170 "ephemeron algorithm")
2171DEFINE_BOOL(trace_concurrent_marking, false, "trace concurrent marking")
2172DEFINE_BOOL(concurrent_sweeping, true, "use concurrent sweeping")
2174 concurrent_array_buffer_sweeping)
2175DEFINE_BOOL(parallel_compaction, true, "use parallel compaction")
2177 "use parallel pointer update during compaction")
2179 "use parallel threads to clear weak refs in the atomic pause.")
2181 "trigger out-of-memory failure to avoid GC storm near
heap limit")
2183 "trace progress of the incremental marking")
2184DEFINE_BOOL(trace_stress_marking, false, "trace stress marking progress")
2185DEFINE_BOOL(trace_stress_scavenge, false, "trace stress scavenge progress")
2187 "track
object counts and memory usage")
2189 "trace
object counts and memory usage")
2190DEFINE_BOOL(trace_zone_stats, false, "trace zone memory usage")
2193 TracingFlags::zone_stats.store(
2194 v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE))
2196 zone_stats_tolerance, 1 * MB,
2197 "report a tick only when allocated zone memory changes by this amount")
2198DEFINE_BOOL(trace_zone_type_stats, false, "trace per-type zone memory usage")
2200 trace_zone_type_stats,
2201 TracingFlags::zone_stats.store(
2202 v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE))
2204DEFINE_INT(gc_stats, 0, "Used by tracing internally to enable gc statistics")
2207 track_gc_object_stats,
2208 TracingFlags::gc_stats.store(
2209 v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE))
2211 trace_gc_object_stats,
2212 TracingFlags::gc_stats.store(
2213 v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE))
2219 "track native contexts that are expected to be garbage collected")
2221 "trace native contexts that are expected to be garbage collected")
2224DEFINE_BOOL(verify_heap,
false,
"verify heap pointers before and after GC")
2225DEFINE_BOOL(verify_heap_skip_remembered_set, false,
2226 "disable remembered set verification")
2229 "verify heap pointers before and after GC")
2233 "Bump QOS class for running threads to reach safepoint")
2236 "don't schedule another GC when we are frozen")
2237DEFINE_BOOL(move_object_start, true, "enable moving of
object starts")
2238DEFINE_BOOL(memory_reducer, true, "use memory reducer")
2240 "memory reducer runs GC with ReduceMemoryFootprint flag")
2242 "use memory reducer for small heaps")
2244 "Maximum number of memory reducer GCs scheduled")
2246 external_memory_accounted_in_global_limit, false,
2247 "External memory limits are computed as part of global limits in
v8 Heap.")
2249 "Old
gen GC
speed is computed directly from gc tracer counters.")
2251 "specifies
heap growing factor as (1 + heap_growing_percent/100)")
2252DEFINE_INT(v8_os_page_size, 0, "override OS page size (in KBytes)")
2253DEFINE_BOOL(allocation_buffer_parking, true, "allocation buffer parking")
2255 "Perform compaction on full GCs based on V8's default heuristics")
2257 "Perform code space compaction on full collections.")
2259 "Perform compaction on every full GC")
2261 "Perform compaction when finalizing a full GC with stack")
2263 compact_code_space_with_stack, true,
2264 "Perform code space compaction when finalizing a full GC with stack")
2269 "Shortcut Strings during GC with stack")
2271 "Stress GC compaction to flush out bugs with moving objects")
2273 "Stress GC compaction by selecting random percent of pages as "
2274 "evacuation
candidates. Overrides stress_compaction.")
2278 "flush of baseline code when it has not been executed recently")
2280 "flush of bytecode when it has not been executed recently")
2281DEFINE_INT(bytecode_old_age, 6, "number of gcs before we flush code")
2283 "Use time-
base code flushing instead of age.")
2285 "Flush code when tab goes into the background.")
2286DEFINE_INT(bytecode_old_time, 30, "number of seconds before we flush code")
2287DEFINE_BOOL(stress_flush_code, false, "stress code flushing")
2288DEFINE_BOOL(trace_flush_code, false, "trace bytecode flushing")
2290 "Use a progress bar to scan large objects in increments when "
2291 "incremental marking is active.")
2293 "Use per-context worklist for marking")
2295 "force incremental marking for small heaps and run it more often")
2298 "prints number of allocations and enables analysis mode for gc "
2299 "fuzz testing, e.g. --stress-marking, --stress-scavenge")
2301 "force marking at random
points between 0 and
X (inclusive) percent "
2302 "of the regular marking
start limit")
2304 "force scavenge at random
points between 0 and
X (inclusive) "
2305 "percent of the new space capacity")
2309 reclaim_unmodified_wrappers, true,
2310 "reclaim otherwise unreachable unmodified wrapper objects when possible")
2312 "reclaim wrapper objects in parallel")
2316 "less compaction in non-memory reducing mode")
2319 "Delay before memory reducer
start")
2321DEFINE_BOOL(concurrent_marking_high_priority_threads, false,
2322 "use high
priority threads for concurrent Marking")
2324DEFINE_BOOL(disable_abortjs, false, "disables AbortJS runtime function")
2327 "randomize virtual memory reservations by ignoring any hints "
2328 "passed when allocating pages")
2330DEFINE_BOOL(manual_evacuation_candidates_selection, false,
2331 "Test mode only flag. It allows an
unit test to select evacuation "
2334DEFINE_BOOL(clear_free_memory, false, "initialize free memory with 0")
2336DEFINE_BOOL(idle_gc_on_context_disposal, true, "idle gc on context disposal")
2338DEFINE_BOOL(trace_context_disposal, false, "trace context disposal")
2343 "use incremental marking for CppHeap")
2348 "use concurrent marking for CppHeap")
2350 cppheap_concurrent_marking)
2356 "a new
heap limit balancing algorithm")
2358 "c value for membalancer. "
2359 "A special constant to balance between memory and space tradeoff. "
2360 "The smaller the more memory it uses.")
2362DEFINE_BOOL(trace_memory_balancer, false, "print memory balancer behavior.")
2365#ifdef V8_ENABLE_DEBUG_CODE
2367 "generate extra code (assertions) for debugging")
2368DEFINE_BOOL(trap_on_abort, false, "
trap instead of calling abort for debugging")
2369#if defined(V8_ENABLE_SLOW_DEBUG_CODE_BY_DEFAULT) || \
2370 defined(ENABLE_SLOW_DCHECKS)
2371#define V8_ENABLE_SLOW_DEBUG_CODE_BY_DEFAULT_BOOL true
2373#define V8_ENABLE_SLOW_DEBUG_CODE_BY_DEFAULT_BOOL false
2377DEFINE_BOOL(slow_debug_code, V8_ENABLE_SLOW_DEBUG_CODE_BY_DEFAULT_BOOL,
2378 "generate slow extra code (assertions) for debugging")
2385#ifdef V8_CODE_COMMENTS
2387 "emit comments in code disassembly; for more readable source "
2388 "positions you should add --no-concurrent_recompilation")
2392DEFINE_BOOL(enable_sse3,
true,
"enable use of SSE3 instructions if available")
2393DEFINE_BOOL(enable_ssse3, true, "enable use of SSSE3 instructions if available")
2395 "enable use of SSE4.1 instructions if available")
2397 "enable use of SSE4.2 instructions if available")
2399 "enable use of SAHF instruction if available (X64 only)")
2400DEFINE_BOOL(enable_avx, true, "enable use of AVX instructions if available")
2401DEFINE_BOOL(enable_avx2, true, "enable use of AVX2 instructions if available")
2403 "enable use of AVX-VNNI instructions if available")
2405 "enable use of AVX-VNNI-INT8 instructions if available")
2406DEFINE_BOOL(enable_fma3, true, "enable use of FMA3 instructions if available")
2407DEFINE_BOOL(enable_f16c, true, "enable use of F16C instructions if available")
2408DEFINE_BOOL(enable_bmi1, true, "enable use of BMI1 instructions if available")
2409DEFINE_BOOL(enable_bmi2, true, "enable use of BMI2 instructions if available")
2410DEFINE_BOOL(enable_lzcnt, true, "enable use of LZCNT instruction if available")
2412 "enable use of POPCNT instruction if available")
2414 "generate instructions for the selected ARM architecture if "
2415 "available: armv6, armv7, armv7+sudiv or armv8")
2417 "force all emitted branches to be in
long mode (MIPS/PPC only)")
2418DEFINE_STRING(mcpu, "auto", "enable optimization for specific cpu")
2420 "enable use of partial constant
pools (x64 only)")
2422 "enable optional features on the simulator for testing:
none or "
2425 "enable mitigation for Intel JCC erratum on affected CPUs")
2427#if defined(V8_TARGET_ARCH_RISCV32) || defined(V8_TARGET_ARCH_RISCV64)
2428DEFINE_BOOL(riscv_trap_to_simulator_debugger,
false,
2429 "enable simulator trap to debugger")
2430DEFINE_BOOL(riscv_debug, false, "enable debug prints")
2432DEFINE_BOOL(riscv_constant_pool, true, "enable constant pool (RISCV only)")
2435 "enable compressed
extension isa variant (RISCV only)")
2437 "enable B
extension isa variant (RISCV only)")
2440 "use aliases for instruction mnemonics when printing code (RISCV only)")
2445 "Include source information in the binary at CSA bind locations.")
2456DEFINE_BOOL(enable_regexp_unaligned_accesses, true,
2457 "enable unaligned accesses for the regexp engine")
2460DEFINE_BOOL(script_streaming, true, "enable parsing on background")
2462 "stress test parsing on background")
2463DEFINE_BOOL(concurrent_cache_deserialization, true,
2464 "enable deserializing code caches on background")
2466 merge_background_deserialized_script_with_compilation_cache, true,
2467 "After deserializing code cache data on a background thread, merge it into "
2468 "an existing Script if
one is found in the Isolate compilation cache")
2469DEFINE_BOOL(verify_code_merge, false, "Verify scope infos after merge")
2473 experimental_embedder_instance_types, false,
2474 "enable type checks based on instance types provided by the embedder")
2480 "expose gc
extension under the specified name")
2487 "expose ignition-statistics
extension (requires building with "
2488 "v8_enable_ignition_dispatch_counting)")
2489DEFINE_INT(stack_trace_limit, 10, "number of stack frames to capture")
2491 "show built-in functions in stack traces")
2493 "enable experimental frames (
API/Builtins) and stack trace layout")
2494DEFINE_BOOL(disallow_code_generation_from_strings, false,
2495 "disallow eval and friends")
2496DEFINE_BOOL(expose_async_hooks, false, "expose async_hooks
object")
2498 "expose cputracemark
extension under the specified name")
2499#ifdef ENABLE_VTUNE_TRACEMARK
2500DEFINE_BOOL(enable_vtune_domain_support,
true,
"enable vtune domain support")
2503#ifdef ENABLE_VTUNE_JIT_INTERFACE
2504DEFINE_BOOL(enable_vtunejit,
true,
"enable vtune jit interface")
2508DEFINE_BOOL(experimental_report_exceptions_from_callbacks,
true,
2509 "Notify Api callback about exceptions thrown in Api callbacks")
2513 "allow invoking the function constructor without security checks")
2514DEFINE_BOOL(force_slow_path, false, "always take the slow path for builtins")
2515DEFINE_BOOL(test_small_max_function_context_stub_size, false,
2516 "enable testing the function context size overflow path "
2517 "by making the maximum size smaller")
2519DEFINE_BOOL(inline_new, true, "use fast inline allocation")
2524 "allow the jump table used for switch statements to span a range "
2525 "of integers roughly equal to this number times the number of "
2526 "clauses in the switch")
2528 "the number of Smi integer cases present in the switch
statement "
2529 "before using the jump table optimization")
2533 "stress lazy compilation by simulating stack overflow during "
2534 "unoptimized bytecode generation with 1/n-th probability, "
2538 stress_lazy_compilation, 0)
2541DEFINE_BOOL(trace, false, "trace javascript function calls")
2545DEFINE_BOOL(lazy_eval, true, "use lazy compilation during eval")
2547 "use lazy compilation during streaming compilation")
2548DEFINE_BOOL(max_lazy, false, "ignore eager compilation hints")
2550DEFINE_BOOL(trace_opt, false, "trace optimized compilation")
2552 "trace the optimization status of functions during tiering events")
2554 "extra verbose optimized compilation tracing")
2556DEFINE_BOOL(trace_opt_stats, false, "trace optimized compilation statistics")
2557DEFINE_BOOL(trace_deopt, false, "trace deoptimization")
2558DEFINE_BOOL(log_deopt, false, "log deoptimization")
2559DEFINE_BOOL(trace_deopt_verbose, false, "extra verbose deoptimization tracing")
2562 "include file names in trace-opt/trace-deopt output")
2563DEFINE_BOOL(always_turbofan, false, "always try to optimize functions")
2565DEFINE_BOOL(always_osr, false, "always try to OSR functions")
2566DEFINE_BOOL(prepare_always_turbofan, false, "prepare for turning on always opt")
2568DEFINE_BOOL(trace_serializer, false, "print code serializer trace")
2571 "print statistics on external references used during serialization")
2575DEFINE_BOOL(compilation_cache,
true,
"enable compilation cache")
2577DEFINE_BOOL(cache_prototype_transitions, true, "cache prototype transitions")
2581 "enable compiler dispatcher")
2582DEFINE_UINT(lazy_compile_dispatcher_max_threads, 0,
2583 "max threads for compiler dispatcher (0 for unbounded)")
2585 "trace compiler dispatcher activity")
2587 parallel_compile_tasks_for_eager_toplevel,
2588 "spawn parallel compile tasks for eagerly compiled, top-level functions")
2590 lazy_compile_dispatcher)
2592 parallel_compile_tasks_for_lazy,
2593 "spawn parallel compile tasks for all lazily compiled functions")
2597DEFINE_INT(cpu_profiler_sampling_interval, 1000,
2598 "CPU profiler sampling interval in microseconds")
2602 trace_side_effect_free_debug_evaluate, false,
2603 "print debug messages for side-effect-free debug-evaluate for testing")
2611 "When logging, try to use coloured output.")
2615 "expose injected-script-source.js for debugging")
2619 "default size of stack region
v8 is allowed to use (in kBytes)")
2622DEFINE_INT(max_stack_trace_source_length, 300,
2623 "maximum length of function source code printed in a stack trace.")
2627 "clear exceptions when entering JavaScript")
2629DEFINE_BOOL(use_original_message_for_stack_trace, true,
2630 "use the message with which the Error constructor was called "
2631 "rather than the value of the \"message\" property for Error.stack")
2635 "time interval in ms for aggregating memory histograms")
2639 "Dump
heap object allocations/movements/size_updates")
2640DEFINE_BOOL(heap_profiler_use_embedder_graph, true,
2641 "Use the new EmbedderGraph
API to get embedder nodes")
2643 "Write a
heap snapshot to disk on last-resort GCs")
2645 "Write a
heap snapshot to disk on a certain GC invocation")
2647 "truncate strings to this length in the
heap snapshot")
2648DEFINE_BOOL(heap_profiler_show_hidden_objects, false,
2649 "use 'native' rather than 'hidden' node type in snapshot")
2650DEFINE_BOOL(profile_heap_snapshot, false, "dump time spent on
heap snapshot")
2651#ifdef V8_ENABLE_HEAP_SNAPSHOT_VERIFY
2653 "verify that heap snapshot matches marking visitor behavior")
2658DEFINE_BOOL(sampling_heap_profiler_suppress_randomness,
false,
2659 "Use constant sample intervals to eliminate test flakiness")
2663 "Log inline cache state transitions for tools/ic-processor")
2666 log_ic, TracingFlags::ic_stats.store(
2667 v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE))
2669 "enable fast map update by caching the migration target")
2670#define DEFAULT_MAX_POLYMORPHIC_MAP_COUNT 4
2672 "maximum number of valid maps to track in POLYMORPHIC state")
2674 clone_object_sidestep_transitions, true,
2675 "support sidestep transitions for dependency tracking
object clone maps")
2680 "limits the number of properties that can be added to an
object "
2681 "using keyed store before transitioning to dictionary mode")
2683 "limits the number of mutable properties that can be added to an "
2684 "
object before transitioning to dictionary mode")
2687 "generate extra code for manipulating stats counters")
2689DEFINE_BOOL(super_ic, true, "use an IC for super property loads")
2691DEFINE_BOOL(mega_dom_ic, false, "use MegaDOM IC state for
API objects")
2695 "Trace updates to prototype user tracking")
2696DEFINE_BOOL(trace_for_in_enumerate, false, "Trace for-in enumerate slow-paths")
2698DEFINE_BOOL(log_maps_details, true, "Also log map details")
2701 move_prototype_transitions_first, true,
2702 "Always move prototype transitions to the front of the tree")
2705DEFINE_BOOL(allow_natives_syntax, false, "allow natives syntax")
2706DEFINE_BOOL(allow_natives_for_differential_fuzzing, false,
2707 "allow only natives explicitly allowlisted for differential "
2711DEFINE_BOOL(parse_only, false, "only parse the sources")
2715DEFINE_BOOL(trace_sim,
false,
"Trace simulator execution")
2716DEFINE_BOOL(debug_sim, false, "Enable debugging the simulator")
2718 "Check icache flushes in ARM and MIPS simulator")
2719DEFINE_INT(stop_sim_at, 0, "Simulator stop after
x number of instructions")
2720#if defined(V8_TARGET_ARCH_ARM64) || defined(V8_TARGET_ARCH_MIPS64) || \
2721 defined(V8_TARGET_ARCH_PPC64) || defined(V8_TARGET_ARCH_RISCV64) || \
2722 defined(V8_TARGET_ARCH_LOONG64)
2724 "Stack alignment in bytes in simulator. This must be a power of two "
2725 "and it must be at least 16. 16 is default.")
2728 "Stack alingment in bytes in simulator (4 or 8, 8 is default)")
2731 "Stack size of the ARM64, MIPS64 and PPC64 simulator "
2732 "in kBytes (default is 2 MB)")
2734 "Trace simulator debug messages. Implied by --trace-sim.")
2737#if defined V8_TARGET_ARCH_ARM64
2740 "Stop execution when a pointer authentication fails in the "
2746 "include async stack traces in Error.stack")
2748 "print stack trace when an illegal exception is thrown")
2750 "abort program (dump core) when an uncaught exception is thrown")
2751DEFINE_BOOL(correctness_fuzzer_suppressions, false,
2752 "Suppress certain unspecified behaviors to ease correctness "
2753 "fuzzing: Abort program when the stack overflows or a
string "
2754 "exceeds maximum length (as opposed to throwing RangeError). "
2755 "Use a fixed suppression
string for error messages.")
2757 "rehash strings from the snapshot to override the baked-in seed")
2759 "Fixed seed to use to hash property keys (0 means random)"
2760 "(with snapshots this option cannot override the baked-in seed)")
2762 "Default seed for initializing random generator "
2763 "(0, the default, means to use system random).")
2765 "Default seed for initializing fuzzer random generator "
2766 "(0, the default, means to use
v8's random number generator seed).")
2769 "print exception
object and stack trace on each thrown exception")
2771 detailed_error_stack_trace, false,
2772 "includes arguments for each function call in the error stack frames array")
2774 "adjust OS specific scheduling params for the isolate")
2775DEFINE_BOOL(experimental_flush_embedded_blob_icache, true,
2776 "Used in an experiment to evaluate icache flushing on certain CPUs")
2777DEFINE_BOOL(allow_allocation_in_fast_api_call, true,
2778 "Allow allocations in fast
API calls.")
2781#if V8_SHORT_BUILTIN_CALLS
2782#define V8_SHORT_BUILTIN_CALLS_BOOL true
2784#define V8_SHORT_BUILTIN_CALLS_BOOL false
2788 "Put embedded builtins code into the code range for shorter "
2789 "builtin calls/jumps if system has >=4GB memory")
2791 "Trace code range allocation process.")
2795 "This mode tries harder to allocate code range near .text section. "
2796 "Works only for configurations with external code space and "
2797 "shared pointer compression cage.")
2799 "Abort if code range is allocated further away than 4GB from the"
2803DEFINE_BOOL(runtime_call_stats, false, "report runtime call counts and times")
2806 TracingFlags::runtime_stats.store(
2807 v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE))
2808DEFINE_BOOL(rcs, false, "report runtime call counts and times")
2812 "report runtime times in cpu time (the default is wall time)")
2817 "Verify snapshot checksums when deserializing snapshots. Enable "
2818 "checksum creation and verification for code caches. Enabled by "
2819 "default in debug builds and once per process for Android.")
2821 "Print the time it takes to deserialize the snapshot.")
2822DEFINE_BOOL(trace_deserialization, false, "Trace the snapshot deserialization.")
2824 "Collect statistics on serialized objects.")
2826DEFINE_BOOL(regexp_optimization, true, "generate optimized regexp code")
2827DEFINE_BOOL(regexp_interpret_all, false, "interpret all regexp code")
2828#ifdef V8_TARGET_BIG_ENDIAN
2829#define REGEXP_PEEPHOLE_OPTIMIZATION_BOOL false
2831#define REGEXP_PEEPHOLE_OPTIMIZATION_BOOL true
2834 "enable regexp interpreter and tier up to the compiler after the "
2835 "number of executions set by the tier up ticks flag")
2838 "set the number of executions for the regexp interpreter before "
2839 "tiering-up to the compiler")
2841 "enable peephole optimization for regexp bytecode")
2842DEFINE_BOOL(regexp_results_cache, true, "enable the regexp results cache")
2843DEFINE_BOOL(trace_regexp_peephole_optimization, false,
2844 "trace regexp bytecode peephole optimization")
2845DEFINE_BOOL(trace_regexp_bytecodes, false, "trace regexp bytecode execution")
2847 "trace regexp macro assembler calls.")
2848DEFINE_BOOL(trace_regexp_parser, false, "trace regexp parsing")
2849DEFINE_BOOL(trace_regexp_tier_up, false, "trace regexp tiering up execution")
2850DEFINE_BOOL(trace_regexp_graph, false, "trace the regexp graph")
2852DEFINE_BOOL(enable_experimental_regexp_engine, false,
2853 "recognize regexps with 'l' flag, run them on experimental engine")
2854DEFINE_BOOL(default_to_experimental_regexp_engine, false,
2855 "run regexps with the experimental engine where possible")
2857 enable_experimental_regexp_engine)
2858DEFINE_BOOL(experimental_regexp_engine_capture_group_opt, false,
2859 "enable time optimizations for the experimental regexp engine")
2861 enable_experimental_regexp_engine)
2862DEFINE_UINT64(experimental_regexp_engine_capture_group_opt_max_memory_usage,
2864 "maximum memory usage in MB allowed for experimental engine")
2865DEFINE_BOOL(trace_experimental_regexp_engine, false,
2866 "trace execution of experimental regexp engine")
2868DEFINE_BOOL(enable_experimental_regexp_engine_on_excessive_backtracks, false,
2869 "fall back to a breadth-first regexp engine on excessive "
2871DEFINE_UINT(regexp_backtracks_before_fallback, 50000,
2872 "number of backtracks during regexp execution before fall back "
2873 "to experimental engine if "
2874 "enable_experimental_regexp_engine_on_excessive_backtracks is set")
2876#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64
2877DEFINE_BOOL(regexp_simd,
true,
"enable SIMD for regexp jit code")
2881 "enable SIMD for regexp jit code (not supported for this architecture)")
2885 "trace the read-only promotion pass")
2886DEFINE_BOOL(trace_read_only_promotion_verbose, false,
2887 "trace the read-only promotion pass")
2889 trace_read_only_promotion)
2892DEFINE_BOOL(testing_bool_flag, true, "testing_bool_flag")
2894DEFINE_INT(testing_int_flag, 13, "testing_int_flag")
2896DEFINE_STRING(testing_string_flag, "Hello, world!", "
string-flag")
2897DEFINE_INT(testing_prng_seed, 42, "Seed used for threading test randomness")
2901 testing_d8_test_runner, false,
2902 "test runner turns on this flag to enable a check that the function was "
2903 "prepared for optimization before marking it for optimization")
2906 strict_termination_checks,
2907 "Enable strict terminating DCHECKs to prevent accidentally "
2908 "keeping on executing JS after terminating V8.")
2912 "Fuzzers use this flag to signal that they are ... fuzzing. This causes "
2913 "intrinsics to fail silently (e.g. return undefined) on invalid usage.")
2922 hole_fuzzing, false,
2923 "Fuzzers use this flag to turn DCHECKs into NOPs and
CHECK failures into "
2924 "silent exits. This is useful if we want to find memory corruption "
2925 "primitives with a leaked hole, where the engine is already in a weird "
2931#ifdef V8_ENABLE_SANDBOX
2933 "Enable sandbox testing mode. This exposes the memory corruption "
2934 "API (if available) and enables the sandbox crash filter to "
2935 "terminate the process (with status zero) if a crash that does not "
2936 "represent a sandbox violation is detected.")
2939 sandbox_testing,
false,
2940 "Enable sandbox testing mode. This exposes the memory corruption API (if "
2941 "available) and enables the sandbox crash filter to terminate the process "
2942 "(with status zero) if a crash that does not represent a sandbox violation "
2946#ifdef V8_ENABLE_MEMORY_CORRUPTION_API
2949 "Enable sandbox fuzzing mode. This exposes the memory corruption "
2950 "API and enables the sandbox crash filter to terminate the process "
2951 "(with non-zero status) if a crash that does not represent a "
2952 "sandbox violation is detected.")
2955 "Enable sandbox fuzzing mode. This exposes the memory "
2956 "corruption API and enables the sandbox crash filter to "
2957 "terminate the process (with non-zero status) if a crash "
2958 "that does not represent a sandbox violation is detected.")
2965#ifdef V8_ENABLE_MEMORY_CORRUPTION_API
2967 "Exposes the memory corruption API. Set automatically by "
2968 "--sandbox-testing and --sandbox-fuzzing.")
2973 "Exposes the memory corruption API. Set automatically by "
2974 "--sandbox-testing and --sandbox-fuzzing.")
2977#if defined(V8_OS_AIX) && defined(COMPONENT_BUILD)
2981 "Disallow changes to flag values after initializing V8")
2984 "Disallow changes to flag values after initializing V8")
2987#if V8_ENABLE_CET_SHADOW_STACK
2988#define V8_CET_SHADOW_STACK_BOOL true
2990#define V8_CET_SHADOW_STACK_BOOL false
2993 "Generate Intel CET compatible code")
2998 "Path for the generated embedded data file. (mksnapshot only)")
3000 embedded_variant,
nullptr,
3001 "Label to disambiguate symbols in embedded data file. (mksnapshot only)")
3002#if V8_STATIC_ROOTS_GENERATION_BOOL
3004 "Path for writing a fresh static-roots.h. (mksnapshot only, "
3005 "build without static roots only)")
3008 "Write V8 startup as C++ src. (mksnapshot only)")
3010 "Write V8 startup blob file. (mksnapshot only)")
3012 "The mksnapshot target arch. (mksnapshot only)")
3013DEFINE_STRING(target_os,
nullptr, "The mksnapshot target os. (mksnapshot only)")
3015 "Instruct mksnapshot that the target is meant to run in the "
3016 "simulator and it can generate simulator-specific instructions. "
3017 "(mksnapshot only)")
3019 "Path of the input file containing basic information for "
3020 "builtins. (mksnapshot only)")
3022 "Path of the input file containing basic block counters for "
3023 "builtins for logging in turbolizer. (mksnapshot only)")
3027 "Whether the .text section of binary can be read")
3033DEFINE_BOOL(trace_minor_ms_parallel_marking, false,
3034 "trace parallel marking for the young generation")
3035DEFINE_BOOL(minor_ms, false, "perform young generation mark sweep GCs")
3039 "perform young generation marking concurrently")
3042#ifdef V8_ENABLE_BLACK_ALLOCATED_PAGES
3043#define V8_ENABLE_BLACK_ALLOCATED_PAGES_BOOL true
3045#define V8_ENABLE_BLACK_ALLOCATED_PAGES_BOOL false
3049 "allocate non-young objects during incremental marking on separate pages")
3051#ifdef V8_ENABLE_STICKY_MARK_BITS
3052#define V8_ENABLE_STICKY_MARK_BITS_BOOL true
3053#if V8_ENABLE_BLACK_ALLOCATED_PAGES_BOOL
3054#error "Black allocated pages are not supported with sticky mark bits"
3057#define V8_ENABLE_STICKY_MARK_BITS_BOOL false
3060 "use sticky mark bits for separation of generations")
3066#define V8_MINOR_MS_CONCURRENT_MARKING_MIN_CAPACITY_DEFAULT 8
3068#define V8_MINOR_MS_CONCURRENT_MARKING_MIN_CAPACITY_DEFAULT 0
3071DEFINE_UINT(minor_ms_min_new_space_capacity_for_concurrent_marking_mb,
3073 "min new space capacity in MBs for using young generation "
3074 "concurrent marking.")
3076DEFINE_UINT(minor_ms_concurrent_marking_trigger, 90,
3077 "minor ms concurrent marking trigger in percent of the current new "
3081 "override for the minimum lab size in KB to be used for new "
3082 "space allocations with minor ms. ")
3088DEFINE_BOOL(help, false, "Print usage message, including flags, on console")
3089DEFINE_BOOL(print_flag_values, false, "Print all flag values of V8")
3091 "Print JS and Wasm feature flags grouped by in-progress, staged, "
3096 "Enable slow histograms with more overhead.")
3098DEFINE_BOOL(use_external_strings, false, "Use external strings for source code")
3101 "Use a mock ArrayBuffer allocator for testing.")
3103 "Memory limit for mock ArrayBuffer allocator used to simulate "
3107 "Use a multi-mapped mock ArrayBuffer allocator for testing.")
3114#ifdef ENABLE_GDB_JIT_INTERFACE
3115#define FLAG FLAG_FULL
3117#define FLAG FLAG_READONLY
3120DEFINE_BOOL(gdbjit,
false,
"enable GDBJIT interface")
3121DEFINE_BOOL(gdbjit_full, false, "enable GDBJIT interface for all code objects")
3122DEFINE_BOOL(gdbjit_dump, false, "dump elf objects with debug info to disk")
3124 "dump only objects containing this substring")
3126#ifdef ENABLE_GDB_JIT_INTERFACE
3137#define FLAG FLAG_FULL
3139#define FLAG FLAG_READONLY
3142#ifdef ENABLE_SLOW_DCHECKS
3144 "enable asserts that are slow to execute")
3147 "enable asserts that are slow to execute")
3157DEFINE_BOOL(trace_contexts, false, "trace contexts operations")
3160DEFINE_BOOL(gc_verbose, false, "print stuff during garbage collection")
3161DEFINE_BOOL(code_stats, false, "report code statistics after GC")
3162DEFINE_BOOL(print_handles, false, "report handles after GC")
3164 "Check that there are not too many handles at GC")
3165DEFINE_BOOL(print_global_handles, false, "report global handles after GC")
3168DEFINE_BOOL(trace_turbo_escape, false, "enable tracing in escape analysis")
3172 "Trace status transitions of ECMAScript modules")
3174 "prints when objects are turned into dictionaries.")
3177DEFINE_BOOL(trace_lazy, false, "trace lazy compilation")
3180DEFINE_BOOL(trace_isolates, false, "trace isolate state changes")
3184 "enable possessive quantifier syntax for testing")
3187DEFINE_BOOL(print_break_location, false, "print source location on debug break")
3197#define FLAG FLAG_FULL
3201 "Specify the name of the log file, use '-' for console, '+' for "
3202 "a temporary file.")
3203DEFINE_BOOL(logfile_per_isolate, true, "Separate log files for each isolate.")
3206 "Minimal logging (no
API, code, GC, suspect, or handles samples).")
3207DEFINE_BOOL(log_all, false, "Log all events to the log file.")
3209DEFINE_BOOL(log_internal_timer_events, false, "See --log-timer-events")
3211 "Log timer events (incl. console.time* and Date.now).")
3213DEFINE_BOOL(log_source_code, false, "Log source code.")
3214DEFINE_BOOL(log_source_position, false, "Log detailed source information.")
3216 "Log code events to the log file without profiling.")
3219DEFINE_BOOL(log_feedback_vector, false, "Log FeedbackVectors on first creation")
3221 "Log all disassembled code to the log file.")
3224 "Log function events "
3225 "(parse, compile, execute) separately.")
3228 "Always generate detailed line information for CPU profiling.")
3231 "Enable the Perfetto code data source.")
3236#define DEFAULT_PROF_SAMPLING_INTERVAL 5000
3238#define DEFAULT_PROF_SAMPLING_INTERVAL 1000
3241 "Interval for --prof samples (in microseconds).")
3242#undef DEFAULT_PROF_SAMPLING_INTERVAL
3244DEFINE_BOOL(prof_cpp,
false,
"Like --prof, but ignore generated code.")
3246 "Used with --prof, turns on browser-compatible mode for profiling.")
3249 "Log statistical profiling information (implies --log-code).")
3253DEFINE_BOOL(ll_prof, false, "Enable low-level linux profiler.")
3256#define DEFINE_PERF_PROF_BOOL(nam, cmt) DEFINE_BOOL(nam, false, cmt)
3257#define DEFINE_PERF_PROF_IMPLICATION DEFINE_IMPLICATION
3259#define DEFINE_PERF_PROF_BOOL(nam, cmt) DEFINE_BOOL_READONLY(nam, false, cmt)
3260#define DEFINE_PERF_PROF_IMPLICATION(...)
3264#define DEFAULT_PERF_BASIC_PROF_PATH "/data/local/tmp"
3265#define DEFAULT_PERF_PROF_PATH DEFAULT_PERF_BASIC_PROF_PATH
3267#define DEFAULT_PERF_BASIC_PROF_PATH "/tmp"
3268#define DEFAULT_PERF_PROF_PATH "."
3272 "Enable perf linux profiler (basic support).")
3275 "directory to write perf-<pid>.map symbol file to")
3277 perf_basic_prof_only_functions,
3278 "Only report function code ranges to perf (
i.e. no stubs).")
3282 perf_prof, "Enable perf linux profiler (experimental annotate support).")
3284 "directory to write jit-<pid>.dump symbol file to")
3286 perf_prof_annotate_wasm,
3287 "Used with --perf-prof, load
wasm source map and provide annotate "
3288 "support (experimental).")
3290 perf_prof_delete_file,
3291 "Remove the perf file right after creating it (for testing only).")
3295#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 || \
3296 V8_TARGET_ARCH_S390X || V8_TARGET_ARCH_PPC64
3298 perf_prof_unwinding_info,
3299 "Enable unwinding info for perf linux profiler (experimental).")
3303 perf_prof_unwinding_info,
false,
3304 "Enable unwinding info for perf linux profiler (experimental).")
3307#undef DEFINE_PERF_PROF_BOOL
3308#undef DEFINE_PERF_PROF_IMPLICATION
3311 "Specify the name of the file for fake gc mmap used in ll_prof")
3314 "output deopt information and disassembly into file "
3315 "code-<pid>-<isolate
id>.asm")
3317 "output deopt information and disassembly into the given file")
3320 "print source code of optimized and inlined functions")
3323 "Used when v8_enable_vtunejit is enabled, load
wasm source map and "
3324 "provide annotate support (experimental).")
3326DEFINE_BOOL(win64_unwinding_info, true, "Enable unwinding info for Windows/x64")
3328DEFINE_BOOL(interpreted_frames_native_stack, false,
3329 "Show interpreted frames on the native stack (useful for external "
3332#if defined(V8_ENABLE_ETW_STACK_WALKING)
3334 "Enable etw stack walking for windows")
3337 "Enable etw debug logging (only on debug builds)")
3338DEFINE_BOOL(enable_etw_by_custom_filter_only, true,
3339 "Enable etw stack walking for windows, but only if explicitly "
3340 "specified in a WPR profile")
3343 "Enable etw stack walking for windows")
3345 "Enable etw debug logging (only on debug builds)")
3347 enable_etw_by_custom_filter_only, false,
3348 "Enable etw stack walking for windows, but only if explicitly "
3349 "specified in a WPR profile")
3352DEFINE_BOOL(print_builtin_size,
false,
"print code size for builtins")
3358#ifdef ENABLE_DISASSEMBLER
3359#define FLAG FLAG_FULL
3361#define FLAG FLAG_READONLY
3365DEFINE_BOOL(trace_elements_transitions,
false,
"trace elements transitions")
3367DEFINE_BOOL(trace_creation_allocation_sites, false,
3368 "trace the creation of allocation sites")
3370DEFINE_BOOL(print_code, false, "print generated code")
3371DEFINE_BOOL(print_opt_code, false, "print optimized code")
3372DEFINE_STRING(print_opt_code_filter, "*", "filter for printing optimized code")
3373DEFINE_BOOL(print_code_verbose, false, "print more information for code")
3374DEFINE_BOOL(print_builtin_code, false, "print generated code for builtins")
3376 "filter for printing builtin code")
3377DEFINE_BOOL(print_regexp_code, false, "print generated regexp code")
3378DEFINE_BOOL(print_regexp_bytecode, false, "print generated regexp bytecode")
3380#ifdef ENABLE_DISASSEMBLER
3381DEFINE_BOOL(print_all_code,
false,
"enable all flags related to printing code")
3390#define FLAG FLAG_FULL
3396DEFINE_BOOL(predictable,
false,
"enable predictable mode")
3406#ifdef V8_ENABLE_MAGLEV
3411DEFINE_BOOL(predictable_and_random_seed_is_0,
true,
3412 "predictable && (random_seed == 0)")
3415 predictable_and_random_seed_is_0, false)
3419 "Predictable garbage collection
schedule. Fixes
heap growing, "
3420 "idle, and memory reducing behavior.")
3432DEFINE_BOOL(single_threaded, false, "disable the use of background tasks")
3439 parallel_compile_tasks_for_eager_toplevel)
3441#ifdef V8_ENABLE_MAGLEV
3449DEFINE_BOOL(single_threaded_gc,
false,
"disable the use of background gc tasks")
3461DEFINE_BOOL(single_threaded_gc_in_background, true,
3462 "disable the use of background gc tasks when in background")
3463DEFINE_BOOL(parallel_pause_for_gc_in_background, true,
3464 "Use parallel threads in the atomic pause for background GCs")
3465DEFINE_BOOL(incremental_marking_for_gc_in_background, true,
3466 "Use parallel threads in the atomic pause for background GCs")
3469 "Enables a shared
heap between isolates.")
3471#if defined(V8_USE_LIBM_TRIG_FUNCTIONS)
3472DEFINE_BOOL(use_libm_trig_functions,
true,
"use libm trig functions")
3477#ifdef VERIFY_PREDICTABLE
3478#define FLAG FLAG_FULL
3480#define FLAG FLAG_READONLY
3484 "this mode is used for checking that V8 behaves predictably")
3486DEFINE_INT(dump_allocations_digest_at_alloc, -1,
3487 "dump allocations digest each n-th allocation")
3489#define LOG_FLAGS(V) \
3491 V(log_code_disassemble) \
3493 V(log_feedback_vector) \
3494 V(log_function_events) \
3497 V(log_source_code) \
3498 V(log_source_position) \
3499 V(log_timer_events) \
3503#define SET_IMPLICATIONS(V) \
3504 DEFINE_IMPLICATION(log_all, V) \
3505 DEFINE_IMPLICATION(V, log)
3509#undef SET_IMPLICATIONS
3525#undef DEFINE_MAYBE_BOOL
3526#undef DEFINE_DEBUG_BOOL
3530#undef DEFINE_IMPLICATION
3531#undef DEFINE_WEAK_IMPLICATION
3532#undef DEFINE_NEG_IMPLICATION
3533#undef DEFINE_NEG_IMPLICATION_WITH_WARNING
3534#undef DEFINE_WEAK_NEG_IMPLICATION
3535#undef DEFINE_NEG_NEG_IMPLICATION
3536#undef DEFINE_NEG_VALUE_IMPLICATION
3537#undef DEFINE_NEG_VALUE_VALUE_IMPLICATION
3538#undef DEFINE_VALUE_IMPLICATION
3539#undef DEFINE_MIN_VALUE_IMPLICATION
3540#undef DEFINE_DISABLE_FLAG_IMPLICATION
3541#undef DEFINE_WEAK_VALUE_IMPLICATION
3542#undef DEFINE_GENERIC_IMPLICATION
3543#undef DEFINE_REQUIREMENT
3544#undef DEFINE_ALIAS_BOOL
3545#undef DEFINE_ALIAS_INT
3546#undef DEFINE_ALIAS_STRING
3547#undef DEFINE_ALIAS_FLOAT
3549#undef FLAG_MODE_DECLARE
3550#undef FLAG_MODE_DEFINE_DEFAULTS
3551#undef FLAG_MODE_META
3552#undef FLAG_MODE_DEFINE_IMPLICATIONS
3553#undef FLAG_MODE_APPLY
interpreter::OperandScale scale
#define V8_EXTERNAL_CODE_SPACE_BOOL
#define V8_DICT_PROPERTY_CONST_TRACKING_BOOL
#define COMPRESS_POINTERS_IN_SHARED_CAGE_BOOL
#define V8_DEFAULT_STACK_SIZE_KB
ZoneVector< OpIndex > candidates
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in allocation speed
#define DEFINE_PERF_PROF_IMPLICATION(...)
#define DEFINE_WEAK_NEG_IMPLICATION(whenflag, thenflag)
#define DEFINE_IMPLICATION(whenflag, thenflag)
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in allocation gc speed threshold for starting incremental marking via a task in percent of available threshold for starting incremental marking immediately in percent of available Use a single schedule for determining a marking schedule between JS and C objects schedules the minor GC task with kUserVisible priority max worker number of concurrent for NumberOfWorkerThreads start background threads that allocate memory concurrent_array_buffer_sweeping use parallel threads to clear weak refs in the atomic pause trace progress of the incremental marking trace object counts and memory usage report a tick only when allocated zone memory changes by this amount TracingFlags::gc_stats TracingFlags::gc_stats track native contexts that are expected to be garbage collected verify heap pointers before and after GC memory reducer runs GC with ReduceMemoryFootprint flag Maximum number of memory reducer GCs scheduled Old gen GC speed is computed directly from gc tracer counters Perform compaction on full GCs based on V8 s default heuristics Perform compaction on every full GC Perform code space compaction when finalizing a full GC with stack Stress GC compaction to flush out bugs with moving objects flush of baseline code when it has not been executed recently Use time base code flushing instead of age Use a progress bar to scan large objects in increments when incremental marking is active force incremental marking for small heaps and run it more often force marking at random points between and X(inclusive) percent " "of the regular marking start limit") DEFINE_INT(stress_scavenge
#define DEFINE_UINT64(nam, def, cmt)
too high values may cause the compiler to hit(release) assertions") DEFINE_BOOL(stress_inline
#define JAVASCRIPT_INPROGRESS_FEATURES(V)
#define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value)
#define DEFINE_MIN_VALUE_IMPLICATION(flag, min_value)
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in allocation gc speed threshold for starting incremental marking via a task in percent of available threshold for starting incremental marking immediately in percent of available Use a single schedule for determining a marking schedule between JS and C objects schedules the minor GC task with kUserVisible priority max worker number of concurrent for NumberOfWorkerThreads start background threads that allocate memory concurrent_array_buffer_sweeping use parallel threads to clear weak refs in the atomic pause trace progress of the incremental marking trace object counts and memory usage report a tick only when allocated zone memory changes by this amount TracingFlags::gc_stats TracingFlags::gc_stats track native contexts that are expected to be garbage collected verify heap pointers before and after GC memory reducer runs GC with ReduceMemoryFootprint flag Maximum number of memory reducer GCs scheduled Old gen GC speed is computed directly from gc tracer counters Perform compaction on full GCs based on V8 s default heuristics Perform compaction on every full GC Perform code space compaction when finalizing a full GC with stack Stress GC compaction to flush out bugs with moving objects flush of baseline code when it has not been executed recently Use time base code flushing instead of age Use a progress bar to scan large objects in increments when incremental marking is active force incremental marking for small heaps and run it more often force marking at random points between and force scavenge at random points between and reclaim otherwise unreachable unmodified wrapper objects when possible less compaction in non memory reducing mode use high priority threads for concurrent Marking Test mode only flag It allows an unit test to select evacuation candidates use incremental marking for CppHeap cppheap_concurrent_marking c value for membalancer A special constant to balance between memory and space tradeoff The smaller the more memory it uses enable use of SSE4 instructions if available enable use of AVX VNNI instructions if available enable use of POPCNT instruction if available force all emitted branches to be in long enable use of partial constant pools(x64 only)") DEFINE_STRING(sim_arm64_optional_features
#define DEFINE_NEG_NEG_IMPLICATION(whenflag, thenflag)
Implies all staged features that we want to ship in the not too far future enable maglev features that we want to ship in the not too far future enable inlining in the maglev optimizing compiler enable aggressive optimizations for loops(loop SPeeling) in the " "maglev optimizing compiler") DEFINE_INT(maglev_loop_peeling_max_size
#define DEFINE_DEBUG_BOOL
#define REGEXP_PEEPHOLE_OPTIMIZATION_BOOL
#define DEFAULT_SCAVENGER_MAX_NEW_SPACE_CAPACITY_MB
#define DEFINE_BOOL(nam, def, cmt)
#define DEFAULT_PERF_PROF_PATH
#define DEFINE_ALIAS_BOOL(alias, nam)
#define V8_SINGLE_GENERATION_BOOL
#define DEFINE_INT(nam, def, cmt)
#define DEFINE_SIZE_T(nam, def, cmt)
#define DEFINE_NEG_VALUE_VALUE_IMPLICATION(whenflag, whenvalue, thenflag, thenvalue)
#define V8_LAZY_SOURCE_POSITIONS_BOOL
#define DEFINE_WEAK_VALUE_IMPLICATION(whenflag, thenflag, value)
#define HARMONY_SHIPPING(V)
#define V8_ENABLE_CONSERVATIVE_STACK_SCANNING_BOOL
#define DEFINE_GENERIC_IMPLICATION(whenflag, statement)
#define DEFINE_MAYBE_BOOL(nam, cmt)
#define FLAG_INPROGRESS_FEATURES(id, description)
#define V8_ENABLE_LOCAL_OFF_STACK_CHECK_BOOL
#define V8_CET_SHADOW_STACK_BOOL
#define JAVASCRIPT_STAGED_FEATURES(V)
#define DEFINE_UINT(nam, def, cmt)
#define V8_DISABLE_WRITE_BARRIERS_BOOL
#define V8_SHORT_BUILTIN_CALLS_BOOL
#define FLAG_SHIPPING_FEATURES(id, description)
#define ENABLE_SPARKPLUG_BY_DEFAULT
#define SET_IMPLICATIONS(V)
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use Turbolev(≈ Maglev+Turboshaft combined) as the 4th tier " "compiler instead of Turbofan") DEFINE_EXPERIMENTAL_FEATURE( turbolev_future
#define DEFAULT_MAX_POLYMORPHIC_MAP_COUNT
#define DEFINE_PERF_PROF_BOOL(nam, cmt)
#define HARMONY_INPROGRESS(V)
#define DEFINE_WEAK_IMPLICATION(whenflag, thenflag)
#define V8_ENABLE_DIRECT_HANDLE_BOOL
#define V8_ENABLE_BLACK_ALLOCATED_PAGES_BOOL
#define DEFINE_BOOL_READONLY(nam, def, cmt)
#define V8_ENABLE_STICKY_MARK_BITS_BOOL
#define V8_ALLOCATION_FOLDING_BOOL
#define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value)
#define V8_ALLOCATION_SITE_TRACKING_BOOL
#define JAVASCRIPT_SHIPPING_FEATURES(V)
#define DEFINE_REQUIREMENT(statement)
#define DEFAULT_PERF_BASIC_PROF_PATH
#define DEFAULT_PROF_SAMPLING_INTERVAL
#define V8_ENABLE_UNCONDITIONAL_WRITE_BARRIERS_BOOL
too high values may cause the compiler to set high thresholds for inlining to as much as possible max_inlined_bytecode_size_absolute
#define DEFINE_EXPERIMENTAL_FEATURE(nam, cmt)
#define FLAG_STAGED_FEATURES(id, description)
#define HARMONY_STAGED(V)
#define DEFINE_STRING(nam, def, cmt)
use conservative stack scanning use direct handles with conservative stack scanning Treat some precise references as conservative references to stress test object pinning in Scavenger minor_gc_task Enables random stressing of object pinning in Scavenger
#define V8_MINOR_MS_CONCURRENT_MARKING_MIN_CAPACITY_DEFAULT
#define DEFINE_SLOW_TRACING_BOOL
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in allocation gc speed threshold for starting incremental marking via a task in percent of available threshold for starting incremental marking immediately in percent of available Use a single schedule for determining a marking schedule between JS and C objects schedules the minor GC task with kUserVisible priority max worker number of concurrent for NumberOfWorkerThreads start background threads that allocate memory concurrent_array_buffer_sweeping use parallel threads to clear weak refs in the atomic pause trace progress of the incremental marking trace object counts and memory usage report a tick only when allocated zone memory changes by this amount TracingFlags::gc_stats TracingFlags::gc_stats track native contexts that are expected to be garbage collected verify heap pointers before and after GC memory reducer runs GC with ReduceMemoryFootprint flag Maximum number of memory reducer GCs scheduled Old gen GC speed is computed directly from gc tracer counters Perform compaction on full GCs based on V8 s default heuristics Perform compaction on every full GC Perform code space compaction when finalizing a full GC with stack Stress GC compaction to flush out bugs with moving objects flush of baseline code when it has not been executed recently Use time base code flushing instead of age Use a progress bar to scan large objects in increments when incremental marking is active force incremental marking for small heaps and run it more often force marking at random points between and force scavenge at random points between and reclaim otherwise unreachable unmodified wrapper objects when possible less compaction in non memory reducing mode use high priority threads for concurrent Marking Test mode only flag It allows an unit test to select evacuation candidates use incremental marking for CppHeap cppheap_concurrent_marking c value for membalancer A special constant to balance between memory and space tradeoff The smaller the more memory it uses enable use of SSE4 instructions if available enable use of AVX VNNI instructions if available enable use of POPCNT instruction if available force all emitted branches to be in long enable use of partial constant none
#define DEFINE_DISABLE_FLAG_IMPLICATION(whenflag, thenflag)
#define DEFINE_NEG_IMPLICATION(whenflag, thenflag)
#define ENABLE_LOG_COLOUR
#define V8_LITE_MODE_BOOL
#define DEFINE_FLOAT(nam, def, cmt)
ZoneVector< RpoNumber > & result
ZoneVector< Entry > entries
std::optional< OolTrapLabel > trap
std::vector< Point > points
#define FOREACH_WASM_STAGING_FEATURE_FLAG(V)
#define FOREACH_WASM_SHIPPED_FEATURE_FLAG(V)
#define FOREACH_WASM_EXPERIMENTAL_FEATURE_FLAG(V)