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") |
jkummerow@chromium.org | 78502a9 | 2012-09-06 13:50:42 +0000 | [diff] [blame] | 135 | DEFINE_bool(es5_readonly, true, |
mmassi@chromium.org | 7028c05 | 2012-06-13 11:51:58 +0000 | [diff] [blame] | 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)") |
mvstanton@chromium.org | e4ac3ef | 2012-11-12 14:53:34 +0000 | [diff] [blame] | 147 | DEFINE_bool(harmony_observation, false, |
danno@chromium.org | 72204d5 | 2012-10-31 10:02:10 +0000 | [diff] [blame] | 148 | "enable harmony object observation (implies harmony collections") |
danno@chromium.org | fa458e4 | 2012-02-01 10:48:36 +0000 | [diff] [blame] | 149 | DEFINE_bool(harmony, false, "enable all harmony features (except typeof)") |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 150 | DEFINE_implication(harmony, harmony_scoping) |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 151 | DEFINE_implication(harmony, harmony_modules) |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 152 | DEFINE_implication(harmony, harmony_proxies) |
| 153 | DEFINE_implication(harmony, harmony_collections) |
mvstanton@chromium.org | e4ac3ef | 2012-11-12 14:53:34 +0000 | [diff] [blame] | 154 | DEFINE_implication(harmony, harmony_observation) |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 155 | DEFINE_implication(harmony_modules, harmony_scoping) |
mvstanton@chromium.org | e4ac3ef | 2012-11-12 14:53:34 +0000 | [diff] [blame] | 156 | DEFINE_implication(harmony_observation, harmony_collections) |
danno@chromium.org | 160a7b0 | 2011-04-18 15:51:38 +0000 | [diff] [blame] | 157 | |
svenpanne@chromium.org | 6d786c9 | 2011-06-15 10:58:27 +0000 | [diff] [blame] | 158 | // Flags for experimental implementation features. |
yangguo@chromium.org | 304cc33 | 2012-07-24 07:59:48 +0000 | [diff] [blame] | 159 | DEFINE_bool(packed_arrays, true, "optimizes arrays that have no holes") |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 160 | DEFINE_bool(smi_only_arrays, true, "tracks arrays with only smi values") |
danno@chromium.org | 94b0d6f | 2013-02-04 13:33:20 +0000 | [diff] [blame] | 161 | DEFINE_bool(compiled_transitions, false, "use optimizing compiler to " |
| 162 | "generate array elements transition stubs") |
rossberg@chromium.org | b4b2aa6 | 2011-10-13 09:49:59 +0000 | [diff] [blame] | 163 | DEFINE_bool(clever_optimizations, |
| 164 | true, |
| 165 | "Optimize object size, Array shift, DOM strings and string +") |
svenpanne@chromium.org | 6d786c9 | 2011-06-15 10:58:27 +0000 | [diff] [blame] | 166 | |
danno@chromium.org | fa458e4 | 2012-02-01 10:48:36 +0000 | [diff] [blame] | 167 | // Flags for data representation optimizations |
| 168 | DEFINE_bool(unbox_double_arrays, true, "automatically unbox arrays of doubles") |
| 169 | DEFINE_bool(string_slices, true, "use string slices") |
| 170 | |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 171 | // Flags for Crankshaft. |
jkummerow@chromium.org | c3b3712 | 2011-11-07 10:14:12 +0000 | [diff] [blame] | 172 | DEFINE_bool(crankshaft, true, "use crankshaft") |
mstarzinger@chromium.org | 3233d2f | 2012-03-14 11:16:03 +0000 | [diff] [blame] | 173 | DEFINE_string(hydrogen_filter, "", "optimization filter") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 174 | DEFINE_bool(use_range, true, "use hydrogen range analysis") |
| 175 | DEFINE_bool(eliminate_dead_phis, true, "eliminate dead phis") |
| 176 | DEFINE_bool(use_gvn, true, "use hydrogen global value numbering") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 177 | DEFINE_bool(use_canonicalizing, true, "use hydrogen instruction canonicalizing") |
| 178 | DEFINE_bool(use_inlining, true, "use function inlining") |
mstarzinger@chromium.org | 88d326b | 2012-04-23 12:57:22 +0000 | [diff] [blame] | 179 | DEFINE_int(max_inlined_source_size, 600, |
| 180 | "maximum source size in bytes considered for a single inlining") |
| 181 | DEFINE_int(max_inlined_nodes, 196, |
| 182 | "maximum number of AST nodes considered for a single inlining") |
| 183 | DEFINE_int(max_inlined_nodes_cumulative, 196, |
| 184 | "maximum cumulative number of AST nodes considered for inlining") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 185 | DEFINE_bool(loop_invariant_code_motion, true, "loop invariant code motion") |
danno@chromium.org | 1f34ad3 | 2012-11-26 14:53:56 +0000 | [diff] [blame] | 186 | DEFINE_bool(fast_math, true, "faster (but maybe less accurate) math functions") |
erikcorry | 0ad885c | 2011-11-21 13:51:57 +0000 | [diff] [blame] | 187 | DEFINE_bool(collect_megamorphic_maps_from_stub_cache, |
| 188 | true, |
| 189 | "crankshaft harvests type feedback from stub cache") |
whesse@chromium.org | b08986c | 2011-03-14 16:13:42 +0000 | [diff] [blame] | 190 | DEFINE_bool(hydrogen_stats, false, "print statistics for hydrogen") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 191 | DEFINE_bool(trace_hydrogen, false, "trace generated hydrogen to file") |
fschneider@chromium.org | 35814e5 | 2012-03-01 15:43:35 +0000 | [diff] [blame] | 192 | DEFINE_string(trace_phase, "Z", "trace generated IR for specified phases") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 193 | DEFINE_bool(trace_inlining, false, "trace inlining decisions") |
| 194 | DEFINE_bool(trace_alloc, false, "trace register allocator") |
fschneider@chromium.org | 3a5fd78 | 2011-02-24 10:10:44 +0000 | [diff] [blame] | 195 | DEFINE_bool(trace_all_uses, false, "trace all use positions") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 196 | DEFINE_bool(trace_range, false, "trace range analysis") |
| 197 | DEFINE_bool(trace_gvn, false, "trace global value numbering") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 198 | DEFINE_bool(trace_representation, false, "trace representation types") |
yangguo@chromium.org | 46a2a51 | 2013-01-18 16:29:40 +0000 | [diff] [blame] | 199 | DEFINE_bool(trace_track_allocation_sites, false, |
| 200 | "trace the tracking of allocation sites") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 201 | DEFINE_bool(stress_pointer_maps, false, "pointer map for every instruction") |
| 202 | DEFINE_bool(stress_environments, false, "environment for every instruction") |
| 203 | DEFINE_int(deopt_every_n_times, |
| 204 | 0, |
| 205 | "deoptimize every n times a deopt point is passed") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 206 | DEFINE_bool(trap_on_deopt, false, "put a break point before deoptimizing") |
| 207 | DEFINE_bool(deoptimize_uncommon_cases, true, "deoptimize uncommon cases") |
| 208 | DEFINE_bool(polymorphic_inlining, true, "polymorphic inlining") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 209 | DEFINE_bool(use_osr, true, "use on-stack replacement") |
danno@chromium.org | 94b0d6f | 2013-02-04 13:33:20 +0000 | [diff] [blame] | 210 | DEFINE_bool(idefs, false, "use informative definitions") |
ulan@chromium.org | 56c14af | 2012-09-20 12:51:09 +0000 | [diff] [blame] | 211 | DEFINE_bool(array_bounds_checks_elimination, true, |
yangguo@chromium.org | efdb9d7 | 2012-04-26 08:21:05 +0000 | [diff] [blame] | 212 | "perform array bounds checks elimination") |
ulan@chromium.org | 56c14af | 2012-09-20 12:51:09 +0000 | [diff] [blame] | 213 | DEFINE_bool(array_index_dehoisting, true, |
ulan@chromium.org | 0e3f88b | 2012-05-22 09:16:05 +0000 | [diff] [blame] | 214 | "perform array index dehoisting") |
jkummerow@chromium.org | c195667 | 2012-10-11 15:57:38 +0000 | [diff] [blame] | 215 | DEFINE_bool(dead_code_elimination, true, "use dead code elimination") |
| 216 | DEFINE_bool(trace_dead_code_elimination, false, "trace dead code elimination") |
yangguo@chromium.org | 28381b4 | 2013-01-21 14:39:38 +0000 | [diff] [blame] | 217 | DEFINE_bool(unreachable_code_elimination, false, |
| 218 | "eliminate unreachable code (hidden behind soft deopts)") |
jkummerow@chromium.org | 59297c7 | 2013-01-09 16:32:23 +0000 | [diff] [blame] | 219 | DEFINE_bool(track_allocation_sites, true, |
| 220 | "Use allocation site info to reduce transitions") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 221 | DEFINE_bool(trace_osr, false, "trace on-stack replacement") |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 222 | DEFINE_int(stress_runs, 0, "number of stress runs") |
sgjesse@chromium.org | c6c5718 | 2011-01-17 12:24:25 +0000 | [diff] [blame] | 223 | DEFINE_bool(optimize_closures, true, "optimize closures") |
yangguo@chromium.org | 5a11aaf | 2012-06-20 11:29:00 +0000 | [diff] [blame] | 224 | DEFINE_bool(lookup_sample_by_shared, true, |
| 225 | "when picking a function to optimize, watch for shared function " |
| 226 | "info, not JSFunction itself") |
ulan@chromium.org | d9e468a | 2012-06-25 09:47:40 +0000 | [diff] [blame] | 227 | DEFINE_bool(cache_optimized_code, true, |
yangguo@chromium.org | 5a11aaf | 2012-06-20 11:29:00 +0000 | [diff] [blame] | 228 | "cache optimized code for closures") |
rossberg@chromium.org | 2c067b1 | 2012-03-19 11:01:52 +0000 | [diff] [blame] | 229 | DEFINE_bool(inline_construct, true, "inline constructor calls") |
yangguo@chromium.org | 154ff99 | 2012-03-13 08:09:54 +0000 | [diff] [blame] | 230 | DEFINE_bool(inline_arguments, true, "inline functions with arguments object") |
mstarzinger@chromium.org | de88679 | 2012-09-11 13:22:37 +0000 | [diff] [blame] | 231 | DEFINE_bool(inline_accessors, true, "inline JavaScript accessors") |
danno@chromium.org | fa458e4 | 2012-02-01 10:48:36 +0000 | [diff] [blame] | 232 | DEFINE_int(loop_weight, 1, "loop weight for representation inference") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 233 | |
ulan@chromium.org | 967e270 | 2012-02-28 09:49:15 +0000 | [diff] [blame] | 234 | DEFINE_bool(optimize_for_in, true, |
yangguo@chromium.org | a7d3df9 | 2012-02-27 11:46:55 +0000 | [diff] [blame] | 235 | "optimize functions containing for-in loops") |
yangguo@chromium.org | 46839fb | 2012-08-28 09:06:19 +0000 | [diff] [blame] | 236 | DEFINE_bool(opt_safe_uint32_operations, true, |
yangguo@chromium.org | fb37721 | 2012-11-16 14:43:43 +0000 | [diff] [blame] | 237 | "allow uint32 values on optimize frames if they are used only in " |
yangguo@chromium.org | 46839fb | 2012-08-28 09:06:19 +0000 | [diff] [blame] | 238 | "safe operations") |
yangguo@chromium.org | a7d3df9 | 2012-02-27 11:46:55 +0000 | [diff] [blame] | 239 | |
yangguo@chromium.org | 304cc33 | 2012-07-24 07:59:48 +0000 | [diff] [blame] | 240 | DEFINE_bool(parallel_recompilation, false, |
| 241 | "optimizing hot functions asynchronously on a separate thread") |
| 242 | DEFINE_bool(trace_parallel_recompilation, false, "track parallel recompilation") |
| 243 | DEFINE_int(parallel_recompilation_queue_length, 2, |
| 244 | "the length of the parallel compilation queue") |
yangguo@chromium.org | fb37721 | 2012-11-16 14:43:43 +0000 | [diff] [blame] | 245 | DEFINE_bool(manual_parallel_recompilation, false, |
| 246 | "disable automatic optimization") |
| 247 | DEFINE_implication(manual_parallel_recompilation, parallel_recompilation) |
yangguo@chromium.org | 304cc33 | 2012-07-24 07:59:48 +0000 | [diff] [blame] | 248 | |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 249 | // Experimental profiler changes. |
jkummerow@chromium.org | 531dfe8 | 2012-03-20 13:01:16 +0000 | [diff] [blame] | 250 | DEFINE_bool(experimental_profiler, true, "enable all profiler experiments") |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 251 | DEFINE_bool(watch_ic_patching, false, "profiler considers IC stability") |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 252 | 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] | 253 | DEFINE_bool(self_optimization, false, |
| 254 | "primitive functions trigger their own optimization") |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 255 | DEFINE_bool(direct_self_opt, false, |
| 256 | "call recompile stub directly when self-optimizing") |
| 257 | DEFINE_bool(retry_self_opt, false, "re-try self-optimization if it failed") |
kmillikin@chromium.org | be6bd10 | 2012-02-23 08:45:21 +0000 | [diff] [blame] | 258 | DEFINE_bool(interrupt_at_exit, false, |
| 259 | "insert an interrupt check at function exit") |
yangguo@chromium.org | 5645471 | 2012-02-16 15:33:53 +0000 | [diff] [blame] | 260 | DEFINE_bool(weighted_back_edges, false, |
| 261 | "weight back edges by jump distance for interrupt triggering") |
mstarzinger@chromium.org | 471f2f1 | 2012-08-10 14:46:33 +0000 | [diff] [blame] | 262 | // 0x1700 fits in the immediate field of an ARM instruction. |
| 263 | DEFINE_int(interrupt_budget, 0x1700, |
yangguo@chromium.org | 5645471 | 2012-02-16 15:33:53 +0000 | [diff] [blame] | 264 | "execution budget before interrupt is triggered") |
mstarzinger@chromium.org | 3233d2f | 2012-03-14 11:16:03 +0000 | [diff] [blame] | 265 | DEFINE_int(type_info_threshold, 15, |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 266 | "percentage of ICs that must have type info to allow optimization") |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 267 | DEFINE_int(self_opt_count, 130, "call count before self-optimization") |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 268 | |
| 269 | DEFINE_implication(experimental_profiler, watch_ic_patching) |
| 270 | DEFINE_implication(experimental_profiler, self_optimization) |
svenpanne@chromium.org | 4efbdb1 | 2012-03-12 08:18:42 +0000 | [diff] [blame] | 271 | // Not implying direct_self_opt here because it seems to be a bad idea. |
| 272 | DEFINE_implication(experimental_profiler, retry_self_opt) |
kmillikin@chromium.org | be6bd10 | 2012-02-23 08:45:21 +0000 | [diff] [blame] | 273 | DEFINE_implication(experimental_profiler, interrupt_at_exit) |
yangguo@chromium.org | 5645471 | 2012-02-16 15:33:53 +0000 | [diff] [blame] | 274 | DEFINE_implication(experimental_profiler, weighted_back_edges) |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 275 | |
jkummerow@chromium.org | f7a5884 | 2012-02-21 10:08:21 +0000 | [diff] [blame] | 276 | DEFINE_bool(trace_opt_verbose, false, "extra verbose compilation tracing") |
| 277 | DEFINE_implication(trace_opt_verbose, trace_opt) |
| 278 | |
christian.plesner.hansen@gmail.com | 9d58c2b | 2009-10-16 11:48:38 +0000 | [diff] [blame] | 279 | // assembler-ia32.cc / assembler-arm.cc / assembler-x64.cc |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 280 | DEFINE_bool(debug_code, false, |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 281 | "generate extra code (assertions) for debugging") |
| 282 | 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] | 283 | DEFINE_bool(enable_sse2, true, |
| 284 | "enable use of SSE2 instructions if available") |
| 285 | DEFINE_bool(enable_sse3, true, |
| 286 | "enable use of SSE3 instructions if available") |
kmillikin@chromium.org | f05f291 | 2010-09-30 10:07:24 +0000 | [diff] [blame] | 287 | DEFINE_bool(enable_sse4_1, true, |
| 288 | "enable use of SSE4.1 instructions if available") |
christian.plesner.hansen@gmail.com | 9d58c2b | 2009-10-16 11:48:38 +0000 | [diff] [blame] | 289 | DEFINE_bool(enable_cmov, true, |
| 290 | "enable use of CMOV instruction if available") |
| 291 | DEFINE_bool(enable_rdtsc, true, |
| 292 | "enable use of RDTSC instruction if available") |
| 293 | DEFINE_bool(enable_sahf, true, |
| 294 | "enable use of SAHF instruction if available (X64 only)") |
ager@chromium.org | c4c9272 | 2009-11-18 14:12:51 +0000 | [diff] [blame] | 295 | DEFINE_bool(enable_vfp3, true, |
ager@chromium.org | a9aa5fa | 2011-04-13 08:46:07 +0000 | [diff] [blame] | 296 | "enable use of VFP3 instructions if available - this implies " |
verwaest@chromium.org | b6d052d | 2012-07-27 08:03:27 +0000 | [diff] [blame] | 297 | "enabling ARMv7 and VFP2 instructions (ARM only)") |
| 298 | DEFINE_bool(enable_vfp2, true, |
| 299 | "enable use of VFP2 instructions if available") |
ager@chromium.org | 5c83825 | 2010-02-19 08:53:10 +0000 | [diff] [blame] | 300 | DEFINE_bool(enable_armv7, true, |
| 301 | "enable use of ARMv7 instructions if available (ARM only)") |
verwaest@chromium.org | 33e09c8 | 2012-10-10 17:07:22 +0000 | [diff] [blame] | 302 | DEFINE_bool(enable_sudiv, true, |
| 303 | "enable use of SDIV and UDIV instructions if available (ARM only)") |
rossberg@chromium.org | 89e18f5 | 2012-10-22 13:09:53 +0000 | [diff] [blame] | 304 | DEFINE_bool(enable_movw_movt, false, |
| 305 | "enable loading 32-bit constant by means of movw/movt " |
| 306 | "instruction pairs (ARM only)") |
| 307 | DEFINE_bool(enable_unaligned_accesses, true, |
| 308 | "enable unaligned accesses for ARMv7 (ARM only)") |
yangguo@chromium.org | 003650e | 2013-01-24 16:31:08 +0000 | [diff] [blame] | 309 | DEFINE_bool(enable_32dregs, true, |
| 310 | "enable use of d16-d31 registers on ARM - this requires VFP3") |
lrn@chromium.org | 7516f05 | 2011-03-30 08:52:27 +0000 | [diff] [blame] | 311 | DEFINE_bool(enable_fpu, true, |
| 312 | "enable use of MIPS FPU instructions if available (MIPS only)") |
yangguo@chromium.org | 4cd70b4 | 2013-01-04 08:57:54 +0000 | [diff] [blame] | 313 | DEFINE_bool(enable_vldr_imm, false, |
| 314 | "enable use of constant pools for double immediate (ARM only)") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 315 | |
| 316 | // bootstrapper.cc |
| 317 | DEFINE_string(expose_natives_as, NULL, "expose natives in global object") |
| 318 | DEFINE_string(expose_debug_as, NULL, "expose debug in global object") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 319 | DEFINE_bool(expose_gc, false, "expose gc extension") |
ricow@chromium.org | 5ad5ace | 2010-06-23 09:06:43 +0000 | [diff] [blame] | 320 | DEFINE_bool(expose_externalize_string, false, |
| 321 | "expose externalize string extension") |
kasperl@chromium.org | 86f77b7 | 2009-07-06 08:21:57 +0000 | [diff] [blame] | 322 | 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] | 323 | DEFINE_bool(builtins_in_stack_traces, false, |
| 324 | "show built-in functions in stack traces") |
kmillikin@chromium.org | 5d8f0e6 | 2010-03-24 08:21:20 +0000 | [diff] [blame] | 325 | DEFINE_bool(disable_native_files, false, "disable builtin natives files") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 326 | |
| 327 | // builtins-ia32.cc |
| 328 | DEFINE_bool(inline_new, true, "use fast inline allocation") |
| 329 | |
| 330 | // checks.cc |
| 331 | DEFINE_bool(stack_trace_on_abort, true, |
| 332 | "print a stack trace if an assertion failure occurs") |
| 333 | |
| 334 | // codegen-ia32.cc / codegen-arm.cc |
| 335 | DEFINE_bool(trace, false, "trace function calls") |
fschneider@chromium.org | e03fb64 | 2010-11-01 12:34:09 +0000 | [diff] [blame] | 336 | DEFINE_bool(mask_constants_with_cookie, |
| 337 | true, |
| 338 | "use random jit cookie to mask large constants") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 339 | |
| 340 | // codegen.cc |
| 341 | DEFINE_bool(lazy, true, "use lazy compilation") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 342 | DEFINE_bool(trace_opt, false, "trace lazy optimization") |
ager@chromium.org | 5f0c45f | 2010-12-17 08:51:21 +0000 | [diff] [blame] | 343 | DEFINE_bool(trace_opt_stats, false, "trace lazy optimization statistics") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 344 | DEFINE_bool(opt, true, "use adaptive optimizations") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 345 | DEFINE_bool(always_opt, false, "always try to optimize functions") |
| 346 | DEFINE_bool(prepare_always_opt, false, "prepare for turning on always opt") |
mmassi@chromium.org | 2f0efde | 2013-02-06 14:12:58 +0000 | [diff] [blame] | 347 | DEFINE_bool(trace_deopt, false, "trace optimize function deoptimization") |
| 348 | DEFINE_bool(trace_stub_failures, false, |
| 349 | "trace deoptimization of generated code stubs") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 350 | |
| 351 | // compiler.cc |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 352 | DEFINE_int(min_preparse_length, 1024, |
christian.plesner.hansen@gmail.com | 9d58c2b | 2009-10-16 11:48:38 +0000 | [diff] [blame] | 353 | "minimum length for automatic enable preparsing") |
sgjesse@chromium.org | b302e56 | 2010-02-03 11:26:59 +0000 | [diff] [blame] | 354 | DEFINE_bool(always_full_compiler, false, |
| 355 | "try to use the dedicated run-once backend for all code") |
verwaest@chromium.org | de64f72 | 2012-08-16 15:44:54 +0000 | [diff] [blame] | 356 | DEFINE_int(max_opt_count, 10, |
| 357 | "maximum number of optimization attempts before giving up.") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 358 | |
kasperl@chromium.org | 71affb5 | 2009-05-26 05:44:31 +0000 | [diff] [blame] | 359 | // compilation-cache.cc |
| 360 | DEFINE_bool(compilation_cache, true, "enable compilation cache") |
| 361 | |
erik.corry@gmail.com | 3847bd5 | 2011-04-27 10:38:56 +0000 | [diff] [blame] | 362 | DEFINE_bool(cache_prototype_transitions, true, "cache prototype transitions") |
| 363 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 364 | // debug.cc |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 365 | DEFINE_bool(trace_debug_json, false, "trace debugging JSON request/response") |
hpayer@chromium.org | 7c3372b | 2013-02-13 17:26:04 +0000 | [diff] [blame] | 366 | DEFINE_bool(trace_js_array_abuse, false, |
| 367 | "trace out-of-bounds accesses to JS arrays") |
| 368 | DEFINE_bool(trace_external_array_abuse, false, |
| 369 | "trace out-of-bounds-accesses to external arrays") |
| 370 | DEFINE_bool(trace_array_abuse, false, |
| 371 | "trace out-of-bounds accesses to all arrays") |
| 372 | DEFINE_implication(trace_array_abuse, trace_js_array_abuse) |
| 373 | DEFINE_implication(trace_array_abuse, trace_external_array_abuse) |
sgjesse@chromium.org | ac6aa17 | 2009-12-04 12:29:05 +0000 | [diff] [blame] | 374 | DEFINE_bool(debugger_auto_break, true, |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 375 | "automatically set the debug break flag when debugger commands are " |
sgjesse@chromium.org | ac6aa17 | 2009-12-04 12:29:05 +0000 | [diff] [blame] | 376 | "in the queue") |
ager@chromium.org | ce5e87b | 2010-03-10 10:24:18 +0000 | [diff] [blame] | 377 | DEFINE_bool(enable_liveedit, true, "enable liveedit experimental feature") |
rossberg@chromium.org | 2c067b1 | 2012-03-19 11:01:52 +0000 | [diff] [blame] | 378 | 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] | 379 | |
sgjesse@chromium.org | 496c03a | 2011-02-14 12:05:43 +0000 | [diff] [blame] | 380 | // execution.cc |
fschneider@chromium.org | 7d10be5 | 2012-04-10 12:30:14 +0000 | [diff] [blame] | 381 | // Slightly less than 1MB on 64-bit, since Windows' default stack size for |
| 382 | // the main execution thread is 1MB for both 32 and 64-bit. |
| 383 | DEFINE_int(stack_size, kPointerSize * 123, |
danno@chromium.org | fa458e4 | 2012-02-01 10:48:36 +0000 | [diff] [blame] | 384 | "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] | 385 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 386 | // frames.cc |
| 387 | DEFINE_int(max_stack_trace_source_length, 300, |
| 388 | "maximum length of function source code printed in a stack trace.") |
| 389 | |
erik.corry@gmail.com | d88afa2 | 2010-09-15 12:33:05 +0000 | [diff] [blame] | 390 | // full-codegen.cc |
| 391 | DEFINE_bool(always_inline_smi_code, false, |
| 392 | "always inline smi code in non-opt code") |
| 393 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 394 | // heap.cc |
kmillikin@chromium.org | f05f291 | 2010-09-30 10:07:24 +0000 | [diff] [blame] | 395 | DEFINE_int(max_new_space_size, 0, "max size of the new generation (in kBytes)") |
| 396 | 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] | 397 | 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] | 398 | DEFINE_bool(gc_global, false, "always perform global GCs") |
| 399 | DEFINE_int(gc_interval, -1, "garbage collect after <n> allocations") |
| 400 | DEFINE_bool(trace_gc, false, |
| 401 | "print one trace line following each garbage collection") |
erik.corry@gmail.com | 9dfbea4 | 2010-05-21 12:58:28 +0000 | [diff] [blame] | 402 | DEFINE_bool(trace_gc_nvp, false, |
| 403 | "print one detailed trace line in name=value format " |
| 404 | "after each garbage collection") |
mstarzinger@chromium.org | 471f2f1 | 2012-08-10 14:46:33 +0000 | [diff] [blame] | 405 | DEFINE_bool(trace_gc_ignore_scavenger, false, |
| 406 | "do not print trace line after scavenger collection") |
erik.corry@gmail.com | 9dfbea4 | 2010-05-21 12:58:28 +0000 | [diff] [blame] | 407 | DEFINE_bool(print_cumulative_gc_stat, false, |
| 408 | "print cumulative GC statistics in name=value format on exit") |
kasperl@chromium.org | e959c18 | 2009-07-27 08:59:04 +0000 | [diff] [blame] | 409 | DEFINE_bool(trace_gc_verbose, false, |
| 410 | "print more details following each garbage collection") |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 411 | DEFINE_bool(trace_fragmentation, false, |
| 412 | "report fragmentation for old pointer and data pages") |
mstarzinger@chromium.org | 471f2f1 | 2012-08-10 14:46:33 +0000 | [diff] [blame] | 413 | DEFINE_bool(trace_external_memory, false, |
| 414 | "print amount of external allocated memory after each time " |
| 415 | "it is adjusted.") |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 416 | DEFINE_bool(collect_maps, true, |
kasperl@chromium.org | 9bbf968 | 2008-10-30 11:53:07 +0000 | [diff] [blame] | 417 | "garbage collect maps from which no objects can be reached") |
ulan@chromium.org | 6ba1fd0 | 2013-02-14 14:56:11 +0000 | [diff] [blame] | 418 | DEFINE_bool(weak_embedded_maps_in_optimized_code, true, |
mstarzinger@chromium.org | 068ea0a | 2013-01-30 09:39:44 +0000 | [diff] [blame] | 419 | "make maps embedded in optimized code weak") |
ricow@chromium.org | 5ad5ace | 2010-06-23 09:06:43 +0000 | [diff] [blame] | 420 | DEFINE_bool(flush_code, true, |
verwaest@chromium.org | e4ee6de | 2012-11-06 12:13:00 +0000 | [diff] [blame] | 421 | "flush code that we expect not to use again (during full gc)") |
mmassi@chromium.org | 49a4467 | 2012-12-04 13:52:03 +0000 | [diff] [blame] | 422 | DEFINE_bool(flush_code_incrementally, true, |
verwaest@chromium.org | e4ee6de | 2012-11-06 12:13:00 +0000 | [diff] [blame] | 423 | "flush code that we expect not to use again (incrementally)") |
svenpanne@chromium.org | 83130cf | 2012-11-30 10:13:25 +0000 | [diff] [blame] | 424 | DEFINE_bool(age_code, true, |
mvstanton@chromium.org | e4ac3ef | 2012-11-12 14:53:34 +0000 | [diff] [blame] | 425 | "track un-executed functions to age code and flush only " |
| 426 | "old code") |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 427 | DEFINE_bool(incremental_marking, true, "use incremental marking") |
| 428 | DEFINE_bool(incremental_marking_steps, true, "do incremental marking steps") |
| 429 | DEFINE_bool(trace_incremental_marking, false, |
| 430 | "trace progress of the incremental marking") |
jkummerow@chromium.org | 28583c9 | 2012-07-16 11:31:55 +0000 | [diff] [blame] | 431 | DEFINE_bool(track_gc_object_stats, false, |
| 432 | "track object counts and memory usage") |
hpayer@chromium.org | 7c3372b | 2013-02-13 17:26:04 +0000 | [diff] [blame] | 433 | DEFINE_bool(parallel_sweeping, true, "enable parallel sweeping") |
mstarzinger@chromium.org | e3b8d0f | 2013-02-01 09:06:41 +0000 | [diff] [blame] | 434 | DEFINE_bool(concurrent_sweeping, false, "enable concurrent sweeping") |
| 435 | DEFINE_int(sweeper_threads, 1, |
| 436 | "number of parallel and concurrent sweeping threads") |
| 437 | DEFINE_bool(parallel_marking, false, "enable parallel marking") |
| 438 | DEFINE_int(marking_threads, 1, "number of parallel marking threads") |
svenpanne@chromium.org | c859c4f | 2012-10-15 11:51:39 +0000 | [diff] [blame] | 439 | #ifdef VERIFY_HEAP |
| 440 | DEFINE_bool(verify_heap, false, "verify heap pointers before and after GC") |
| 441 | #endif |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 442 | |
ager@chromium.org | add848f | 2009-08-13 12:44:13 +0000 | [diff] [blame] | 443 | // v8.cc |
| 444 | DEFINE_bool(use_idle_notification, true, |
| 445 | "Use idle notification to reduce memory footprint.") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 446 | // ic.cc |
| 447 | DEFINE_bool(use_ic, true, "use inline caching") |
| 448 | |
| 449 | // macro-assembler-ia32.cc |
| 450 | DEFINE_bool(native_code_counters, false, |
| 451 | "generate extra code for manipulating stats counters") |
| 452 | |
| 453 | // mark-compact.cc |
| 454 | 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] | 455 | DEFINE_bool(lazy_sweeping, true, |
| 456 | "Use lazy sweeping for old pointer and data spaces") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 457 | DEFINE_bool(never_compact, false, |
| 458 | "Never perform compaction on full GC - testing only") |
yangguo@chromium.org | 78d1ad4 | 2012-02-09 13:53:47 +0000 | [diff] [blame] | 459 | DEFINE_bool(compact_code_space, true, |
jkummerow@chromium.org | ab7dad4 | 2012-02-07 12:07:34 +0000 | [diff] [blame] | 460 | "Compact code space on full non-incremental collections") |
ulan@chromium.org | 56c14af | 2012-09-20 12:51:09 +0000 | [diff] [blame] | 461 | DEFINE_bool(incremental_code_compaction, true, |
| 462 | "Compact code space on full incremental collections") |
ager@chromium.org | ea91cc5 | 2011-05-23 06:06:11 +0000 | [diff] [blame] | 463 | DEFINE_bool(cleanup_code_caches_at_gc, true, |
| 464 | "Flush inline caches prior to mark compact collection and " |
| 465 | "flush code caches in maps during mark compact cycle.") |
ulan@chromium.org | 8e8d882 | 2012-11-23 14:36:46 +0000 | [diff] [blame] | 466 | DEFINE_bool(use_marking_progress_bar, true, |
yangguo@chromium.org | fb37721 | 2012-11-16 14:43:43 +0000 | [diff] [blame] | 467 | "Use a progress bar to scan large objects in increments when " |
| 468 | "incremental marking is active.") |
sgjesse@chromium.org | df7a284 | 2010-03-25 14:34:15 +0000 | [diff] [blame] | 469 | DEFINE_int(random_seed, 0, |
| 470 | "Default seed for initializing random generator " |
| 471 | "(0, the default, means to use system random).") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 472 | |
whesse@chromium.org | 023421e | 2010-12-21 12:19:12 +0000 | [diff] [blame] | 473 | // objects.cc |
| 474 | DEFINE_bool(use_verbose_printer, true, "allows verbose printing") |
| 475 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 476 | // parser.cc |
| 477 | DEFINE_bool(allow_natives_syntax, false, "allow natives syntax") |
yangguo@chromium.org | 304cc33 | 2012-07-24 07:59:48 +0000 | [diff] [blame] | 478 | DEFINE_bool(trace_parse, false, "trace parsing and preparsing") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 479 | |
ager@chromium.org | 5c83825 | 2010-02-19 08:53:10 +0000 | [diff] [blame] | 480 | // simulator-arm.cc and simulator-mips.cc |
ricow@chromium.org | c9c8082 | 2010-04-21 08:22:37 +0000 | [diff] [blame] | 481 | DEFINE_bool(trace_sim, false, "Trace simulator execution") |
jkummerow@chromium.org | c3b3712 | 2011-11-07 10:14:12 +0000 | [diff] [blame] | 482 | DEFINE_bool(check_icache, false, |
| 483 | "Check icache flushes in ARM and MIPS simulator") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 484 | 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] | 485 | DEFINE_int(sim_stack_alignment, 8, |
| 486 | "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] | 487 | |
vegorov@chromium.org | 7304bca | 2011-05-16 12:14:13 +0000 | [diff] [blame] | 488 | // isolate.cc |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 489 | DEFINE_bool(trace_exception, false, |
| 490 | "print stack trace when throwing exceptions") |
| 491 | DEFINE_bool(preallocate_message_memory, false, |
| 492 | "preallocate some memory to build stack traces.") |
erik.corry@gmail.com | f2038fb | 2012-01-16 11:42:08 +0000 | [diff] [blame] | 493 | DEFINE_bool(randomize_hashes, |
rossberg@chromium.org | fab1498 | 2012-01-05 15:02:15 +0000 | [diff] [blame] | 494 | true, |
erik.corry@gmail.com | f2038fb | 2012-01-16 11:42:08 +0000 | [diff] [blame] | 495 | "randomize hashes to avoid predictable hash collisions " |
rossberg@chromium.org | fab1498 | 2012-01-05 15:02:15 +0000 | [diff] [blame] | 496 | "(with snapshots this option cannot override the baked-in seed)") |
erik.corry@gmail.com | f2038fb | 2012-01-16 11:42:08 +0000 | [diff] [blame] | 497 | DEFINE_int(hash_seed, |
rossberg@chromium.org | fab1498 | 2012-01-05 15:02:15 +0000 | [diff] [blame] | 498 | 0, |
erik.corry@gmail.com | f2038fb | 2012-01-16 11:42:08 +0000 | [diff] [blame] | 499 | "Fixed seed to use to hash property keys (0 means random)" |
rossberg@chromium.org | fab1498 | 2012-01-05 15:02:15 +0000 | [diff] [blame] | 500 | "(with snapshots this option cannot override the baked-in seed)") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 501 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 502 | // v8.cc |
| 503 | DEFINE_bool(preemption, false, |
| 504 | "activate a 100ms timer that switches between V8 threads") |
| 505 | |
ager@chromium.org | 381abbb | 2009-02-25 13:23:22 +0000 | [diff] [blame] | 506 | // Regexp |
ager@chromium.org | 381abbb | 2009-02-25 13:23:22 +0000 | [diff] [blame] | 507 | DEFINE_bool(regexp_optimization, true, "generate optimized regexp code") |
ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 508 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 509 | // Testing flags test/cctest/test-{flags,api,serialization}.cc |
| 510 | DEFINE_bool(testing_bool_flag, true, "testing_bool_flag") |
| 511 | DEFINE_int(testing_int_flag, 13, "testing_int_flag") |
| 512 | DEFINE_float(testing_float_flag, 2.5, "float-flag") |
| 513 | DEFINE_string(testing_string_flag, "Hello, world!", "string-flag") |
| 514 | DEFINE_int(testing_prng_seed, 42, "Seed used for threading test randomness") |
| 515 | #ifdef WIN32 |
| 516 | DEFINE_string(testing_serialization_file, "C:\\Windows\\Temp\\serdes", |
| 517 | "file in which to testing_serialize heap") |
| 518 | #else |
| 519 | DEFINE_string(testing_serialization_file, "/tmp/serdes", |
| 520 | "file in which to serialize heap") |
| 521 | #endif |
| 522 | |
yangguo@chromium.org | 5a11aaf | 2012-06-20 11:29:00 +0000 | [diff] [blame] | 523 | // mksnapshot.cc |
| 524 | DEFINE_string(extra_code, NULL, "A filename with extra code to be included in" |
| 525 | " the snapshot (mksnapshot only)") |
| 526 | |
kasperl@chromium.org | 5a8ca6c | 2008-10-23 13:57:19 +0000 | [diff] [blame] | 527 | // |
| 528 | // Dev shell flags |
| 529 | // |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 530 | |
ager@chromium.org | 3bf7b91 | 2008-11-17 09:09:45 +0000 | [diff] [blame] | 531 | DEFINE_bool(help, false, "Print usage message, including flags, on console") |
kasperl@chromium.org | 5a8ca6c | 2008-10-23 13:57:19 +0000 | [diff] [blame] | 532 | DEFINE_bool(dump_counters, false, "Dump counters on exit") |
erik.corry@gmail.com | c3b670f | 2011-10-05 21:44:48 +0000 | [diff] [blame] | 533 | |
| 534 | #ifdef ENABLE_DEBUGGER_SUPPORT |
vegorov@chromium.org | 2356e6f | 2010-06-09 09:38:56 +0000 | [diff] [blame] | 535 | DEFINE_bool(debugger, false, "Enable JavaScript debugger") |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 536 | DEFINE_bool(remote_debugger, false, "Connect JavaScript debugger to the " |
| 537 | "debugger agent in another process") |
| 538 | DEFINE_bool(debugger_agent, false, "Enable debugger agent") |
| 539 | 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] | 540 | #endif // ENABLE_DEBUGGER_SUPPORT |
| 541 | |
ager@chromium.org | 9ee27ae | 2011-03-02 13:43:26 +0000 | [diff] [blame] | 542 | DEFINE_string(map_counters, "", "Map counters to a file") |
jkummerow@chromium.org | 1456e70 | 2012-03-30 08:38:13 +0000 | [diff] [blame] | 543 | DEFINE_args(js_arguments, JSARGUMENTS_INIT, |
ager@chromium.org | 3bf7b91 | 2008-11-17 09:09:45 +0000 | [diff] [blame] | 544 | "Pass all remaining arguments to the script. Alias for \"--\".") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 545 | |
kmillikin@chromium.org | d2c22f0 | 2011-01-10 08:15:37 +0000 | [diff] [blame] | 546 | #if defined(WEBOS__) |
| 547 | DEFINE_bool(debug_compile_events, false, "Enable debugger compile events") |
| 548 | DEFINE_bool(debug_script_collected_events, false, |
| 549 | "Enable debugger script collected events") |
| 550 | #else |
| 551 | DEFINE_bool(debug_compile_events, true, "Enable debugger compile events") |
| 552 | DEFINE_bool(debug_script_collected_events, true, |
| 553 | "Enable debugger script collected events") |
| 554 | #endif |
| 555 | |
erik.corry@gmail.com | 0511e24 | 2011-01-19 11:11:08 +0000 | [diff] [blame] | 556 | |
| 557 | // |
| 558 | // GDB JIT integration flags. |
| 559 | // |
| 560 | |
| 561 | DEFINE_bool(gdbjit, false, "enable GDBJIT interface (disables compacting GC)") |
| 562 | 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] | 563 | 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] | 564 | DEFINE_string(gdbjit_dump_filter, "", |
| 565 | "dump only objects containing this substring") |
erik.corry@gmail.com | 0511e24 | 2011-01-19 11:11:08 +0000 | [diff] [blame] | 566 | |
rossberg@chromium.org | b4b2aa6 | 2011-10-13 09:49:59 +0000 | [diff] [blame] | 567 | // mark-compact.cc |
| 568 | DEFINE_bool(force_marking_deque_overflows, false, |
| 569 | "force overflows of marking deque by reducing it's size " |
| 570 | "to 64 words") |
| 571 | |
| 572 | DEFINE_bool(stress_compaction, false, |
| 573 | "stress the GC compactor to flush out bugs (implies " |
| 574 | "--force_marking_deque_overflows)") |
| 575 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 576 | // |
| 577 | // Debug only flags |
| 578 | // |
| 579 | #undef FLAG |
| 580 | #ifdef DEBUG |
| 581 | #define FLAG FLAG_FULL |
| 582 | #else |
| 583 | #define FLAG FLAG_READONLY |
| 584 | #endif |
| 585 | |
| 586 | // checks.cc |
| 587 | DEFINE_bool(enable_slow_asserts, false, |
| 588 | "enable asserts that are slow to execute") |
| 589 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 590 | // codegen-ia32.cc / codegen-arm.cc |
| 591 | DEFINE_bool(trace_codegen, false, |
| 592 | "print name of functions for which code is generated") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 593 | DEFINE_bool(print_source, false, "pretty print source code") |
| 594 | DEFINE_bool(print_builtin_source, false, |
| 595 | "pretty print source code for builtins") |
| 596 | DEFINE_bool(print_ast, false, "print source AST") |
| 597 | DEFINE_bool(print_builtin_ast, false, "print source AST for builtins") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 598 | DEFINE_string(stop_at, "", "function name where to insert a breakpoint") |
| 599 | |
| 600 | // compiler.cc |
| 601 | DEFINE_bool(print_builtin_scopes, false, "print scopes for builtins") |
| 602 | DEFINE_bool(print_scopes, false, "print scopes") |
| 603 | |
| 604 | // contexts.cc |
| 605 | DEFINE_bool(trace_contexts, false, "trace contexts operations") |
| 606 | |
| 607 | // heap.cc |
| 608 | DEFINE_bool(gc_greedy, false, "perform GC prior to some allocations") |
| 609 | DEFINE_bool(gc_verbose, false, "print stuff during garbage collection") |
| 610 | DEFINE_bool(heap_stats, false, "report heap statistics before and after GC") |
| 611 | DEFINE_bool(code_stats, false, "report code statistics after GC") |
yangguo@chromium.org | 46839fb | 2012-08-28 09:06:19 +0000 | [diff] [blame] | 612 | DEFINE_bool(verify_native_context_separation, false, |
| 613 | "verify that code holds on to at most one native context after GC") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 614 | DEFINE_bool(print_handles, false, "report handles after GC") |
| 615 | DEFINE_bool(print_global_handles, false, "report global handles after GC") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 616 | |
| 617 | // ic.cc |
| 618 | DEFINE_bool(trace_ic, false, "trace inline cache state transitions") |
| 619 | |
erik.corry@gmail.com | bbceb57 | 2012-03-09 10:52:05 +0000 | [diff] [blame] | 620 | // interface.cc |
| 621 | DEFINE_bool(print_interfaces, false, "print interfaces") |
| 622 | DEFINE_bool(print_interface_details, false, "print interface inference details") |
| 623 | DEFINE_int(print_interface_depth, 5, "depth for printing interfaces") |
| 624 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 625 | // objects.cc |
| 626 | DEFINE_bool(trace_normalization, |
| 627 | false, |
| 628 | "prints when objects are turned into dictionaries.") |
| 629 | |
| 630 | // runtime.cc |
| 631 | DEFINE_bool(trace_lazy, false, "trace lazy compilation") |
| 632 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 633 | // spaces.cc |
| 634 | DEFINE_bool(collect_heap_spill_statistics, false, |
| 635 | "report heap spill statistics along with heap_stats " |
| 636 | "(requires heap_stats)") |
| 637 | |
sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 638 | DEFINE_bool(trace_isolates, false, "trace isolate state changes") |
| 639 | |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 640 | // VM state |
| 641 | DEFINE_bool(log_state_changes, false, "Log state changes.") |
| 642 | |
ager@chromium.org | 381abbb | 2009-02-25 13:23:22 +0000 | [diff] [blame] | 643 | // Regexp |
fschneider@chromium.org | 0c20e67 | 2010-01-14 15:28:53 +0000 | [diff] [blame] | 644 | DEFINE_bool(regexp_possessive_quantifier, |
| 645 | false, |
| 646 | "enable possessive quantifier syntax for testing") |
ager@chromium.org | 381abbb | 2009-02-25 13:23:22 +0000 | [diff] [blame] | 647 | DEFINE_bool(trace_regexp_bytecodes, false, "trace regexp bytecode execution") |
| 648 | DEFINE_bool(trace_regexp_assembler, |
| 649 | false, |
| 650 | "trace regexp macro assembler calls.") |
ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 651 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 652 | // |
whesse@chromium.org | 030d38e | 2011-07-13 13:23:34 +0000 | [diff] [blame] | 653 | // Logging and profiling flags |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 654 | // |
| 655 | #undef FLAG |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 656 | #define FLAG FLAG_FULL |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 657 | |
| 658 | // log.cc |
| 659 | DEFINE_bool(log, false, |
| 660 | "Minimal logging (no API, code, GC, suspect, or handles samples).") |
| 661 | 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] | 662 | DEFINE_bool(log_runtime, false, "Activate runtime system %Log call.") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 663 | DEFINE_bool(log_api, false, "Log API events to the log file.") |
| 664 | DEFINE_bool(log_code, false, |
| 665 | "Log code events to the log file without profiling.") |
| 666 | DEFINE_bool(log_gc, false, |
| 667 | "Log heap samples on garbage collection for the hp2ps tool.") |
| 668 | DEFINE_bool(log_handles, false, "Log global handle events.") |
sgjesse@chromium.org | b302e56 | 2010-02-03 11:26:59 +0000 | [diff] [blame] | 669 | DEFINE_bool(log_snapshot_positions, false, |
| 670 | "log positions of (de)serialized objects in the snapshot.") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 671 | DEFINE_bool(log_suspect, false, "Log suspect operations.") |
| 672 | DEFINE_bool(prof, false, |
| 673 | "Log statistical profiling information (implies --log-code).") |
iposva@chromium.org | 245aa85 | 2009-02-10 00:49:54 +0000 | [diff] [blame] | 674 | DEFINE_bool(prof_auto, true, |
| 675 | "Used with --prof, starts profiling automatically") |
kasperl@chromium.org | 71affb5 | 2009-05-26 05:44:31 +0000 | [diff] [blame] | 676 | DEFINE_bool(prof_lazy, false, |
| 677 | "Used with --prof, only does sampling and logging" |
| 678 | " when profiler is active (implies --noprof_auto).") |
ager@chromium.org | 357bf65 | 2010-04-12 11:30:10 +0000 | [diff] [blame] | 679 | DEFINE_bool(prof_browser_mode, true, |
| 680 | "Used with --prof, turns on browser-compatible mode for profiling.") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 681 | DEFINE_bool(log_regexp, false, "Log regular expression execution.") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 682 | 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] | 683 | DEFINE_bool(ll_prof, false, "Enable low-level linux profiler.") |
mstarzinger@chromium.org | de88679 | 2012-09-11 13:22:37 +0000 | [diff] [blame] | 684 | DEFINE_string(gc_fake_mmap, "/tmp/__v8_gc__", |
| 685 | "Specify the name of the file for fake gc mmap used in ll_prof") |
mstarzinger@chromium.org | 32280cf | 2012-12-06 17:32:37 +0000 | [diff] [blame] | 686 | DEFINE_bool(log_internal_timer_events, false, "Time internal events.") |
| 687 | DEFINE_bool(log_timer_events, false, |
| 688 | "Time events including external callbacks.") |
| 689 | DEFINE_implication(log_timer_events, log_internal_timer_events) |
yangguo@chromium.org | 5a11aaf | 2012-06-20 11:29:00 +0000 | [diff] [blame] | 690 | |
kasperl@chromium.org | f5aa837 | 2009-03-24 14:47:14 +0000 | [diff] [blame] | 691 | // |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 692 | // Disassembler only flags |
| 693 | // |
| 694 | #undef FLAG |
| 695 | #ifdef ENABLE_DISASSEMBLER |
| 696 | #define FLAG FLAG_FULL |
| 697 | #else |
| 698 | #define FLAG FLAG_READONLY |
| 699 | #endif |
| 700 | |
erik.corry@gmail.com | 394dbcf | 2011-10-27 07:38:48 +0000 | [diff] [blame] | 701 | // elements.cc |
| 702 | DEFINE_bool(trace_elements_transitions, false, "trace elements transitions") |
| 703 | |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 704 | // code-stubs.cc |
| 705 | DEFINE_bool(print_code_stubs, false, "print code stubs") |
ulan@chromium.org | 812308e | 2012-02-29 15:58:45 +0000 | [diff] [blame] | 706 | DEFINE_bool(test_secondary_stub_cache, |
| 707 | false, |
| 708 | "test secondary stub cache by disabling the primary one") |
| 709 | |
| 710 | DEFINE_bool(test_primary_stub_cache, |
| 711 | false, |
| 712 | "test primary stub cache by disabling the secondary one") |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 713 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 714 | // codegen-ia32.cc / codegen-arm.cc |
| 715 | DEFINE_bool(print_code, false, "print generated code") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 716 | DEFINE_bool(print_opt_code, false, "print optimized code") |
whesse@chromium.org | 023421e | 2010-12-21 12:19:12 +0000 | [diff] [blame] | 717 | DEFINE_bool(print_unopt_code, false, "print unoptimized code before " |
| 718 | "printing optimized code based on it") |
kasperl@chromium.org | a555126 | 2010-12-07 12:49:48 +0000 | [diff] [blame] | 719 | DEFINE_bool(print_code_verbose, false, "print more information for code") |
ager@chromium.org | 8bb6058 | 2008-12-11 12:02:20 +0000 | [diff] [blame] | 720 | DEFINE_bool(print_builtin_code, false, "print generated code for builtins") |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 721 | |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 722 | #ifdef ENABLE_DISASSEMBLER |
| 723 | DEFINE_bool(print_all_code, false, "enable all flags related to printing code") |
| 724 | DEFINE_implication(print_all_code, print_code) |
| 725 | DEFINE_implication(print_all_code, print_opt_code) |
| 726 | DEFINE_implication(print_all_code, print_unopt_code) |
| 727 | DEFINE_implication(print_all_code, print_code_verbose) |
| 728 | DEFINE_implication(print_all_code, print_builtin_code) |
| 729 | DEFINE_implication(print_all_code, print_code_stubs) |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 730 | DEFINE_implication(print_all_code, code_comments) |
danno@chromium.org | bf0c820 | 2011-12-27 10:09:42 +0000 | [diff] [blame] | 731 | #ifdef DEBUG |
| 732 | DEFINE_implication(print_all_code, trace_codegen) |
| 733 | #endif |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 734 | #endif |
| 735 | |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 736 | // Cleanup... |
| 737 | #undef FLAG_FULL |
| 738 | #undef FLAG_READONLY |
| 739 | #undef FLAG |
| 740 | |
| 741 | #undef DEFINE_bool |
| 742 | #undef DEFINE_int |
| 743 | #undef DEFINE_string |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 744 | #undef DEFINE_implication |
kasperl@chromium.org | b912362 | 2008-09-17 14:05:56 +0000 | [diff] [blame] | 745 | |
| 746 | #undef FLAG_MODE_DECLARE |
| 747 | #undef FLAG_MODE_DEFINE |
| 748 | #undef FLAG_MODE_DEFINE_DEFAULTS |
| 749 | #undef FLAG_MODE_META |
ricow@chromium.org | 7ad6522 | 2011-12-19 12:13:11 +0000 | [diff] [blame] | 750 | #undef FLAG_MODE_DEFINE_IMPLICATIONS |