[V8] Introduce a QML compilation mode
[profile/ivi/qtjsbackend.git] / src / 3rdparty / v8 / src / flag-definitions.h
1 // Copyright 2012 the V8 project authors. All rights reserved.
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;
44 #define DEFINE_implication(whenflag, thenflag)
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)
52 #define DEFINE_implication(whenflag, thenflag)
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)
61 #define DEFINE_implication(whenflag, thenflag)
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) \
67   { Flag::TYPE_##ftype, #nam, &FLAG_##nam, &FLAGDEFAULT_##nam, cmt, false },
68 #define FLAG_READONLY(ftype, ctype, nam, def, cmt)
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;
77
78 #else
79 #error No mode supplied when including flags.defs
80 #endif
81
82 #ifdef FLAG_MODE_DECLARE
83 // Structure used to hold a collection of arguments to the JavaScript code.
84 #define JSARGUMENTS_INIT {{}}
85 struct JSArguments {
86 public:
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   }
107 private:
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];
119 };
120 #endif
121
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)
126 #define DEFINE_args(nam, def, cmt) FLAG(ARGS, JSArguments, nam, def, cmt)
127
128 //
129 // Flags in all modes.
130 //
131 #define FLAG FLAG_FULL
132
133 // Flags for language modes and experimental language features.
134 DEFINE_bool(use_strict, false, "enforce strict mode")
135 DEFINE_bool(es52_globals, false,
136             "activate new semantics for global var declarations")
137
138 DEFINE_bool(harmony_typeof, false, "enable harmony semantics for typeof")
139 DEFINE_bool(harmony_scoping, false, "enable harmony block scoping")
140 DEFINE_bool(harmony_modules, false,
141             "enable harmony modules (implies block scoping)")
142 DEFINE_bool(harmony_proxies, false, "enable harmony proxies")
143 DEFINE_bool(harmony_collections, false,
144             "enable harmony collections (sets, maps, and weak maps)")
145 DEFINE_bool(harmony, false, "enable all harmony features (except typeof)")
146 DEFINE_implication(harmony, harmony_scoping)
147 DEFINE_implication(harmony, harmony_modules)
148 DEFINE_implication(harmony, harmony_proxies)
149 DEFINE_implication(harmony, harmony_collections)
150 DEFINE_implication(harmony_modules, harmony_scoping)
151
152 // Flags for experimental implementation features.
153 DEFINE_bool(smi_only_arrays, true, "tracks arrays with only smi values")
154 DEFINE_bool(clever_optimizations,
155             true,
156             "Optimize object size, Array shift, DOM strings and string +")
157
158 // Flags for data representation optimizations
159 DEFINE_bool(unbox_double_arrays, true, "automatically unbox arrays of doubles")
160 DEFINE_bool(string_slices, true, "use string slices")
161
162 // Flags for Crankshaft.
163 DEFINE_bool(crankshaft, true, "use crankshaft")
164 DEFINE_string(hydrogen_filter, "", "optimization filter")
165 DEFINE_bool(use_range, true, "use hydrogen range analysis")
166 DEFINE_bool(eliminate_dead_phis, true, "eliminate dead phis")
167 DEFINE_bool(use_gvn, true, "use hydrogen global value numbering")
168 DEFINE_bool(use_canonicalizing, true, "use hydrogen instruction canonicalizing")
169 DEFINE_bool(use_inlining, true, "use function inlining")
170 DEFINE_int(max_inlined_source_size, 600,
171            "maximum source size in bytes considered for a single inlining")
172 DEFINE_int(max_inlined_nodes, 196,
173            "maximum number of AST nodes considered for a single inlining")
174 DEFINE_int(max_inlined_nodes_cumulative, 196,
175            "maximum cumulative number of AST nodes considered for inlining")
176 DEFINE_bool(loop_invariant_code_motion, true, "loop invariant code motion")
177 DEFINE_bool(collect_megamorphic_maps_from_stub_cache,
178             true,
179             "crankshaft harvests type feedback from stub cache")
180 DEFINE_bool(hydrogen_stats, false, "print statistics for hydrogen")
181 DEFINE_bool(trace_hydrogen, false, "trace generated hydrogen to file")
182 DEFINE_string(trace_phase, "Z", "trace generated IR for specified phases")
183 DEFINE_bool(trace_inlining, false, "trace inlining decisions")
184 DEFINE_bool(trace_alloc, false, "trace register allocator")
185 DEFINE_bool(trace_all_uses, false, "trace all use positions")
186 DEFINE_bool(trace_range, false, "trace range analysis")
187 DEFINE_bool(trace_gvn, false, "trace global value numbering")
188 DEFINE_bool(trace_representation, false, "trace representation types")
189 DEFINE_bool(stress_pointer_maps, false, "pointer map for every instruction")
190 DEFINE_bool(stress_environments, false, "environment for every instruction")
191 DEFINE_int(deopt_every_n_times,
192            0,
193            "deoptimize every n times a deopt point is passed")
194 DEFINE_bool(trap_on_deopt, false, "put a break point before deoptimizing")
195 DEFINE_bool(deoptimize_uncommon_cases, true, "deoptimize uncommon cases")
196 DEFINE_bool(polymorphic_inlining, true, "polymorphic inlining")
197 DEFINE_bool(use_osr, true, "use on-stack replacement")
198 DEFINE_bool(array_bounds_checks_elimination, true,
199             "perform array bounds checks elimination")
200 DEFINE_bool(array_index_dehoisting, false,
201             "perform array index dehoisting")
202
203 DEFINE_bool(trace_osr, false, "trace on-stack replacement")
204 DEFINE_int(stress_runs, 0, "number of stress runs")
205 DEFINE_bool(optimize_closures, true, "optimize closures")
206 DEFINE_bool(inline_construct, true, "inline constructor calls")
207 DEFINE_bool(inline_arguments, true, "inline functions with arguments object")
208 DEFINE_int(loop_weight, 1, "loop weight for representation inference")
209
210 DEFINE_bool(optimize_for_in, true,
211             "optimize functions containing for-in loops")
212
213 // Experimental profiler changes.
214 DEFINE_bool(experimental_profiler, true, "enable all profiler experiments")
215 DEFINE_bool(watch_ic_patching, false, "profiler considers IC stability")
216 DEFINE_int(frame_count, 1, "number of stack frames inspected by the profiler")
217 DEFINE_bool(self_optimization, false,
218             "primitive functions trigger their own optimization")
219 DEFINE_bool(direct_self_opt, false,
220             "call recompile stub directly when self-optimizing")
221 DEFINE_bool(retry_self_opt, false, "re-try self-optimization if it failed")
222 DEFINE_bool(count_based_interrupts, false,
223             "trigger profiler ticks based on counting instead of timing")
224 DEFINE_bool(interrupt_at_exit, false,
225             "insert an interrupt check at function exit")
226 DEFINE_bool(weighted_back_edges, false,
227             "weight back edges by jump distance for interrupt triggering")
228 DEFINE_int(interrupt_budget, 5900,
229            "execution budget before interrupt is triggered")
230 DEFINE_int(type_info_threshold, 15,
231            "percentage of ICs that must have type info to allow optimization")
232 DEFINE_int(self_opt_count, 130, "call count before self-optimization")
233
234 DEFINE_implication(experimental_profiler, watch_ic_patching)
235 DEFINE_implication(experimental_profiler, self_optimization)
236 // Not implying direct_self_opt here because it seems to be a bad idea.
237 DEFINE_implication(experimental_profiler, retry_self_opt)
238 DEFINE_implication(experimental_profiler, count_based_interrupts)
239 DEFINE_implication(experimental_profiler, interrupt_at_exit)
240 DEFINE_implication(experimental_profiler, weighted_back_edges)
241
242 DEFINE_bool(trace_opt_verbose, false, "extra verbose compilation tracing")
243 DEFINE_implication(trace_opt_verbose, trace_opt)
244
245 // assembler-ia32.cc / assembler-arm.cc / assembler-x64.cc
246 DEFINE_bool(debug_code, false,
247             "generate extra code (assertions) for debugging")
248 DEFINE_bool(code_comments, false, "emit comments in code disassembly")
249 DEFINE_bool(enable_sse2, true,
250             "enable use of SSE2 instructions if available")
251 DEFINE_bool(enable_sse3, true,
252             "enable use of SSE3 instructions if available")
253 DEFINE_bool(enable_sse4_1, true,
254             "enable use of SSE4.1 instructions if available")
255 DEFINE_bool(enable_cmov, true,
256             "enable use of CMOV instruction if available")
257 DEFINE_bool(enable_rdtsc, true,
258             "enable use of RDTSC instruction if available")
259 DEFINE_bool(enable_sahf, true,
260             "enable use of SAHF instruction if available (X64 only)")
261 DEFINE_bool(enable_vfp3, true,
262             "enable use of VFP3 instructions if available - this implies "
263             "enabling ARMv7 instructions (ARM only)")
264 DEFINE_bool(enable_armv7, true,
265             "enable use of ARMv7 instructions if available (ARM only)")
266 DEFINE_bool(enable_fpu, true,
267             "enable use of MIPS FPU instructions if available (MIPS only)")
268
269 // bootstrapper.cc
270 DEFINE_string(expose_natives_as, NULL, "expose natives in global object")
271 DEFINE_string(expose_debug_as, NULL, "expose debug in global object")
272 DEFINE_bool(expose_gc, false, "expose gc extension")
273 DEFINE_bool(expose_externalize_string, false,
274             "expose externalize string extension")
275 DEFINE_int(stack_trace_limit, 10, "number of stack frames to capture")
276 DEFINE_bool(builtins_in_stack_traces, false,
277             "show built-in functions in stack traces")
278 DEFINE_bool(disable_native_files, false, "disable builtin natives files")
279
280 // builtins-ia32.cc
281 DEFINE_bool(inline_new, true, "use fast inline allocation")
282
283 // checks.cc
284 DEFINE_bool(stack_trace_on_abort, true,
285             "print a stack trace if an assertion failure occurs")
286
287 // codegen-ia32.cc / codegen-arm.cc
288 DEFINE_bool(trace, false, "trace function calls")
289 DEFINE_bool(mask_constants_with_cookie,
290             true,
291             "use random jit cookie to mask large constants")
292
293 // codegen.cc
294 DEFINE_bool(lazy, true, "use lazy compilation")
295 DEFINE_bool(trace_opt, false, "trace lazy optimization")
296 DEFINE_bool(trace_opt_stats, false, "trace lazy optimization statistics")
297 DEFINE_bool(opt, true, "use adaptive optimizations")
298 DEFINE_bool(always_opt, false, "always try to optimize functions")
299 DEFINE_bool(prepare_always_opt, false, "prepare for turning on always opt")
300 DEFINE_bool(trace_deopt, false, "trace deoptimization")
301
302 // compiler.cc
303 DEFINE_int(min_preparse_length, 1024,
304            "minimum length for automatic enable preparsing")
305 DEFINE_bool(always_full_compiler, false,
306             "try to use the dedicated run-once backend for all code")
307 DEFINE_bool(trace_bailout, false,
308             "print reasons for falling back to using the classic V8 backend")
309
310 // compilation-cache.cc
311 DEFINE_bool(compilation_cache, true, "enable compilation cache")
312
313 DEFINE_bool(cache_prototype_transitions, true, "cache prototype transitions")
314
315 // debug.cc
316 DEFINE_bool(trace_debug_json, false, "trace debugging JSON request/response")
317 DEFINE_bool(debugger_auto_break, true,
318             "automatically set the debug break flag when debugger commands are "
319             "in the queue")
320 DEFINE_bool(enable_liveedit, true, "enable liveedit experimental feature")
321 DEFINE_bool(break_on_abort, true, "always cause a debug break before aborting")
322
323 // execution.cc
324 // Slightly less than 1MB on 64-bit, since Windows' default stack size for
325 // the main execution thread is 1MB for both 32 and 64-bit.
326 DEFINE_int(stack_size, kPointerSize * 123,
327            "default size of stack region v8 is allowed to use (in kBytes)")
328
329 // frames.cc
330 DEFINE_int(max_stack_trace_source_length, 300,
331            "maximum length of function source code printed in a stack trace.")
332
333 // full-codegen.cc
334 DEFINE_bool(always_inline_smi_code, false,
335             "always inline smi code in non-opt code")
336
337 // heap.cc
338 DEFINE_int(max_new_space_size, 0, "max size of the new generation (in kBytes)")
339 DEFINE_int(max_old_space_size, 0, "max size of the old generation (in Mbytes)")
340 DEFINE_int(max_executable_size, 0, "max size of executable memory (in Mbytes)")
341 DEFINE_bool(gc_global, false, "always perform global GCs")
342 DEFINE_int(gc_interval, -1, "garbage collect after <n> allocations")
343 DEFINE_bool(trace_gc, false,
344             "print one trace line following each garbage collection")
345 DEFINE_bool(trace_gc_nvp, false,
346             "print one detailed trace line in name=value format "
347             "after each garbage collection")
348 DEFINE_bool(print_cumulative_gc_stat, false,
349             "print cumulative GC statistics in name=value format on exit")
350 DEFINE_bool(trace_gc_verbose, false,
351             "print more details following each garbage collection")
352 DEFINE_bool(trace_fragmentation, false,
353             "report fragmentation for old pointer and data pages")
354 DEFINE_bool(collect_maps, true,
355             "garbage collect maps from which no objects can be reached")
356 DEFINE_bool(flush_code, true,
357             "flush code that we expect not to use again before full gc")
358 DEFINE_bool(incremental_marking, true, "use incremental marking")
359 DEFINE_bool(incremental_marking_steps, true, "do incremental marking steps")
360 DEFINE_bool(trace_incremental_marking, false,
361             "trace progress of the incremental marking")
362
363 // v8.cc
364 DEFINE_bool(use_idle_notification, true,
365             "Use idle notification to reduce memory footprint.")
366
367 DEFINE_bool(send_idle_notification, false,
368             "Send idle notifcation between stress runs.")
369 // ic.cc
370 DEFINE_bool(use_ic, true, "use inline caching")
371
372 #ifdef LIVE_OBJECT_LIST
373 // liveobjectlist.cc
374 DEFINE_string(lol_workdir, NULL, "path for lol temp files")
375 DEFINE_bool(verify_lol, false, "perform debugging verification for lol")
376 #endif
377
378 // macro-assembler-ia32.cc
379 DEFINE_bool(native_code_counters, false,
380             "generate extra code for manipulating stats counters")
381
382 // mark-compact.cc
383 DEFINE_bool(always_compact, false, "Perform compaction on every full GC")
384 DEFINE_bool(lazy_sweeping, true,
385             "Use lazy sweeping for old pointer and data spaces")
386 DEFINE_bool(never_compact, false,
387             "Never perform compaction on full GC - testing only")
388 DEFINE_bool(compact_code_space, true,
389             "Compact code space on full non-incremental collections")
390 DEFINE_bool(cleanup_code_caches_at_gc, true,
391             "Flush inline caches prior to mark compact collection and "
392             "flush code caches in maps during mark compact cycle.")
393 DEFINE_int(random_seed, 0,
394            "Default seed for initializing random generator "
395            "(0, the default, means to use system random).")
396
397 // objects.cc
398 DEFINE_bool(use_verbose_printer, true, "allows verbose printing")
399
400 // parser.cc
401 DEFINE_bool(allow_natives_syntax, false, "allow natives syntax")
402
403 // simulator-arm.cc and simulator-mips.cc
404 DEFINE_bool(trace_sim, false, "Trace simulator execution")
405 DEFINE_bool(check_icache, false,
406             "Check icache flushes in ARM and MIPS simulator")
407 DEFINE_int(stop_sim_at, 0, "Simulator stop after x number of instructions")
408 DEFINE_int(sim_stack_alignment, 8,
409            "Stack alingment in bytes in simulator (4 or 8, 8 is default)")
410
411 // isolate.cc
412 DEFINE_bool(trace_exception, false,
413             "print stack trace when throwing exceptions")
414 DEFINE_bool(preallocate_message_memory, false,
415             "preallocate some memory to build stack traces.")
416 DEFINE_bool(randomize_hashes,
417             true,
418             "randomize hashes to avoid predictable hash collisions "
419             "(with snapshots this option cannot override the baked-in seed)")
420 DEFINE_int(hash_seed,
421            0,
422            "Fixed seed to use to hash property keys (0 means random)"
423            "(with snapshots this option cannot override the baked-in seed)")
424
425 // v8.cc
426 DEFINE_bool(preemption, false,
427             "activate a 100ms timer that switches between V8 threads")
428
429 // Regexp
430 DEFINE_bool(regexp_optimization, true, "generate optimized regexp code")
431
432 // Testing flags test/cctest/test-{flags,api,serialization}.cc
433 DEFINE_bool(testing_bool_flag, true, "testing_bool_flag")
434 DEFINE_int(testing_int_flag, 13, "testing_int_flag")
435 DEFINE_float(testing_float_flag, 2.5, "float-flag")
436 DEFINE_string(testing_string_flag, "Hello, world!", "string-flag")
437 DEFINE_int(testing_prng_seed, 42, "Seed used for threading test randomness")
438 #ifdef WIN32
439 DEFINE_string(testing_serialization_file, "C:\\Windows\\Temp\\serdes",
440               "file in which to testing_serialize heap")
441 #else
442 DEFINE_string(testing_serialization_file, "/tmp/serdes",
443               "file in which to serialize heap")
444 #endif
445
446 //
447 // Dev shell flags
448 //
449
450 DEFINE_bool(help, false, "Print usage message, including flags, on console")
451 DEFINE_bool(dump_counters, false, "Dump counters on exit")
452
453 #ifdef ENABLE_DEBUGGER_SUPPORT
454 DEFINE_bool(debugger, false, "Enable JavaScript debugger")
455 DEFINE_bool(remote_debugger, false, "Connect JavaScript debugger to the "
456                                     "debugger agent in another process")
457 DEFINE_bool(debugger_agent, false, "Enable debugger agent")
458 DEFINE_int(debugger_port, 5858, "Port to use for remote debugging")
459 #endif  // ENABLE_DEBUGGER_SUPPORT
460
461 DEFINE_string(map_counters, "", "Map counters to a file")
462 DEFINE_args(js_arguments, JSARGUMENTS_INIT,
463             "Pass all remaining arguments to the script. Alias for \"--\".")
464
465 #if defined(WEBOS__)
466 DEFINE_bool(debug_compile_events, false, "Enable debugger compile events")
467 DEFINE_bool(debug_script_collected_events, false,
468             "Enable debugger script collected events")
469 #else
470 DEFINE_bool(debug_compile_events, true, "Enable debugger compile events")
471 DEFINE_bool(debug_script_collected_events, true,
472             "Enable debugger script collected events")
473 #endif
474
475
476 //
477 // GDB JIT integration flags.
478 //
479
480 DEFINE_bool(gdbjit, false, "enable GDBJIT interface (disables compacting GC)")
481 DEFINE_bool(gdbjit_full, false, "enable GDBJIT interface for all code objects")
482 DEFINE_bool(gdbjit_dump, false, "dump elf objects with debug info to disk")
483 DEFINE_string(gdbjit_dump_filter, "",
484               "dump only objects containing this substring")
485
486 // mark-compact.cc
487 DEFINE_bool(force_marking_deque_overflows, false,
488             "force overflows of marking deque by reducing it's size "
489             "to 64 words")
490
491 DEFINE_bool(stress_compaction, false,
492             "stress the GC compactor to flush out bugs (implies "
493             "--force_marking_deque_overflows)")
494
495 //
496 // Debug only flags
497 //
498 #undef FLAG
499 #ifdef DEBUG
500 #define FLAG FLAG_FULL
501 #else
502 #define FLAG FLAG_READONLY
503 #endif
504
505 // checks.cc
506 DEFINE_bool(enable_slow_asserts, false,
507             "enable asserts that are slow to execute")
508
509 // codegen-ia32.cc / codegen-arm.cc
510 DEFINE_bool(trace_codegen, false,
511             "print name of functions for which code is generated")
512 DEFINE_bool(print_source, false, "pretty print source code")
513 DEFINE_bool(print_builtin_source, false,
514             "pretty print source code for builtins")
515 DEFINE_bool(print_ast, false, "print source AST")
516 DEFINE_bool(print_builtin_ast, false, "print source AST for builtins")
517 DEFINE_string(stop_at, "", "function name where to insert a breakpoint")
518
519 // compiler.cc
520 DEFINE_bool(print_builtin_scopes, false, "print scopes for builtins")
521 DEFINE_bool(print_scopes, false, "print scopes")
522
523 // contexts.cc
524 DEFINE_bool(trace_contexts, false, "trace contexts operations")
525
526 // heap.cc
527 DEFINE_bool(gc_greedy, false, "perform GC prior to some allocations")
528 DEFINE_bool(gc_verbose, false, "print stuff during garbage collection")
529 DEFINE_bool(heap_stats, false, "report heap statistics before and after GC")
530 DEFINE_bool(code_stats, false, "report code statistics after GC")
531 DEFINE_bool(verify_heap, false, "verify heap pointers before and after GC")
532 DEFINE_bool(print_handles, false, "report handles after GC")
533 DEFINE_bool(print_global_handles, false, "report global handles after GC")
534
535 // ic.cc
536 DEFINE_bool(trace_ic, false, "trace inline cache state transitions")
537
538 // interface.cc
539 DEFINE_bool(print_interfaces, false, "print interfaces")
540 DEFINE_bool(print_interface_details, false, "print interface inference details")
541 DEFINE_int(print_interface_depth, 5, "depth for printing interfaces")
542
543 // objects.cc
544 DEFINE_bool(trace_normalization,
545             false,
546             "prints when objects are turned into dictionaries.")
547
548 // runtime.cc
549 DEFINE_bool(trace_lazy, false, "trace lazy compilation")
550
551 // spaces.cc
552 DEFINE_bool(collect_heap_spill_statistics, false,
553             "report heap spill statistics along with heap_stats "
554             "(requires heap_stats)")
555
556 DEFINE_bool(trace_isolates, false, "trace isolate state changes")
557
558 // VM state
559 DEFINE_bool(log_state_changes, false, "Log state changes.")
560
561 // Regexp
562 DEFINE_bool(regexp_possessive_quantifier,
563             false,
564             "enable possessive quantifier syntax for testing")
565 DEFINE_bool(trace_regexp_bytecodes, false, "trace regexp bytecode execution")
566 DEFINE_bool(trace_regexp_assembler,
567             false,
568             "trace regexp macro assembler calls.")
569
570 //
571 // Logging and profiling flags
572 //
573 #undef FLAG
574 #define FLAG FLAG_FULL
575
576 // log.cc
577 DEFINE_bool(log, false,
578             "Minimal logging (no API, code, GC, suspect, or handles samples).")
579 DEFINE_bool(log_all, false, "Log all events to the log file.")
580 DEFINE_bool(log_runtime, false, "Activate runtime system %Log call.")
581 DEFINE_bool(log_api, false, "Log API events to the log file.")
582 DEFINE_bool(log_code, false,
583             "Log code events to the log file without profiling.")
584 DEFINE_bool(log_gc, false,
585             "Log heap samples on garbage collection for the hp2ps tool.")
586 DEFINE_bool(log_handles, false, "Log global handle events.")
587 DEFINE_bool(log_snapshot_positions, false,
588             "log positions of (de)serialized objects in the snapshot.")
589 DEFINE_bool(log_suspect, false, "Log suspect operations.")
590 DEFINE_bool(prof, false,
591             "Log statistical profiling information (implies --log-code).")
592 DEFINE_bool(prof_auto, true,
593             "Used with --prof, starts profiling automatically")
594 DEFINE_bool(prof_lazy, false,
595             "Used with --prof, only does sampling and logging"
596             " when profiler is active (implies --noprof_auto).")
597 DEFINE_bool(prof_browser_mode, true,
598             "Used with --prof, turns on browser-compatible mode for profiling.")
599 DEFINE_bool(log_regexp, false, "Log regular expression execution.")
600 DEFINE_bool(sliding_state_window, false,
601             "Update sliding state window counters.")
602 DEFINE_string(logfile, "v8.log", "Specify the name of the log file.")
603 DEFINE_bool(ll_prof, false, "Enable low-level linux profiler.")
604
605 //
606 // Disassembler only flags
607 //
608 #undef FLAG
609 #ifdef ENABLE_DISASSEMBLER
610 #define FLAG FLAG_FULL
611 #else
612 #define FLAG FLAG_READONLY
613 #endif
614
615 // elements.cc
616 DEFINE_bool(trace_elements_transitions, false, "trace elements transitions")
617
618 // code-stubs.cc
619 DEFINE_bool(print_code_stubs, false, "print code stubs")
620 DEFINE_bool(test_secondary_stub_cache,
621             false,
622             "test secondary stub cache by disabling the primary one")
623
624 DEFINE_bool(test_primary_stub_cache,
625             false,
626             "test primary stub cache by disabling the secondary one")
627
628 // codegen-ia32.cc / codegen-arm.cc
629 DEFINE_bool(print_code, false, "print generated code")
630 DEFINE_bool(print_opt_code, false, "print optimized code")
631 DEFINE_bool(print_unopt_code, false, "print unoptimized code before "
632             "printing optimized code based on it")
633 DEFINE_bool(print_code_verbose, false, "print more information for code")
634 DEFINE_bool(print_builtin_code, false, "print generated code for builtins")
635
636 #ifdef ENABLE_DISASSEMBLER
637 DEFINE_bool(print_all_code, false, "enable all flags related to printing code")
638 DEFINE_implication(print_all_code, print_code)
639 DEFINE_implication(print_all_code, print_opt_code)
640 DEFINE_implication(print_all_code, print_unopt_code)
641 DEFINE_implication(print_all_code, print_code_verbose)
642 DEFINE_implication(print_all_code, print_builtin_code)
643 DEFINE_implication(print_all_code, print_code_stubs)
644 DEFINE_implication(print_all_code, code_comments)
645 #ifdef DEBUG
646 DEFINE_implication(print_all_code, trace_codegen)
647 #endif
648 #endif
649
650 // Cleanup...
651 #undef FLAG_FULL
652 #undef FLAG_READONLY
653 #undef FLAG
654
655 #undef DEFINE_bool
656 #undef DEFINE_int
657 #undef DEFINE_string
658 #undef DEFINE_implication
659
660 #undef FLAG_MODE_DECLARE
661 #undef FLAG_MODE_DEFINE
662 #undef FLAG_MODE_DEFINE_DEFAULTS
663 #undef FLAG_MODE_META
664 #undef FLAG_MODE_DEFINE_IMPLICATIONS