flag-definitions.h revision 9fac840a46e8b7e26894f4792ba26dde14c56b04
13ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch// Copyright 2010 the V8 project authors. All rights reserved. 2a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// Redistribution and use in source and binary forms, with or without 3a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// modification, are permitted provided that the following conditions are 4a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// met: 5a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// 6a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// * Redistributions of source code must retain the above copyright 7a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// notice, this list of conditions and the following disclaimer. 8a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// * Redistributions in binary form must reproduce the above 9a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// copyright notice, this list of conditions and the following 10a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// disclaimer in the documentation and/or other materials provided 11a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// with the distribution. 12a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// * Neither the name of Google Inc. nor the names of its 13a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// contributors may be used to endorse or promote products derived 14a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// from this software without specific prior written permission. 15a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// 16a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 28a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// This file defines all of the flags. It is separated into different section, 2969a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch// for Debug, Release, Logging and Profiling, etc. To add a new flag, find the 309fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// correct section, and use one of the DEFINE_ macros, without a trailing ';'. 319fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// 329fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// This include does not have a guard, because it is a template-style include, 33a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// which can be included multiple times in different modes. It expects to have 349fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// a mode defined before it's included. The modes are FLAG_MODE_... below: 353ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch 369fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// We want to declare the names of the variables for the header file. Normally 3769a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch// this will just be an extern declaration, but for a readonly flag we let the 3869a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch// compiler make better optimizations by giving it the value. 3969a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch#if defined(FLAG_MODE_DECLARE) 4069a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch#define FLAG_FULL(ftype, ctype, nam, def, cmt) \ 4169a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch extern ctype FLAG_##nam; 429fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#define FLAG_READONLY(ftype, ctype, nam, def, cmt) \ 433ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch static ctype const FLAG_##nam = def; 443ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch 453ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch// We want to supply the actual storage and value for the flag variable in the 463ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch// .cc file. We only do this for writable flags. 479fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#elif defined(FLAG_MODE_DEFINE) 489fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#define FLAG_FULL(ftype, ctype, nam, def, cmt) \ 493ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch ctype FLAG_##nam = def; 503ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch#define FLAG_READONLY(ftype, ctype, nam, def, cmt) 513ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch 523ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch// We need to define all of our default values so that the Flag structure can 539fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// access them by pointer. These are just used internally inside of one .cc, 54257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch// for MODE_META, so there is no impact on the flags interface. 559fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#elif defined(FLAG_MODE_DEFINE_DEFAULTS) 569fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#define FLAG_FULL(ftype, ctype, nam, def, cmt) \ 57257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch static ctype const FLAGDEFAULT_##nam = def; 58257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch#define FLAG_READONLY(ftype, ctype, nam, def, cmt) 599fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 609fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 61257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch// We want to write entries into our meta data table, for internal parsing and 62257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch// printing / etc in the flag parser code. We only do this for writable flags. 63257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch#elif defined(FLAG_MODE_META) 64257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch#define FLAG_FULL(ftype, ctype, nam, def, cmt) \ 65257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch { Flag::TYPE_##ftype, #nam, &FLAG_##nam, &FLAGDEFAULT_##nam, cmt, false }, 66257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch#define FLAG_READONLY(ftype, ctype, nam, def, cmt) 67257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch 68257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch#else 69257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch#error No mode supplied when including flags.defs 70257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch#endif 71257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch 72257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch#ifdef FLAG_MODE_DECLARE 73257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch// Structure used to hold a collection of arguments to the JavaScript code. 74257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdochstruct JSArguments { 75257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdochpublic: 76257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch JSArguments(); 77257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch JSArguments(int argc, const char** argv); 78257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch int argc() const; 79257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch const char** argv(); 80257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch const char*& operator[](int idx); 81589d6979ff2ef66fca2d8fa51404c369ca5e9250Ben Murdoch JSArguments& operator=(JSArguments args); 823ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdochprivate: 83589d6979ff2ef66fca2d8fa51404c369ca5e9250Ben Murdoch int argc_; 849fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block const char** argv_; 859fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block}; 869fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#endif 879fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 889fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#define DEFINE_bool(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt) 898defd9ff6930b4e24729971a61cf7469daf119beSteve Block#define DEFINE_int(nam, def, cmt) FLAG(INT, int, nam, def, cmt) 9050ef84f5fad2def87d3fbc737bec4a32711fdef4Kristian Monsen#define DEFINE_float(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt) 919fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#define DEFINE_string(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt) 9269a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch#define DEFINE_args(nam, def, cmt) FLAG(ARGS, JSArguments, nam, def, cmt) 9350ef84f5fad2def87d3fbc737bec4a32711fdef4Kristian Monsen 9450ef84f5fad2def87d3fbc737bec4a32711fdef4Kristian Monsen// 958defd9ff6930b4e24729971a61cf7469daf119beSteve Block// Flags in all modes. 968defd9ff6930b4e24729971a61cf7469daf119beSteve Block// 979fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#define FLAG FLAG_FULL 989fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 999fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// Flags for Crankshaft. 10069a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch#ifdef V8_TARGET_ARCH_IA32 10169a99ed0b2b2ef69d393c371b03db3a98aaf880eBen MurdochDEFINE_bool(crankshaft, true, "use crankshaft") 10269a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch#else 10369a99ed0b2b2ef69d393c371b03db3a98aaf880eBen MurdochDEFINE_bool(crankshaft, false, "use crankshaft") 10469a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch#endif 10569a99ed0b2b2ef69d393c371b03db3a98aaf880eBen MurdochDEFINE_string(hydrogen_filter, "", "hydrogen use/trace filter") 10669a99ed0b2b2ef69d393c371b03db3a98aaf880eBen MurdochDEFINE_bool(use_hydrogen, true, "use generated hydrogen for compilation") 107257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(build_lithium, true, "use lithium chunk builder") 108257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(alloc_lithium, true, "use lithium register allocator") 109257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(use_lithium, true, "use lithium code generator") 110257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(use_range, true, "use hydrogen range analysis") 111257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(eliminate_dead_phis, true, "eliminate dead phis") 112257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(use_gvn, true, "use hydrogen global value numbering") 113257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(use_peeling, false, "use loop peeling") 114257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(use_canonicalizing, true, "use hydrogen instruction canonicalizing") 115257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(use_inlining, true, "use function inlining") 116257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(limit_inlining, true, "limit code size growth from inlining") 117257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(eliminate_empty_blocks, true, "eliminate empty blocks") 118257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(loop_invariant_code_motion, true, "loop invariant code motion") 119257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(time_hydrogen, false, "timing for hydrogen") 120257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(trace_hydrogen, false, "trace generated hydrogen to file") 121257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(trace_inlining, false, "trace inlining decisions") 122257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(trace_alloc, false, "trace register allocator") 123257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(trace_range, false, "trace range analysis") 124257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(trace_gvn, false, "trace global value numbering") 125257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(trace_representation, false, "trace representation types") 126257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(stress_pointer_maps, false, "pointer map for every instruction") 127257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(stress_environments, false, "environment for every instruction") 1289fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_int(deopt_every_n_times, 1299fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 0, 1309fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "deoptimize every n times a deopt point is passed") 1319fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(process_arguments_object, true, "try to deal with arguments object") 1329fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trap_on_deopt, false, "put a break point before deoptimizing") 1339fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(deoptimize_uncommon_cases, true, "deoptimize uncommon cases") 1349fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(polymorphic_inlining, true, "polymorphic inlining") 1359fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(aggressive_loop_invariant_motion, true, 136a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block "aggressive motion of instructions out of loops") 1379fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#ifdef V8_TARGET_ARCH_IA32 138257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(use_osr, true, "use on-stack replacement") 139257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch#else 140a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDEFINE_bool(use_osr, false, "use on-stack replacement") 141a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#endif 1429fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_osr, false, "trace on-stack replacement") 1439fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_int(stress_runs, 0, "number of stress runs") 1449fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 1459fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// assembler-ia32.cc / assembler-arm.cc / assembler-x64.cc 1469fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(debug_code, false, 1479fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "generate extra code (assertions) for debugging") 1489fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(code_comments, false, "emit comments in code disassembly") 1499fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(emit_branch_hints, false, "emit branch hints") 1509fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(peephole_optimization, true, 151257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch "perform peephole optimizations in assembly code") 15269a99ed0b2b2ef69d393c371b03db3a98aaf880eBen MurdochDEFINE_bool(print_peephole_optimization, false, 15369a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch "print peephole optimizations in assembly code") 15469a99ed0b2b2ef69d393c371b03db3a98aaf880eBen MurdochDEFINE_bool(enable_sse2, true, 15569a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch "enable use of SSE2 instructions if available") 156257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(enable_sse3, true, 157257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch "enable use of SSE3 instructions if available") 158257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(enable_sse4_1, true, 159257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch "enable use of SSE4.1 instructions if available") 160257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(enable_cmov, true, 161257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch "enable use of CMOV instruction if available") 162257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(enable_rdtsc, true, 163257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch "enable use of RDTSC instruction if available") 164257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(enable_sahf, true, 165257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch "enable use of SAHF instruction if available (X64 only)") 166257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(enable_vfp3, true, 167257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch "enable use of VFP3 instructions if available (ARM only)") 168257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(enable_armv7, true, 169257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch "enable use of ARMv7 instructions if available (ARM only)") 170257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch 171257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch// bootstrapper.cc 172257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_string(expose_natives_as, NULL, "expose natives in global object") 173257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_string(expose_debug_as, NULL, "expose debug in global object") 174257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(expose_gc, false, "expose gc extension") 175257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(expose_externalize_string, false, 176257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch "expose externalize string extension") 177257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_int(stack_trace_limit, 10, "number of stack frames to capture") 178257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(disable_native_files, false, "disable builtin natives files") 179257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch 180257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch// builtins-ia32.cc 181257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(inline_new, true, "use fast inline allocation") 182257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch 183257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch// checks.cc 184257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(stack_trace_on_abort, true, 185257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch "print a stack trace if an assertion failure occurs") 186257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch 187257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch// codegen-ia32.cc / codegen-arm.cc 188257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(trace, false, "trace function calls") 189257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(defer_negation, true, "defer negation operation") 190257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(mask_constants_with_cookie, 191257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch true, 192257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch "use random jit cookie to mask large constants") 193257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch 194257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch// codegen.cc 1959fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(lazy, true, "use lazy compilation") 1969fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_opt, false, "trace lazy optimization") 197a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDEFINE_bool(trace_opt_stats, false, "trace lazy optimization statistics") 1989fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(opt, true, "use adaptive optimizations") 1999fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(opt_eagerly, false, "be more eager when adaptively optimizing") 2009fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(always_opt, false, "always try to optimize functions") 2019fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(prepare_always_opt, false, "prepare for turning on always opt") 2029fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(debug_info, true, "add debug information to compiled functions") 2038defd9ff6930b4e24729971a61cf7469daf119beSteve BlockDEFINE_bool(deopt, true, "support deoptimization") 204a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDEFINE_bool(trace_deopt, false, "trace deoptimization") 2059fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 206a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// compiler.cc 207a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDEFINE_bool(strict, false, "strict error checking") 2089fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_int(min_preparse_length, 1024, 209257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch "minimum length for automatic enable preparsing") 2109fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(full_compiler, true, "enable dedicated backend for run-once code") 211a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDEFINE_bool(always_full_compiler, false, 212d0582a6c46733687d045e4188a1bcd0123c758a1Steve Block "try to use the dedicated run-once backend for all code") 21369a99ed0b2b2ef69d393c371b03db3a98aaf880eBen MurdochDEFINE_bool(trace_bailout, false, 21469a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch "print reasons for falling back to using the classic V8 backend") 21569a99ed0b2b2ef69d393c371b03db3a98aaf880eBen MurdochDEFINE_bool(safe_int32_compiler, true, 21669a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch "enable optimized side-effect-free int32 expressions.") 21769a99ed0b2b2ef69d393c371b03db3a98aaf880eBen MurdochDEFINE_bool(use_flow_graph, false, "perform flow-graph based optimizations") 21869a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch 2199fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// compilation-cache.cc 220257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(compilation_cache, true, "enable compilation cache") 2219fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 2229fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// data-flow.cc 223257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(loop_peeling, false, "Peel off the first iteration of loops.") 2249fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 2259fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// debug.cc 226d0582a6c46733687d045e4188a1bcd0123c758a1Steve BlockDEFINE_bool(remote_debugging, false, "enable remote debugging") 2279fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_debug_json, false, "trace debugging JSON request/response") 2289fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(debugger_auto_break, true, 2299fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "automatically set the debug break flag when debugger commands are " 2309fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "in the queue") 2313ef787dbeca8a5fb1086949cda830dccee07bfbdBen MurdochDEFINE_bool(enable_liveedit, true, "enable liveedit experimental feature") 2323ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch 2333ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch// frames.cc 234a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDEFINE_int(max_stack_trace_source_length, 300, 2359fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "maximum length of function source code printed in a stack trace.") 236a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 237a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// full-codegen.cc 2389fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(always_inline_smi_code, false, 2399fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "always inline smi code in non-opt code") 2409fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 2419fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// heap.cc 2429fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_int(max_new_space_size, 0, "max size of the new generation (in kBytes)") 2439fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_int(max_old_space_size, 0, "max size of the old generation (in Mbytes)") 2449fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_int(max_executable_size, 0, "max size of executable memory (in Mbytes)") 2459fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(gc_global, false, "always perform global GCs") 2469fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_int(gc_interval, -1, "garbage collect after <n> allocations") 2479fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_gc, false, 2489fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "print one trace line following each garbage collection") 2499fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_gc_nvp, false, 2503ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch "print one detailed trace line in name=value format " 2519fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "after each garbage collection") 2529fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_cumulative_gc_stat, false, 2539fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "print cumulative GC statistics in name=value format on exit") 2549fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_gc_verbose, false, 2559fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "print more details following each garbage collection") 2569fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(collect_maps, true, 2579fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "garbage collect maps from which no objects can be reached") 2589fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(flush_code, true, 2599fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "flush code that we expect not to use again before full gc") 2609fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 2619fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// v8.cc 2629fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(use_idle_notification, true, 2639fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Use idle notification to reduce memory footprint.") 2649fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// ic.cc 2659fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(use_ic, true, "use inline caching") 2669fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 2679fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// macro-assembler-ia32.cc 2689fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(native_code_counters, false, 2699fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "generate extra code for manipulating stats counters") 2709fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 2719fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// mark-compact.cc 2729fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(always_compact, false, "Perform compaction on every full GC") 2739fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(never_compact, false, 2749fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Never perform compaction on full GC - testing only") 2759fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(cleanup_ics_at_gc, true, 2769fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Flush inline caches prior to mark compact collection.") 2779fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(cleanup_caches_in_maps_at_gc, true, 2789fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Flush code caches in maps during mark compact cycle.") 2799fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_int(random_seed, 0, 2809fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Default seed for initializing random generator " 2819fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "(0, the default, means to use system random).") 2829fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 2839fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(canonicalize_object_literal_maps, true, 2849fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Canonicalize maps for object literals.") 2859fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 2869fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(use_big_map_space, true, 2879fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Use big map space, but don't compact if it grew too big.") 2889fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 2899fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_int(max_map_space_pages, MapSpace::kMaxMapPageIndex - 1, 2909fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Maximum number of pages in map space which still allows to encode " 2919fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "forwarding pointers. That's actually a constant, but it's useful " 2923ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch "to control it with a flag for better testing.") 2933ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch 2949fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// mksnapshot.cc 2959fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(h, false, "print this message") 2969fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(new_snapshot, true, "use new snapshot implementation") 2979fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 2989fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// objects.cc 2999fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(use_verbose_printer, true, "allows verbose printing") 3009fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3019fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// parser.cc 3029fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(allow_natives_syntax, false, "allow natives syntax") 3039fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3049fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// rewriter.cc 3059fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(optimize_ast, true, "optimize the ast") 3069fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3079fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// simulator-arm.cc and simulator-mips.cc 3089fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_sim, false, "Trace simulator execution") 309589d6979ff2ef66fca2d8fa51404c369ca5e9250Ben MurdochDEFINE_bool(check_icache, false, "Check icache flushes in ARM simulator") 310589d6979ff2ef66fca2d8fa51404c369ca5e9250Ben MurdochDEFINE_int(stop_sim_at, 0, "Simulator stop after x number of instructions") 31169a99ed0b2b2ef69d393c371b03db3a98aaf880eBen MurdochDEFINE_int(sim_stack_alignment, 8, 31269a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch "Stack alingment in bytes in simulator (4 or 8, 8 is default)") 3139fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3149fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// top.cc 3159fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_exception, false, 3169fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "print stack trace when throwing exceptions") 3179fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(preallocate_message_memory, false, 3189fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "preallocate some memory to build stack traces.") 3199fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3209fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// v8.cc 3219fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(preemption, false, 3229fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "activate a 100ms timer that switches between V8 threads") 3239fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3249fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// Regexp 3259fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_regexps, false, "trace regexp execution") 3269fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(regexp_optimization, true, "generate optimized regexp code") 3279fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(regexp_entry_native, true, "use native code to enter regexp") 3289fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3299fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// Testing flags test/cctest/test-{flags,api,serialization}.cc 3309fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(testing_bool_flag, true, "testing_bool_flag") 3319fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_int(testing_int_flag, 13, "testing_int_flag") 3329fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_float(testing_float_flag, 2.5, "float-flag") 3339fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_string(testing_string_flag, "Hello, world!", "string-flag") 3349fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_int(testing_prng_seed, 42, "Seed used for threading test randomness") 3359fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#ifdef WIN32 3369fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_string(testing_serialization_file, "C:\\Windows\\Temp\\serdes", 3379fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "file in which to testing_serialize heap") 3389fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#else 3399fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_string(testing_serialization_file, "/tmp/serdes", 3409fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "file in which to serialize heap") 3419fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#endif 3429fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3439fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// 3449fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// Dev shell flags 3459fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// 3469fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3479fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(help, false, "Print usage message, including flags, on console") 3489fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(dump_counters, false, "Dump counters on exit") 3499fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(debugger, false, "Enable JavaScript debugger") 3503ef787dbeca8a5fb1086949cda830dccee07bfbdBen MurdochDEFINE_bool(remote_debugger, false, "Connect JavaScript debugger to the " 3513ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch "debugger agent in another process") 3521e0659c275bb392c045087af4f6b0d7565cb3d77Steve BlockDEFINE_bool(debugger_agent, false, "Enable debugger agent") 3531e0659c275bb392c045087af4f6b0d7565cb3d77Steve BlockDEFINE_int(debugger_port, 5858, "Port to use for remote debugging") 3543ef787dbeca8a5fb1086949cda830dccee07bfbdBen MurdochDEFINE_string(map_counters, NULL, "Map counters to a file") 3553ef787dbeca8a5fb1086949cda830dccee07bfbdBen MurdochDEFINE_args(js_arguments, JSArguments(), 3569fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Pass all remaining arguments to the script. Alias for \"--\".") 3579fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 358257744e915dfc84d6d07a6b2accf8402d9ffc708Ben Murdoch// 3599fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// Debug only flags 3609fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// 36144f0eee88ff00398ff7f715fab053374d808c90dSteve Block#undef FLAG 36244f0eee88ff00398ff7f715fab053374d808c90dSteve Block#ifdef DEBUG 3633ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch#define FLAG FLAG_FULL 3649fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#else 3659fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#define FLAG FLAG_READONLY 366086aeeaae12517475c22695a200be45495516549Ben Murdoch#endif 367086aeeaae12517475c22695a200be45495516549Ben Murdoch 3689fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// checks.cc 3699fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(enable_slow_asserts, false, 3701e0659c275bb392c045087af4f6b0d7565cb3d77Steve Block "enable asserts that are slow to execute") 3719fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3729fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// codegen-ia32.cc / codegen-arm.cc 3731e0659c275bb392c045087af4f6b0d7565cb3d77Steve BlockDEFINE_bool(trace_codegen, false, 3741e0659c275bb392c045087af4f6b0d7565cb3d77Steve Block "print name of functions for which code is generated") 3751e0659c275bb392c045087af4f6b0d7565cb3d77Steve BlockDEFINE_bool(print_source, false, "pretty print source code") 3769fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_builtin_source, false, 3779fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "pretty print source code for builtins") 3789fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_ast, false, "print source AST") 3799fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_builtin_ast, false, "print source AST for builtins") 3809fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_json_ast, false, "print source AST as JSON") 3819fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_builtin_json_ast, false, 3829fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "print source AST for builtins as JSON") 3839fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_calls, false, "trace calls") 3849fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_builtin_calls, false, "trace builtins calls") 3859fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_string(stop_at, "", "function name where to insert a breakpoint") 3869fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3879fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// compiler.cc 3889fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_builtin_scopes, false, "print scopes for builtins") 3899fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_scopes, false, "print scopes") 3909fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_ir, false, "print the AST as seen by the backend") 3919fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_graph_text, false, 3929fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "print a text representation of the flow graph") 3939fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3943ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch// contexts.cc 3953ef787dbeca8a5fb1086949cda830dccee07bfbdBen MurdochDEFINE_bool(trace_contexts, false, "trace contexts operations") 3969fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 3979fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// heap.cc 3983ef787dbeca8a5fb1086949cda830dccee07bfbdBen MurdochDEFINE_bool(gc_greedy, false, "perform GC prior to some allocations") 39944f0eee88ff00398ff7f715fab053374d808c90dSteve BlockDEFINE_bool(gc_verbose, false, "print stuff during garbage collection") 40044f0eee88ff00398ff7f715fab053374d808c90dSteve BlockDEFINE_bool(heap_stats, false, "report heap statistics before and after GC") 40144f0eee88ff00398ff7f715fab053374d808c90dSteve BlockDEFINE_bool(code_stats, false, "report code statistics after GC") 4029fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(verify_heap, false, "verify heap pointers before and after GC") 403257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(print_handles, false, "report handles after GC") 4049fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_global_handles, false, "report global handles after GC") 4059fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 4069fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// ic.cc 4079fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_ic, false, "trace inline cache state transitions") 4089fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 4099fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// objects.cc 4109fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_normalization, 4119fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block false, 4123ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch "prints when objects are turned into dictionaries.") 4139fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 4149fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// runtime.cc 4159fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_lazy, false, "trace lazy compilation") 4169fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 4179fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// serialize.cc 4189fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(debug_serialization, false, 4199fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "write debug information into the snapshot.") 4209fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 4219fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// spaces.cc 4229fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(collect_heap_spill_statistics, false, 4239fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "report heap spill statistics along with heap_stats " 4249fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "(requires heap_stats)") 4259fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 4269fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// VM state 4279fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(log_state_changes, false, "Log state changes.") 4289fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 4299fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// Regexp 4309fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(regexp_possessive_quantifier, 4319fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block false, 4329fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "enable possessive quantifier syntax for testing") 4339fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_regexp_bytecodes, false, "trace regexp bytecode execution") 4349fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(trace_regexp_assembler, 435589d6979ff2ef66fca2d8fa51404c369ca5e9250Ben Murdoch false, 436589d6979ff2ef66fca2d8fa51404c369ca5e9250Ben Murdoch "trace regexp macro assembler calls.") 4379fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 4389fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// 4399fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// Logging and profiling only flags 4409fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// 4419fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#undef FLAG 4429fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#ifdef ENABLE_LOGGING_AND_PROFILING 44344f0eee88ff00398ff7f715fab053374d808c90dSteve Block#define FLAG FLAG_FULL 444589d6979ff2ef66fca2d8fa51404c369ca5e9250Ben Murdoch#else 4459fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#define FLAG FLAG_READONLY 4469fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#endif 4479fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 4489fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// log.cc 4499fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(log, false, 4503ef787dbeca8a5fb1086949cda830dccee07bfbdBen Murdoch "Minimal logging (no API, code, GC, suspect, or handles samples).") 4513ef787dbeca8a5fb1086949cda830dccee07bfbdBen MurdochDEFINE_bool(log_all, false, "Log all events to the log file.") 4523ef787dbeca8a5fb1086949cda830dccee07bfbdBen MurdochDEFINE_bool(log_runtime, false, "Activate runtime system %Log call.") 4539fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(log_api, false, "Log API events to the log file.") 4549fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(log_code, false, 4559fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Log code events to the log file without profiling.") 4569fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(log_gc, false, 4579fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Log heap samples on garbage collection for the hp2ps tool.") 4589fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(log_handles, false, "Log global handle events.") 4599fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(log_snapshot_positions, false, 4609fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "log positions of (de)serialized objects in the snapshot.") 4619fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(log_suspect, false, "Log suspect operations.") 4629fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(log_producers, false, "Log stack traces of JS objects allocations.") 4639fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(prof, false, 4649fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Log statistical profiling information (implies --log-code).") 4659fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(prof_auto, true, 4669fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Used with --prof, starts profiling automatically") 4679fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(prof_lazy, false, 4689fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Used with --prof, only does sampling and logging" 4699fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block " when profiler is active (implies --noprof_auto).") 470257744e915dfc84d6d07a6b2accf8402d9ffc708Ben MurdochDEFINE_bool(prof_browser_mode, true, 4719fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Used with --prof, turns on browser-compatible mode for profiling.") 4729fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(log_regexp, false, "Log regular expression execution.") 4739fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(sliding_state_window, false, 4749fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Update sliding state window counters.") 4759fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_string(logfile, "v8.log", "Specify the name of the log file.") 4769fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(oprofile, false, "Enable JIT agent for OProfile.") 4779fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(ll_prof, false, "Enable low-level linux profiler.") 4783fb3ca8c7ca439d408449a395897395c0faae8d1Ben Murdoch 4793fb3ca8c7ca439d408449a395897395c0faae8d1Ben Murdoch// 4809fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// Heap protection flags 48144f0eee88ff00398ff7f715fab053374d808c90dSteve Block// Using heap protection requires ENABLE_LOGGING_AND_PROFILING as well. 4829fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// 4839fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#ifdef ENABLE_HEAP_PROTECTION 4843fb3ca8c7ca439d408449a395897395c0faae8d1Ben Murdoch#undef FLAG 4859fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#define FLAG FLAG_FULL 4869fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 4879fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(protect_heap, false, 4889fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "Protect/unprotect V8's heap when leaving/entring the VM.") 4899fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 4909fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#endif 4919fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 4929fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// 4939fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// Disassembler only flags 4949fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// 4959fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#undef FLAG 4969fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#ifdef ENABLE_DISASSEMBLER 4979fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#define FLAG FLAG_FULL 4989fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#else 499a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#define FLAG FLAG_READONLY 5009fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#endif 50169a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch 50269a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch// code-stubs.cc 50369a99ed0b2b2ef69d393c371b03db3a98aaf880eBen MurdochDEFINE_bool(print_code_stubs, false, "print code stubs") 50469a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch 50569a99ed0b2b2ef69d393c371b03db3a98aaf880eBen Murdoch// codegen-ia32.cc / codegen-arm.cc 5069fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_code, false, "print generated code") 5079fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_opt_code, false, "print optimized code") 5089fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_unopt_code, false, "print unoptimized code before " 5099fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block "printing optimized code based on it") 5109fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_code_verbose, false, "print more information for code") 5119fac840a46e8b7e26894f4792ba26dde14c56b04Steve BlockDEFINE_bool(print_builtin_code, false, "print generated code for builtins") 5129fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 5139fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block// Cleanup... 5149fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#undef FLAG_FULL 5159fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#undef FLAG_READONLY 5169fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#undef FLAG 5179fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 5189fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#undef DEFINE_bool 5199fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#undef DEFINE_int 5209fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#undef DEFINE_string 5219fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block 5229fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#undef FLAG_MODE_DECLARE 5239fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#undef FLAG_MODE_DEFINE 5249fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#undef FLAG_MODE_DEFINE_DEFAULTS 5259fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block#undef FLAG_MODE_META 5269fac840a46e8b7e26894f4792ba26dde14c56b04Steve Block