danno@chromium.org | fa458e4 | 2012-02-01 10:48:36 +0000 | [diff] [blame] | 1 | // Copyright 2012 the V8 project authors. All rights reserved. |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 2 | // Redistribution and use in source and binary forms, with or without |
| 3 | // modification, are permitted provided that the following conditions are |
| 4 | // met: |
| 5 | // |
| 6 | // * Redistributions of source code must retain the above copyright |
| 7 | // notice, this list of conditions and the following disclaimer. |
| 8 | // * Redistributions in binary form must reproduce the above |
| 9 | // copyright notice, this list of conditions and the following |
| 10 | // disclaimer in the documentation and/or other materials provided |
| 11 | // with the distribution. |
| 12 | // * Neither the name of Google Inc. nor the names of its |
| 13 | // contributors may be used to endorse or promote products derived |
| 14 | // from this software without specific prior written permission. |
| 15 | // |
| 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 17 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 18 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 19 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 20 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 21 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | |
| 28 | // This file defines all of the flags. It is separated into different section, |
| 29 | // for Debug, Release, Logging and Profiling, etc. To add a new flag, find the |
| 30 | // correct section, and use one of the DEFINE_ macros, without a trailing ';'. |
| 31 | // |
| 32 | // This include does not have a guard, because it is a template-style include, |
| 33 | // which can be included multiple times in different modes. It expects to have |
| 34 | // a mode defined before it's included. The modes are FLAG_MODE_... below: |
| 35 | |
| 36 | // We want to declare the names of the variables for the header file. Normally |
| 37 | // this will just be an extern declaration, but for a readonly flag we let the |
| 38 | // compiler make better optimizations by giving it the value. |
| 39 | #if defined(FLAG_MODE_DECLARE) |
| 40 | #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ |
| 41 | extern ctype FLAG_##nam; |
| 42 | #define FLAG_READONLY(ftype, ctype, nam, def, cmt) \ |
| 43 | static ctype const FLAG_##nam = def; |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 44 | #define DEFINE_implication(whenflag, thenflag) |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 45 | |
| 46 | // We want to supply the actual storage and value for the flag variable in the |
| 47 | // .cc file. We only do this for writable flags. |
| 48 | #elif defined(FLAG_MODE_DEFINE) |
| 49 | #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ |
| 50 | ctype FLAG_##nam = def; |
| 51 | #define FLAG_READONLY(ftype, ctype, nam, def, cmt) |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 52 | #define DEFINE_implication(whenflag, thenflag) |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 53 | |
| 54 | // We need to define all of our default values so that the Flag structure can |
| 55 | // access them by pointer. These are just used internally inside of one .cc, |
| 56 | // for MODE_META, so there is no impact on the flags interface. |
| 57 | #elif defined(FLAG_MODE_DEFINE_DEFAULTS) |
| 58 | #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ |
| 59 | static ctype const FLAGDEFAULT_##nam = def; |
| 60 | #define FLAG_READONLY(ftype, ctype, nam, def, cmt) |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 61 | #define DEFINE_implication(whenflag, thenflag) |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 62 | |
| 63 | // We want to write entries into our meta data table, for internal parsing and |
| 64 | // printing / etc in the flag parser code. We only do this for writable flags. |
| 65 | #elif defined(FLAG_MODE_META) |
| 66 | #define FLAG_FULL(ftype, ctype, nam, def, cmt) \ |
ager@chromium.org | 41826e7 | 2009-03-30 13:30:57 +0000 | [diff] [blame] | 67 | { Flag::TYPE_##ftype, #nam, &FLAG_##nam, &FLAGDEFAULT_##nam, cmt, false }, |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 68 | #define FLAG_READONLY(ftype, ctype, nam, def, cmt) |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 69 | #define DEFINE_implication(whenflag, thenflag) |
| 70 | |
| 71 | // We produce the code to set flags when it is implied by another flag. |
| 72 | #elif defined(FLAG_MODE_DEFINE_IMPLICATIONS) |
| 73 | #define FLAG_FULL(ftype, ctype, nam, def, cmt) |
| 74 | #define FLAG_READONLY(ftype, ctype, nam, def, cmt) |
| 75 | #define DEFINE_implication(whenflag, thenflag) \ |
| 76 | if (FLAG_##whenflag) FLAG_##thenflag = true; |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 77 | |
| 78 | #else |
| 79 | #error No mode supplied when including flags.defs |
| 80 | #endif |
| 81 | |
ager@chromium.org | 3bf7b91 | 2008-11-17 09:09:45 +0000 | [diff] [blame] | 82 | #ifdef FLAG_MODE_DECLARE |
| 83 | // Structure used to hold a collection of arguments to the JavaScript code. |
jkummerow@chromium.org | 1456e70 | 2012-03-30 08:38:13 +0000 | [diff] [blame] | 84 | #define JSARGUMENTS_INIT {{}} |
ager@chromium.org | 3bf7b91 | 2008-11-17 09:09:45 +0000 | [diff] [blame] | 85 | struct JSArguments { |
| 86 | public: |
jkummerow@chromium.org | 1456e70 | 2012-03-30 08:38:13 +0000 | [diff] [blame] | 87 | inline int argc() const { |
| 88 | return static_cast<int>(storage_[0]); |
| 89 | } |
| 90 | inline const char** argv() const { |
| 91 | return reinterpret_cast<const char**>(storage_[1]); |
| 92 | } |
| 93 | inline const char*& operator[] (int idx) const { |
| 94 | return argv()[idx]; |
| 95 | } |
| 96 | inline JSArguments& operator=(JSArguments args) { |
| 97 | set_argc(args.argc()); |
| 98 | set_argv(args.argv()); |
| 99 | return *this; |
| 100 | } |
| 101 | static JSArguments Create(int argc, const char** argv) { |
| 102 | JSArguments args; |
| 103 | args.set_argc(argc); |
| 104 | args.set_argv(argv); |
| 105 | return args; |
| 106 | } |
ager@chromium.org | 3bf7b91 | 2008-11-17 09:09:45 +0000 | [diff] [blame] | 107 | private: |
jkummerow@chromium.org | 1456e70 | 2012-03-30 08:38:13 +0000 | [diff] [blame] | 108 | void set_argc(int argc) { |
| 109 | storage_[0] = argc; |
| 110 | } |
| 111 | void set_argv(const char** argv) { |
| 112 | storage_[1] = reinterpret_cast<AtomicWord>(argv); |
| 113 | } |
| 114 | public: |
| 115 | // Contains argc and argv. Unfortunately we have to store these two fields |
| 116 | // into a single one to avoid making the initialization macro (which would be |
| 117 | // "{ 0, NULL }") contain a coma. |
| 118 | AtomicWord storage_[2]; |
ager@chromium.org | 3bf7b91 | 2008-11-17 09:09:45 +0000 | [diff] [blame] | 119 | }; |
| 120 | #endif |
| 121 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 122 | #define DEFINE_bool(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt) |
| 123 | #define DEFINE_int(nam, def, cmt) FLAG(INT, int, nam, def, cmt) |
| 124 | #define DEFINE_float(nam, def, cmt) FLAG(FLOAT, double, nam, def, cmt) |
| 125 | #define DEFINE_string(nam, def, cmt) FLAG(STRING, const char*, nam, def, cmt) |
ager@chromium.org | 3bf7b91 | 2008-11-17 09:09:45 +0000 | [diff] [blame] | 126 | #define DEFINE_args(nam, def, cmt) FLAG(ARGS, JSArguments, nam, def, cmt) |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 127 | |
| 128 | // |
| 129 | // Flags in all modes. |
| 130 | // |
| 131 | #define FLAG FLAG_FULL |
| 132 | |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 133 | // Flags for language modes and experimental language features. |
| 134 | DEFINE_bool(use_strict, false, "enforce strict mode") |
mmassi@chromium.org | 7028c05 | 2012-06-13 11:51:58 +0000 | [diff] [blame] | 135 | DEFINE_bool(es5_readonly, false, |
| 136 | "activate correct semantics for inheriting readonliness") |
rossberg@chromium.org | 657d53b | 2012-07-12 11:06:03 +0000 | [diff] [blame] | 137 | DEFINE_bool(es52_globals, true, |
mstarzinger@chromium.org | 88d326b | 2012-04-23 12:57:22 +0000 | [diff] [blame] | 138 | "activate new semantics for global var declarations") |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 139 | |
whesse@chromium.org | 4acdc2c | 2011-08-15 13:01:23 +0000 | [diff] [blame] | 140 | DEFINE_bool(harmony_typeof, false, "enable harmony semantics for typeof") |
rossberg@chromium.org | b4b2aa6 | 2011-10-13 09:49:59 +0000 | [diff] [blame] | 141 | DEFINE_bool(harmony_scoping, false, "enable harmony block scoping") |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 142 | DEFINE_bool(harmony_modules, false, |
| 143 | "enable harmony modules (implies block scoping)") |
danno@chromium.org | 160a7b0 | 2011-04-18 15:51:38 +0000 | [diff] [blame] | 144 | DEFINE_bool(harmony_proxies, false, "enable harmony proxies") |
erik.corry@gmail.com | 394dbcf | 2011-10-27 07:38:48 +0000 | [diff] [blame] | 145 | DEFINE_bool(harmony_collections, false, |
| 146 | "enable harmony collections (sets, maps, and weak maps)") |
danno@chromium.org | fa458e4 | 2012-02-01 10:48:36 +0000 | [diff] [blame] | 147 | DEFINE_bool(harmony, false, "enable all harmony features (except typeof)") |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 148 | DEFINE_implication(harmony, harmony_scoping) |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 149 | DEFINE_implication(harmony, harmony_modules) |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 150 | DEFINE_implication(harmony, harmony_proxies) |
| 151 | DEFINE_implication(harmony, harmony_collections) |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 152 | DEFINE_implication(harmony_modules, harmony_scoping) |
danno@chromium.org | 160a7b0 | 2011-04-18 15:51:38 +0000 | [diff] [blame] | 153 | |
svenpanne@chromium.org | 6d786c9 | 2011-06-15 10:58:27 +0000 | [diff] [blame] | 154 | // Flags for experimental implementation features. |
mstarzinger@chromium.org | c6d9cee | 2012-07-03 10:03:19 +0000 | [diff] [blame] | 155 | DEFINE_bool(packed_arrays, true, "optimizes arrays that have no holes") |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 156 | DEFINE_bool(smi_only_arrays, true, "tracks arrays with only smi values") |
rossberg@chromium.org | b4b2aa6 | 2011-10-13 09:49:59 +0000 | [diff] [blame] | 157 | DEFINE_bool(clever_optimizations, |
| 158 | true, |
| 159 | "Optimize object size, Array shift, DOM strings and string +") |
svenpanne@chromium.org | 6d786c9 | 2011-06-15 10:58:27 +0000 | [diff] [blame] | 160 | |
danno@chromium.org | fa458e4 | 2012-02-01 10:48:36 +0000 | [diff] [blame] | 161 | // Flags for data representation optimizations |
| 162 | DEFINE_bool(unbox_double_arrays, true, "automatically unbox arrays of doubles") |
| 163 | DEFINE_bool(string_slices, true, "use string slices") |
| 164 | |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 165 | // Flags for Crankshaft. |
jkummerow@chromium.org | c3b3712 | 2011-11-07 10:14:12 +0000 | [diff] [blame] | 166 | DEFINE_bool(crankshaft, true, "use crankshaft") |
mstarzinger@chromium.org | 3233d2f | 2012-03-14 11:16:03 +0000 | [diff] [blame] | 167 | DEFINE_string(hydrogen_filter, "", "optimization filter") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 168 | DEFINE_bool(use_range, true, "use hydrogen range analysis") |
| 169 | DEFINE_bool(eliminate_dead_phis, true, "eliminate dead phis") |
| 170 | DEFINE_bool(use_gvn, true, "use hydrogen global value numbering") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 171 | DEFINE_bool(use_canonicalizing, true, "use hydrogen instruction canonicalizing") |
| 172 | DEFINE_bool(use_inlining, true, "use function inlining") |
mstarzinger@chromium.org | 88d326b | 2012-04-23 12:57:22 +0000 | [diff] [blame] | 173 | DEFINE_int(max_inlined_source_size, 600, |
| 174 | "maximum source size in bytes considered for a single inlining") |
| 175 | DEFINE_int(max_inlined_nodes, 196, |
| 176 | "maximum number of AST nodes considered for a single inlining") |
| 177 | DEFINE_int(max_inlined_nodes_cumulative, 196, |
| 178 | "maximum cumulative number of AST nodes considered for inlining") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 179 | DEFINE_bool(loop_invariant_code_motion, true, "loop invariant code motion") |
erikcorry | 0ad885c | 2011-11-21 13:51:57 +0000 | [diff] [blame] | 180 | DEFINE_bool(collect_megamorphic_maps_from_stub_cache, |
| 181 | true, |
| 182 | "crankshaft harvests type feedback from stub cache") |
whesse@chromium.org | b08986c | 2011-03-14 16:13:42 +0000 | [diff] [blame] | 183 | DEFINE_bool(hydrogen_stats, false, "print statistics for hydrogen") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 184 | DEFINE_bool(trace_hydrogen, false, "trace generated hydrogen to file") |
fschneider@chromium.org | 35814e5 | 2012-03-01 15:43:35 +0000 | [diff] [blame] | 185 | DEFINE_string(trace_phase, "Z", "trace generated IR for specified phases") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 186 | DEFINE_bool(trace_inlining, false, "trace inlining decisions") |
| 187 | DEFINE_bool(trace_alloc, false, "trace register allocator") |
fschneider@chromium.org | 3a5fd78 | 2011-02-24 10:10:44 +0000 | [diff] [blame] | 188 | DEFINE_bool(trace_all_uses, false, "trace all use positions") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 189 | DEFINE_bool(trace_range, false, "trace range analysis") |
| 190 | DEFINE_bool(trace_gvn, false, "trace global value numbering") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 191 | DEFINE_bool(trace_representation, false, "trace representation types") |
| 192 | DEFINE_bool(stress_pointer_maps, false, "pointer map for every instruction") |
| 193 | DEFINE_bool(stress_environments, false, "environment for every instruction") |
| 194 | DEFINE_int(deopt_every_n_times, |
| 195 | 0, |
| 196 | "deoptimize every n times a deopt point is passed") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 197 | DEFINE_bool(trap_on_deopt, false, "put a break point before deoptimizing") |
| 198 | DEFINE_bool(deoptimize_uncommon_cases, true, "deoptimize uncommon cases") |
| 199 | DEFINE_bool(polymorphic_inlining, true, "polymorphic inlining") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 200 | DEFINE_bool(use_osr, true, "use on-stack replacement") |
danno@chromium.org | 81cac2b | 2012-07-10 11:28:27 +0000 | [diff] [blame] | 201 | DEFINE_bool(array_bounds_checks_elimination, true, |
yangguo@chromium.org | efdb9d7 | 2012-04-26 08:21:05 +0000 | [diff] [blame] | 202 | "perform array bounds checks elimination") |
ulan@chromium.org | 0e3f88b | 2012-05-22 09:16:05 +0000 | [diff] [blame] | 203 | DEFINE_bool(array_index_dehoisting, false, |
| 204 | "perform array index dehoisting") |
vegorov@chromium.org | 5d6c1f5 | 2011-02-28 13:13:38 +0000 | [diff] [blame] | 205 | |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 206 | DEFINE_bool(trace_osr, false, "trace on-stack replacement") |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 207 | DEFINE_int(stress_runs, 0, "number of stress runs") |
sgjesse@chromium.org | c6c5718 | 2011-01-17 12:24:25 +0000 | [diff] [blame] | 208 | DEFINE_bool(optimize_closures, true, "optimize closures") |
yangguo@chromium.org | 5a11aaf | 2012-06-20 11:29:00 +0000 | [diff] [blame] | 209 | DEFINE_bool(lookup_sample_by_shared, true, |
| 210 | "when picking a function to optimize, watch for shared function " |
| 211 | "info, not JSFunction itself") |
ulan@chromium.org | d9e468a | 2012-06-25 09:47:40 +0000 | [diff] [blame] | 212 | DEFINE_bool(cache_optimized_code, true, |
yangguo@chromium.org | 5a11aaf | 2012-06-20 11:29:00 +0000 | [diff] [blame] | 213 | "cache optimized code for closures") |
rossberg@chromium.org | 2c067b1 | 2012-03-19 11:01:52 +0000 | [diff] [blame] | 214 | DEFINE_bool(inline_construct, true, "inline constructor calls") |
yangguo@chromium.org | 154ff99 | 2012-03-13 08:09:54 +0000 | [diff] [blame] | 215 | DEFINE_bool(inline_arguments, true, "inline functions with arguments object") |
danno@chromium.org | fa458e4 | 2012-02-01 10:48:36 +0000 | [diff] [blame] | 216 | DEFINE_int(loop_weight, 1, "loop weight for representation inference") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 217 | |
ulan@chromium.org | 967e270 | 2012-02-28 09:49:15 +0000 | [diff] [blame] | 218 | DEFINE_bool(optimize_for_in, true, |
yangguo@chromium.org | a7d3df9 | 2012-02-27 11:46:55 +0000 | [diff] [blame] | 219 | "optimize functions containing for-in loops") |
| 220 | |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 221 | // Experimental profiler changes. |
jkummerow@chromium.org | 531dfe8 | 2012-03-20 13:01:16 +0000 | [diff] [blame] | 222 | DEFINE_bool(experimental_profiler, true, "enable all profiler experiments") |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 223 | DEFINE_bool(watch_ic_patching, false, "profiler considers IC stability") |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 224 | DEFINE_int(frame_count, 1, "number of stack frames inspected by the profiler") |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 225 | DEFINE_bool(self_optimization, false, |
| 226 | "primitive functions trigger their own optimization") |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 227 | DEFINE_bool(direct_self_opt, false, |
| 228 | "call recompile stub directly when self-optimizing") |
| 229 | DEFINE_bool(retry_self_opt, false, "re-try self-optimization if it failed") |
yangguo@chromium.org | 5645471 | 2012-02-16 15:33:53 +0000 | [diff] [blame] | 230 | DEFINE_bool(count_based_interrupts, false, |
| 231 | "trigger profiler ticks based on counting instead of timing") |
kmillikin@chromium.org | be6bd10 | 2012-02-23 08:45:21 +0000 | [diff] [blame] | 232 | DEFINE_bool(interrupt_at_exit, false, |
| 233 | "insert an interrupt check at function exit") |
yangguo@chromium.org | 5645471 | 2012-02-16 15:33:53 +0000 | [diff] [blame] | 234 | DEFINE_bool(weighted_back_edges, false, |
| 235 | "weight back edges by jump distance for interrupt triggering") |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 236 | DEFINE_int(interrupt_budget, 5900, |
yangguo@chromium.org | 5645471 | 2012-02-16 15:33:53 +0000 | [diff] [blame] | 237 | "execution budget before interrupt is triggered") |
mstarzinger@chromium.org | 3233d2f | 2012-03-14 11:16:03 +0000 | [diff] [blame] | 238 | DEFINE_int(type_info_threshold, 15, |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 239 | "percentage of ICs that must have type info to allow optimization") |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 240 | DEFINE_int(self_opt_count, 130, "call count before self-optimization") |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 241 | |
| 242 | DEFINE_implication(experimental_profiler, watch_ic_patching) |
| 243 | DEFINE_implication(experimental_profiler, self_optimization) |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 244 | // Not implying direct_self_opt here because it seems to be a bad idea. |
| 245 | DEFINE_implication(experimental_profiler, retry_self_opt) |
yangguo@chromium.org | 5645471 | 2012-02-16 15:33:53 +0000 | [diff] [blame] | 246 | DEFINE_implication(experimental_profiler, count_based_interrupts) |
kmillikin@chromium.org | be6bd10 | 2012-02-23 08:45:21 +0000 | [diff] [blame] | 247 | DEFINE_implication(experimental_profiler, interrupt_at_exit) |
yangguo@chromium.org | 5645471 | 2012-02-16 15:33:53 +0000 | [diff] [blame] | 248 | DEFINE_implication(experimental_profiler, weighted_back_edges) |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 249 | |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 250 | DEFINE_bool(trace_opt_verbose, false, "extra verbose compilation tracing") |
| 251 | DEFINE_implication(trace_opt_verbose, trace_opt) |
| 252 | |
christian.plesner.hansen@gmail.com | 9d58c2b | 2009-10-16 11:48:38 +0000 | [diff] [blame] | 253 | // assembler-ia32.cc / assembler-arm.cc / assembler-x64.cc |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 254 | DEFINE_bool(debug_code, false, |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 255 | "generate extra code (assertions) for debugging") |
| 256 | DEFINE_bool(code_comments, false, "emit comments in code disassembly") |
christian.plesner.hansen@gmail.com | 9d58c2b | 2009-10-16 11:48:38 +0000 | [diff] [blame] | 257 | DEFINE_bool(enable_sse2, true, |
| 258 | "enable use of SSE2 instructions if available") |
| 259 | DEFINE_bool(enable_sse3, true, |
| 260 | "enable use of SSE3 instructions if available") |
kmillikin@chromium.org | f05f291 | 2010-09-30 10:07:24 +0000 | [diff] [blame] | 261 | DEFINE_bool(enable_sse4_1, true, |
| 262 | "enable use of SSE4.1 instructions if available") |
christian.plesner.hansen@gmail.com | 9d58c2b | 2009-10-16 11:48:38 +0000 | [diff] [blame] | 263 | DEFINE_bool(enable_cmov, true, |
| 264 | "enable use of CMOV instruction if available") |
| 265 | DEFINE_bool(enable_rdtsc, true, |
| 266 | "enable use of RDTSC instruction if available") |
| 267 | DEFINE_bool(enable_sahf, true, |
| 268 | "enable use of SAHF instruction if available (X64 only)") |
ager@chromium.org | c4c9272 | 2009-11-18 14:12:51 +0000 | [diff] [blame] | 269 | DEFINE_bool(enable_vfp3, true, |
ager@chromium.org | a9aa5fa | 2011-04-13 08:46:07 +0000 | [diff] [blame] | 270 | "enable use of VFP3 instructions if available - this implies " |
| 271 | "enabling ARMv7 instructions (ARM only)") |
ager@chromium.org | 5c83825 | 2010-02-19 08:53:10 +0000 | [diff] [blame] | 272 | DEFINE_bool(enable_armv7, true, |
| 273 | "enable use of ARMv7 instructions if available (ARM only)") |
lrn@chromium.org | 7516f05 | 2011-03-30 08:52:27 +0000 | [diff] [blame] | 274 | DEFINE_bool(enable_fpu, true, |
| 275 | "enable use of MIPS FPU instructions if available (MIPS only)") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 276 | |
| 277 | // bootstrapper.cc |
| 278 | DEFINE_string(expose_natives_as, NULL, "expose natives in global object") |
| 279 | DEFINE_string(expose_debug_as, NULL, "expose debug in global object") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 280 | DEFINE_bool(expose_gc, false, "expose gc extension") |
ricow@chromium.org | 5ad5ace | 2010-06-23 09:06:43 +0000 | [diff] [blame] | 281 | DEFINE_bool(expose_externalize_string, false, |
| 282 | "expose externalize string extension") |
kasperl@chromium.org | 86f77b7 | 2009-07-06 08:21:57 +0000 | [diff] [blame] | 283 | DEFINE_int(stack_trace_limit, 10, "number of stack frames to capture") |
erik.corry@gmail.com | 394dbcf | 2011-10-27 07:38:48 +0000 | [diff] [blame] | 284 | DEFINE_bool(builtins_in_stack_traces, false, |
| 285 | "show built-in functions in stack traces") |
kmillikin@chromium.org | 5d8f0e6 | 2010-03-24 08:21:20 +0000 | [diff] [blame] | 286 | DEFINE_bool(disable_native_files, false, "disable builtin natives files") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 287 | |
| 288 | // builtins-ia32.cc |
| 289 | DEFINE_bool(inline_new, true, "use fast inline allocation") |
| 290 | |
| 291 | // checks.cc |
| 292 | DEFINE_bool(stack_trace_on_abort, true, |
| 293 | "print a stack trace if an assertion failure occurs") |
| 294 | |
| 295 | // codegen-ia32.cc / codegen-arm.cc |
| 296 | DEFINE_bool(trace, false, "trace function calls") |
fschneider@chromium.org | e03fb64 | 2010-11-01 12:34:09 +0000 | [diff] [blame] | 297 | DEFINE_bool(mask_constants_with_cookie, |
| 298 | true, |
| 299 | "use random jit cookie to mask large constants") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 300 | |
| 301 | // codegen.cc |
| 302 | DEFINE_bool(lazy, true, "use lazy compilation") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 303 | DEFINE_bool(trace_opt, false, "trace lazy optimization") |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 304 | DEFINE_bool(trace_opt_stats, false, "trace lazy optimization statistics") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 305 | DEFINE_bool(opt, true, "use adaptive optimizations") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 306 | DEFINE_bool(always_opt, false, "always try to optimize functions") |
| 307 | DEFINE_bool(prepare_always_opt, false, "prepare for turning on always opt") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 308 | DEFINE_bool(trace_deopt, false, "trace deoptimization") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 309 | |
| 310 | // compiler.cc |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 311 | DEFINE_int(min_preparse_length, 1024, |
christian.plesner.hansen@gmail.com | 9d58c2b | 2009-10-16 11:48:38 +0000 | [diff] [blame] | 312 | "minimum length for automatic enable preparsing") |
sgjesse@chromium.org | b302e56 | 2010-02-03 11:26:59 +0000 | [diff] [blame] | 313 | DEFINE_bool(always_full_compiler, false, |
| 314 | "try to use the dedicated run-once backend for all code") |
sgjesse@chromium.org | b302e56 | 2010-02-03 11:26:59 +0000 | [diff] [blame] | 315 | DEFINE_bool(trace_bailout, false, |
| 316 | "print reasons for falling back to using the classic V8 backend") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 317 | |
kasperl@chromium.org | 71affb5 | 2009-05-26 05:44:31 +0000 | [diff] [blame] | 318 | // compilation-cache.cc |
| 319 | DEFINE_bool(compilation_cache, true, "enable compilation cache") |
| 320 | |
erik.corry@gmail.com | 3847bd5 | 2011-04-27 10:38:56 +0000 | [diff] [blame] | 321 | DEFINE_bool(cache_prototype_transitions, true, "cache prototype transitions") |
| 322 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 323 | // debug.cc |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 324 | DEFINE_bool(trace_debug_json, false, "trace debugging JSON request/response") |
sgjesse@chromium.org | ac6aa17 | 2009-12-04 12:29:05 +0000 | [diff] [blame] | 325 | DEFINE_bool(debugger_auto_break, true, |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 326 | "automatically set the debug break flag when debugger commands are " |
sgjesse@chromium.org | ac6aa17 | 2009-12-04 12:29:05 +0000 | [diff] [blame] | 327 | "in the queue") |
ager@chromium.org | ce5e87b | 2010-03-10 10:24:18 +0000 | [diff] [blame] | 328 | DEFINE_bool(enable_liveedit, true, "enable liveedit experimental feature") |
rossberg@chromium.org | 2c067b1 | 2012-03-19 11:01:52 +0000 | [diff] [blame] | 329 | DEFINE_bool(break_on_abort, true, "always cause a debug break before aborting") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 330 | |
sgjesse@chromium.org | 496c03a | 2011-02-14 12:05:43 +0000 | [diff] [blame] | 331 | // execution.cc |
fschneider@chromium.org | 7d10be5 | 2012-04-10 12:30:14 +0000 | [diff] [blame] | 332 | // Slightly less than 1MB on 64-bit, since Windows' default stack size for |
| 333 | // the main execution thread is 1MB for both 32 and 64-bit. |
| 334 | DEFINE_int(stack_size, kPointerSize * 123, |
danno@chromium.org | fa458e4 | 2012-02-01 10:48:36 +0000 | [diff] [blame] | 335 | "default size of stack region v8 is allowed to use (in kBytes)") |
sgjesse@chromium.org | 496c03a | 2011-02-14 12:05:43 +0000 | [diff] [blame] | 336 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 337 | // frames.cc |
| 338 | DEFINE_int(max_stack_trace_source_length, 300, |
| 339 | "maximum length of function source code printed in a stack trace.") |
| 340 | |
erik.corry@gmail.com | d88afa2 | 2010-09-15 12:33:05 +0000 | [diff] [blame] | 341 | // full-codegen.cc |
| 342 | DEFINE_bool(always_inline_smi_code, false, |
| 343 | "always inline smi code in non-opt code") |
| 344 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 345 | // heap.cc |
kmillikin@chromium.org | f05f291 | 2010-09-30 10:07:24 +0000 | [diff] [blame] | 346 | DEFINE_int(max_new_space_size, 0, "max size of the new generation (in kBytes)") |
| 347 | DEFINE_int(max_old_space_size, 0, "max size of the old generation (in Mbytes)") |
ager@chromium.org | 01fe7df | 2010-11-10 11:59:11 +0000 | [diff] [blame] | 348 | DEFINE_int(max_executable_size, 0, "max size of executable memory (in Mbytes)") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 349 | DEFINE_bool(gc_global, false, "always perform global GCs") |
| 350 | DEFINE_int(gc_interval, -1, "garbage collect after <n> allocations") |
| 351 | DEFINE_bool(trace_gc, false, |
| 352 | "print one trace line following each garbage collection") |
erik.corry@gmail.com | 9dfbea4 | 2010-05-21 12:58:28 +0000 | [diff] [blame] | 353 | DEFINE_bool(trace_gc_nvp, false, |
| 354 | "print one detailed trace line in name=value format " |
| 355 | "after each garbage collection") |
| 356 | DEFINE_bool(print_cumulative_gc_stat, false, |
| 357 | "print cumulative GC statistics in name=value format on exit") |
kasperl@chromium.org | e959c18 | 2009-07-27 08:59:04 +0000 | [diff] [blame] | 358 | DEFINE_bool(trace_gc_verbose, false, |
| 359 | "print more details following each garbage collection") |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 360 | DEFINE_bool(trace_fragmentation, false, |
| 361 | "report fragmentation for old pointer and data pages") |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 362 | DEFINE_bool(collect_maps, true, |
kasperl@chromium.org | 9bbf968 | 2008-10-30 11:53:07 +0000 | [diff] [blame] | 363 | "garbage collect maps from which no objects can be reached") |
ricow@chromium.org | 5ad5ace | 2010-06-23 09:06:43 +0000 | [diff] [blame] | 364 | DEFINE_bool(flush_code, true, |
ricow@chromium.org | 6125555 | 2010-06-11 07:46:10 +0000 | [diff] [blame] | 365 | "flush code that we expect not to use again before full gc") |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 366 | DEFINE_bool(incremental_marking, true, "use incremental marking") |
| 367 | DEFINE_bool(incremental_marking_steps, true, "do incremental marking steps") |
| 368 | DEFINE_bool(trace_incremental_marking, false, |
| 369 | "trace progress of the incremental marking") |
jkummerow@chromium.org | 28583c9 | 2012-07-16 11:31:55 +0000 | [diff] [blame] | 370 | DEFINE_bool(track_gc_object_stats, false, |
| 371 | "track object counts and memory usage") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 372 | |
ager@chromium.org | add848f | 2009-08-13 12:44:13 +0000 | [diff] [blame] | 373 | // v8.cc |
| 374 | DEFINE_bool(use_idle_notification, true, |
| 375 | "Use idle notification to reduce memory footprint.") |
danno@chromium.org | 88aa058 | 2012-03-23 15:11:57 +0000 | [diff] [blame] | 376 | |
| 377 | DEFINE_bool(send_idle_notification, false, |
| 378 | "Send idle notifcation between stress runs.") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 379 | // ic.cc |
| 380 | DEFINE_bool(use_ic, true, "use inline caching") |
| 381 | |
ager@chromium.org | 9ee27ae | 2011-03-02 13:43:26 +0000 | [diff] [blame] | 382 | #ifdef LIVE_OBJECT_LIST |
| 383 | // liveobjectlist.cc |
| 384 | DEFINE_string(lol_workdir, NULL, "path for lol temp files") |
| 385 | DEFINE_bool(verify_lol, false, "perform debugging verification for lol") |
| 386 | #endif |
| 387 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 388 | // macro-assembler-ia32.cc |
| 389 | DEFINE_bool(native_code_counters, false, |
| 390 | "generate extra code for manipulating stats counters") |
| 391 | |
| 392 | // mark-compact.cc |
| 393 | DEFINE_bool(always_compact, false, "Perform compaction on every full GC") |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 394 | DEFINE_bool(lazy_sweeping, true, |
| 395 | "Use lazy sweeping for old pointer and data spaces") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 396 | DEFINE_bool(never_compact, false, |
| 397 | "Never perform compaction on full GC - testing only") |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 398 | DEFINE_bool(compact_code_space, true, |
jkummerow@chromium.org | ab7dad4 | 2012-02-07 12:07:34 +0000 | [diff] [blame] | 399 | "Compact code space on full non-incremental collections") |
ager@chromium.org | ea91cc5 | 2011-05-23 06:06:11 +0000 | [diff] [blame] | 400 | DEFINE_bool(cleanup_code_caches_at_gc, true, |
| 401 | "Flush inline caches prior to mark compact collection and " |
| 402 | "flush code caches in maps during mark compact cycle.") |
sgjesse@chromium.org | df7a284 | 2010-03-25 14:34:15 +0000 | [diff] [blame] | 403 | DEFINE_int(random_seed, 0, |
| 404 | "Default seed for initializing random generator " |
| 405 | "(0, the default, means to use system random).") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 406 | |
whesse@chromium.org | 023421e | 2010-12-21 12:19:12 +0000 | [diff] [blame] | 407 | // objects.cc |
| 408 | DEFINE_bool(use_verbose_printer, true, "allows verbose printing") |
| 409 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 410 | // parser.cc |
| 411 | DEFINE_bool(allow_natives_syntax, false, "allow natives syntax") |
| 412 | |
ager@chromium.org | 5c83825 | 2010-02-19 08:53:10 +0000 | [diff] [blame] | 413 | // simulator-arm.cc and simulator-mips.cc |
ricow@chromium.org | c9c8082 | 2010-04-21 08:22:37 +0000 | [diff] [blame] | 414 | DEFINE_bool(trace_sim, false, "Trace simulator execution") |
jkummerow@chromium.org | c3b3712 | 2011-11-07 10:14:12 +0000 | [diff] [blame] | 415 | DEFINE_bool(check_icache, false, |
| 416 | "Check icache flushes in ARM and MIPS simulator") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 417 | DEFINE_int(stop_sim_at, 0, "Simulator stop after x number of instructions") |
ricow@chromium.org | c9c8082 | 2010-04-21 08:22:37 +0000 | [diff] [blame] | 418 | DEFINE_int(sim_stack_alignment, 8, |
| 419 | "Stack alingment in bytes in simulator (4 or 8, 8 is default)") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 420 | |
vegorov@chromium.org | 7304bca | 2011-05-16 12:14:13 +0000 | [diff] [blame] | 421 | // isolate.cc |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 422 | DEFINE_bool(trace_exception, false, |
| 423 | "print stack trace when throwing exceptions") |
| 424 | DEFINE_bool(preallocate_message_memory, false, |
| 425 | "preallocate some memory to build stack traces.") |
erik.corry@gmail.com | f2038fb | 2012-01-16 11:42:08 +0000 | [diff] [blame] | 426 | DEFINE_bool(randomize_hashes, |
rossberg@chromium.org | fab1498 | 2012-01-05 15:02:15 +0000 | [diff] [blame] | 427 | true, |
erik.corry@gmail.com | f2038fb | 2012-01-16 11:42:08 +0000 | [diff] [blame] | 428 | "randomize hashes to avoid predictable hash collisions " |
rossberg@chromium.org | fab1498 | 2012-01-05 15:02:15 +0000 | [diff] [blame] | 429 | "(with snapshots this option cannot override the baked-in seed)") |
erik.corry@gmail.com | f2038fb | 2012-01-16 11:42:08 +0000 | [diff] [blame] | 430 | DEFINE_int(hash_seed, |
rossberg@chromium.org | fab1498 | 2012-01-05 15:02:15 +0000 | [diff] [blame] | 431 | 0, |
erik.corry@gmail.com | f2038fb | 2012-01-16 11:42:08 +0000 | [diff] [blame] | 432 | "Fixed seed to use to hash property keys (0 means random)" |
rossberg@chromium.org | fab1498 | 2012-01-05 15:02:15 +0000 | [diff] [blame] | 433 | "(with snapshots this option cannot override the baked-in seed)") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 434 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 435 | // v8.cc |
| 436 | DEFINE_bool(preemption, false, |
| 437 | "activate a 100ms timer that switches between V8 threads") |
| 438 | |
ager@chromium.org | 381abbb | 2009-02-25 13:23:22 +0000 | [diff] [blame] | 439 | // Regexp |
ager@chromium.org | 381abbb | 2009-02-25 13:23:22 +0000 | [diff] [blame] | 440 | DEFINE_bool(regexp_optimization, true, "generate optimized regexp code") |
ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 441 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 442 | // Testing flags test/cctest/test-{flags,api,serialization}.cc |
| 443 | DEFINE_bool(testing_bool_flag, true, "testing_bool_flag") |
| 444 | DEFINE_int(testing_int_flag, 13, "testing_int_flag") |
| 445 | DEFINE_float(testing_float_flag, 2.5, "float-flag") |
| 446 | DEFINE_string(testing_string_flag, "Hello, world!", "string-flag") |
| 447 | DEFINE_int(testing_prng_seed, 42, "Seed used for threading test randomness") |
| 448 | #ifdef WIN32 |
| 449 | DEFINE_string(testing_serialization_file, "C:\\Windows\\Temp\\serdes", |
| 450 | "file in which to testing_serialize heap") |
| 451 | #else |
| 452 | DEFINE_string(testing_serialization_file, "/tmp/serdes", |
| 453 | "file in which to serialize heap") |
| 454 | #endif |
| 455 | |
yangguo@chromium.org | 5a11aaf | 2012-06-20 11:29:00 +0000 | [diff] [blame] | 456 | // mksnapshot.cc |
| 457 | DEFINE_string(extra_code, NULL, "A filename with extra code to be included in" |
| 458 | " the snapshot (mksnapshot only)") |
| 459 | |
kasperl@chromium.org | 5a8ca6c | 2008-10-23 13:57:19 +0000 | [diff] [blame] | 460 | // |
| 461 | // Dev shell flags |
| 462 | // |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 463 | |
ager@chromium.org | 3bf7b91 | 2008-11-17 09:09:45 +0000 | [diff] [blame] | 464 | DEFINE_bool(help, false, "Print usage message, including flags, on console") |
kasperl@chromium.org | 5a8ca6c | 2008-10-23 13:57:19 +0000 | [diff] [blame] | 465 | DEFINE_bool(dump_counters, false, "Dump counters on exit") |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 466 | |
| 467 | #ifdef ENABLE_DEBUGGER_SUPPORT |
vegorov@chromium.org | 2356e6f | 2010-06-09 09:38:56 +0000 | [diff] [blame] | 468 | DEFINE_bool(debugger, false, "Enable JavaScript debugger") |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 469 | DEFINE_bool(remote_debugger, false, "Connect JavaScript debugger to the " |
| 470 | "debugger agent in another process") |
| 471 | DEFINE_bool(debugger_agent, false, "Enable debugger agent") |
| 472 | DEFINE_int(debugger_port, 5858, "Port to use for remote debugging") |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 473 | #endif // ENABLE_DEBUGGER_SUPPORT |
| 474 | |
ager@chromium.org | 9ee27ae | 2011-03-02 13:43:26 +0000 | [diff] [blame] | 475 | DEFINE_string(map_counters, "", "Map counters to a file") |
jkummerow@chromium.org | 1456e70 | 2012-03-30 08:38:13 +0000 | [diff] [blame] | 476 | DEFINE_args(js_arguments, JSARGUMENTS_INIT, |
ager@chromium.org | 3bf7b91 | 2008-11-17 09:09:45 +0000 | [diff] [blame] | 477 | "Pass all remaining arguments to the script. Alias for \"--\".") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 478 | |
kmillikin@chromium.org | d2c22f0 | 2011-01-10 08:15:37 +0000 | [diff] [blame] | 479 | #if defined(WEBOS__) |
| 480 | DEFINE_bool(debug_compile_events, false, "Enable debugger compile events") |
| 481 | DEFINE_bool(debug_script_collected_events, false, |
| 482 | "Enable debugger script collected events") |
| 483 | #else |
| 484 | DEFINE_bool(debug_compile_events, true, "Enable debugger compile events") |
| 485 | DEFINE_bool(debug_script_collected_events, true, |
| 486 | "Enable debugger script collected events") |
| 487 | #endif |
| 488 | |
erik.corry@gmail.com | 0511e24 | 2011-01-19 11:11:08 +0000 | [diff] [blame] | 489 | |
| 490 | // |
| 491 | // GDB JIT integration flags. |
| 492 | // |
| 493 | |
| 494 | DEFINE_bool(gdbjit, false, "enable GDBJIT interface (disables compacting GC)") |
| 495 | DEFINE_bool(gdbjit_full, false, "enable GDBJIT interface for all code objects") |
kmillikin@chromium.org | 49edbdf | 2011-02-16 12:32:18 +0000 | [diff] [blame] | 496 | DEFINE_bool(gdbjit_dump, false, "dump elf objects with debug info to disk") |
ricow@chromium.org | 4f693d6 | 2011-07-04 14:01:31 +0000 | [diff] [blame] | 497 | DEFINE_string(gdbjit_dump_filter, "", |
| 498 | "dump only objects containing this substring") |
erik.corry@gmail.com | 0511e24 | 2011-01-19 11:11:08 +0000 | [diff] [blame] | 499 | |
rossberg@chromium.org | b4b2aa6 | 2011-10-13 09:49:59 +0000 | [diff] [blame] | 500 | // mark-compact.cc |
| 501 | DEFINE_bool(force_marking_deque_overflows, false, |
| 502 | "force overflows of marking deque by reducing it's size " |
| 503 | "to 64 words") |
| 504 | |
| 505 | DEFINE_bool(stress_compaction, false, |
| 506 | "stress the GC compactor to flush out bugs (implies " |
| 507 | "--force_marking_deque_overflows)") |
| 508 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 509 | // |
| 510 | // Debug only flags |
| 511 | // |
| 512 | #undef FLAG |
| 513 | #ifdef DEBUG |
| 514 | #define FLAG FLAG_FULL |
| 515 | #else |
| 516 | #define FLAG FLAG_READONLY |
| 517 | #endif |
| 518 | |
| 519 | // checks.cc |
| 520 | DEFINE_bool(enable_slow_asserts, false, |
| 521 | "enable asserts that are slow to execute") |
| 522 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 523 | // codegen-ia32.cc / codegen-arm.cc |
| 524 | DEFINE_bool(trace_codegen, false, |
| 525 | "print name of functions for which code is generated") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 526 | DEFINE_bool(print_source, false, "pretty print source code") |
| 527 | DEFINE_bool(print_builtin_source, false, |
| 528 | "pretty print source code for builtins") |
| 529 | DEFINE_bool(print_ast, false, "print source AST") |
| 530 | DEFINE_bool(print_builtin_ast, false, "print source AST for builtins") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 531 | DEFINE_string(stop_at, "", "function name where to insert a breakpoint") |
| 532 | |
| 533 | // compiler.cc |
| 534 | DEFINE_bool(print_builtin_scopes, false, "print scopes for builtins") |
| 535 | DEFINE_bool(print_scopes, false, "print scopes") |
| 536 | |
| 537 | // contexts.cc |
| 538 | DEFINE_bool(trace_contexts, false, "trace contexts operations") |
| 539 | |
| 540 | // heap.cc |
| 541 | DEFINE_bool(gc_greedy, false, "perform GC prior to some allocations") |
| 542 | DEFINE_bool(gc_verbose, false, "print stuff during garbage collection") |
| 543 | DEFINE_bool(heap_stats, false, "report heap statistics before and after GC") |
| 544 | DEFINE_bool(code_stats, false, "report code statistics after GC") |
| 545 | DEFINE_bool(verify_heap, false, "verify heap pointers before and after GC") |
| 546 | DEFINE_bool(print_handles, false, "report handles after GC") |
| 547 | DEFINE_bool(print_global_handles, false, "report global handles after GC") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 548 | |
| 549 | // ic.cc |
| 550 | DEFINE_bool(trace_ic, false, "trace inline cache state transitions") |
| 551 | |
erik.corry@gmail.com | bbceb57 | 2012-03-09 10:52:05 +0000 | [diff] [blame] | 552 | // interface.cc |
| 553 | DEFINE_bool(print_interfaces, false, "print interfaces") |
| 554 | DEFINE_bool(print_interface_details, false, "print interface inference details") |
| 555 | DEFINE_int(print_interface_depth, 5, "depth for printing interfaces") |
| 556 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 557 | // objects.cc |
| 558 | DEFINE_bool(trace_normalization, |
| 559 | false, |
| 560 | "prints when objects are turned into dictionaries.") |
| 561 | |
| 562 | // runtime.cc |
| 563 | DEFINE_bool(trace_lazy, false, "trace lazy compilation") |
| 564 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 565 | // spaces.cc |
| 566 | DEFINE_bool(collect_heap_spill_statistics, false, |
| 567 | "report heap spill statistics along with heap_stats " |
| 568 | "(requires heap_stats)") |
| 569 | |
sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 570 | DEFINE_bool(trace_isolates, false, "trace isolate state changes") |
| 571 | |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 572 | // VM state |
| 573 | DEFINE_bool(log_state_changes, false, "Log state changes.") |
| 574 | |
ager@chromium.org | 381abbb | 2009-02-25 13:23:22 +0000 | [diff] [blame] | 575 | // Regexp |
fschneider@chromium.org | 0c20e67 | 2010-01-14 15:28:53 +0000 | [diff] [blame] | 576 | DEFINE_bool(regexp_possessive_quantifier, |
| 577 | false, |
| 578 | "enable possessive quantifier syntax for testing") |
ager@chromium.org | 381abbb | 2009-02-25 13:23:22 +0000 | [diff] [blame] | 579 | DEFINE_bool(trace_regexp_bytecodes, false, "trace regexp bytecode execution") |
| 580 | DEFINE_bool(trace_regexp_assembler, |
| 581 | false, |
| 582 | "trace regexp macro assembler calls.") |
ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 583 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 584 | // |
whesse@chromium.org | 030d38e | 2011-07-13 13:23:34 +0000 | [diff] [blame] | 585 | // Logging and profiling flags |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 586 | // |
| 587 | #undef FLAG |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 588 | #define FLAG FLAG_FULL |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 589 | |
| 590 | // log.cc |
| 591 | DEFINE_bool(log, false, |
| 592 | "Minimal logging (no API, code, GC, suspect, or handles samples).") |
| 593 | DEFINE_bool(log_all, false, "Log all events to the log file.") |
ager@chromium.org | 381abbb | 2009-02-25 13:23:22 +0000 | [diff] [blame] | 594 | DEFINE_bool(log_runtime, false, "Activate runtime system %Log call.") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 595 | DEFINE_bool(log_api, false, "Log API events to the log file.") |
| 596 | DEFINE_bool(log_code, false, |
| 597 | "Log code events to the log file without profiling.") |
| 598 | DEFINE_bool(log_gc, false, |
| 599 | "Log heap samples on garbage collection for the hp2ps tool.") |
| 600 | DEFINE_bool(log_handles, false, "Log global handle events.") |
sgjesse@chromium.org | b302e56 | 2010-02-03 11:26:59 +0000 | [diff] [blame] | 601 | DEFINE_bool(log_snapshot_positions, false, |
| 602 | "log positions of (de)serialized objects in the snapshot.") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 603 | DEFINE_bool(log_suspect, false, "Log suspect operations.") |
| 604 | DEFINE_bool(prof, false, |
| 605 | "Log statistical profiling information (implies --log-code).") |
iposva@chromium.org | 245aa85 | 2009-02-10 00:49:54 +0000 | [diff] [blame] | 606 | DEFINE_bool(prof_auto, true, |
| 607 | "Used with --prof, starts profiling automatically") |
kasperl@chromium.org | 71affb5 | 2009-05-26 05:44:31 +0000 | [diff] [blame] | 608 | DEFINE_bool(prof_lazy, false, |
| 609 | "Used with --prof, only does sampling and logging" |
| 610 | " when profiler is active (implies --noprof_auto).") |
ager@chromium.org | 357bf65 | 2010-04-12 11:30:10 +0000 | [diff] [blame] | 611 | DEFINE_bool(prof_browser_mode, true, |
| 612 | "Used with --prof, turns on browser-compatible mode for profiling.") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 613 | DEFINE_bool(log_regexp, false, "Log regular expression execution.") |
| 614 | DEFINE_bool(sliding_state_window, false, |
| 615 | "Update sliding state window counters.") |
| 616 | DEFINE_string(logfile, "v8.log", "Specify the name of the log file.") |
whesse@chromium.org | 4a5224e | 2010-10-20 12:37:07 +0000 | [diff] [blame] | 617 | DEFINE_bool(ll_prof, false, "Enable low-level linux profiler.") |
kasperl@chromium.org | f5aa837 | 2009-03-24 14:47:14 +0000 | [diff] [blame] | 618 | |
yangguo@chromium.org | 5a11aaf | 2012-06-20 11:29:00 +0000 | [diff] [blame] | 619 | |
kasperl@chromium.org | f5aa837 | 2009-03-24 14:47:14 +0000 | [diff] [blame] | 620 | // |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 621 | // Disassembler only flags |
| 622 | // |
| 623 | #undef FLAG |
| 624 | #ifdef ENABLE_DISASSEMBLER |
| 625 | #define FLAG FLAG_FULL |
| 626 | #else |
| 627 | #define FLAG FLAG_READONLY |
| 628 | #endif |
| 629 | |
erik.corry@gmail.com | 394dbcf | 2011-10-27 07:38:48 +0000 | [diff] [blame] | 630 | // elements.cc |
| 631 | DEFINE_bool(trace_elements_transitions, false, "trace elements transitions") |
| 632 | |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 633 | // code-stubs.cc |
| 634 | DEFINE_bool(print_code_stubs, false, "print code stubs") |
ulan@chromium.org | 812308e | 2012-02-29 15:58:45 +0000 | [diff] [blame] | 635 | DEFINE_bool(test_secondary_stub_cache, |
| 636 | false, |
| 637 | "test secondary stub cache by disabling the primary one") |
| 638 | |
| 639 | DEFINE_bool(test_primary_stub_cache, |
| 640 | false, |
| 641 | "test primary stub cache by disabling the secondary one") |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 642 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 643 | // codegen-ia32.cc / codegen-arm.cc |
| 644 | DEFINE_bool(print_code, false, "print generated code") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 645 | DEFINE_bool(print_opt_code, false, "print optimized code") |
whesse@chromium.org | 023421e | 2010-12-21 12:19:12 +0000 | [diff] [blame] | 646 | DEFINE_bool(print_unopt_code, false, "print unoptimized code before " |
| 647 | "printing optimized code based on it") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 648 | DEFINE_bool(print_code_verbose, false, "print more information for code") |
ager@chromium.org | 8bb6058 | 2008-12-11 12:02:20 +0000 | [diff] [blame] | 649 | DEFINE_bool(print_builtin_code, false, "print generated code for builtins") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 650 | |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 651 | #ifdef ENABLE_DISASSEMBLER |
| 652 | DEFINE_bool(print_all_code, false, "enable all flags related to printing code") |
| 653 | DEFINE_implication(print_all_code, print_code) |
| 654 | DEFINE_implication(print_all_code, print_opt_code) |
| 655 | DEFINE_implication(print_all_code, print_unopt_code) |
| 656 | DEFINE_implication(print_all_code, print_code_verbose) |
| 657 | DEFINE_implication(print_all_code, print_builtin_code) |
| 658 | DEFINE_implication(print_all_code, print_code_stubs) |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 659 | DEFINE_implication(print_all_code, code_comments) |
danno@chromium.org | bf0c820 | 2011-12-27 10:09:42 +0000 | [diff] [blame] | 660 | #ifdef DEBUG |
| 661 | DEFINE_implication(print_all_code, trace_codegen) |
| 662 | #endif |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 663 | #endif |
| 664 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 665 | // Cleanup... |
| 666 | #undef FLAG_FULL |
| 667 | #undef FLAG_READONLY |
| 668 | #undef FLAG |
| 669 | |
| 670 | #undef DEFINE_bool |
| 671 | #undef DEFINE_int |
| 672 | #undef DEFINE_string |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 673 | #undef DEFINE_implication |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 674 | |
| 675 | #undef FLAG_MODE_DECLARE |
| 676 | #undef FLAG_MODE_DEFINE |
| 677 | #undef FLAG_MODE_DEFINE_DEFAULTS |
| 678 | #undef FLAG_MODE_META |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 679 | #undef FLAG_MODE_DEFINE_IMPLICATIONS |