OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef RUNTIME_VM_FLAG_LIST_H_ | 5 #ifndef RUNTIME_VM_FLAG_LIST_H_ |
6 #define RUNTIME_VM_FLAG_LIST_H_ | 6 #define RUNTIME_VM_FLAG_LIST_H_ |
7 | 7 |
8 // Don't use USING_DBC outside of this file. | 8 // Don't use USING_DBC outside of this file. |
9 #if defined(TARGET_ARCH_DBC) | 9 #if defined(TARGET_ARCH_DBC) |
10 #define USING_DBC true | 10 #define USING_DBC true |
(...skipping 23 matching lines...) Expand all Loading... |
34 // enabled. | 34 // enabled. |
35 // * pre C ompile flags: Generally available flags except when building product | 35 // * pre C ompile flags: Generally available flags except when building product |
36 // or precompiled runtime. | 36 // or precompiled runtime. |
37 // | 37 // |
38 // Usage: | 38 // Usage: |
39 // P(name, type, default_value, comment) | 39 // P(name, type, default_value, comment) |
40 // R(name, product_value, type, default_value, comment) | 40 // R(name, product_value, type, default_value, comment) |
41 // D(name, type, default_value, comment) | 41 // D(name, type, default_value, comment) |
42 // C(name, precompiled_value, product_value, type, default_value, comment) | 42 // C(name, precompiled_value, product_value, type, default_value, comment) |
43 #define FLAG_LIST(P, R, D, C) \ | 43 #define FLAG_LIST(P, R, D, C) \ |
44 P(background_compilation, bool, USING_MULTICORE, \ | 44 P(background_compilation, bool, USING_MULTICORE, \ |
45 "Run optimizing compilation in background") \ | 45 "Run optimizing compilation in background") \ |
46 R(background_compilation_stop_alot, false, bool, false, \ | 46 R(background_compilation_stop_alot, false, bool, false, \ |
47 "Stress test system: stop background compiler often.") \ | 47 "Stress test system: stop background compiler often.") \ |
48 P(background_finalization, bool, USING_MULTICORE, \ | 48 P(background_finalization, bool, USING_MULTICORE, \ |
49 "Run weak handle finalizers in background") \ | 49 "Run weak handle finalizers in background") \ |
50 R(break_at_isolate_spawn, false, bool, false, \ | 50 R(break_at_isolate_spawn, false, bool, false, \ |
51 "Insert a one-time breakpoint at the entrypoint for all spawned isolates") \ | 51 "Insert a one-time breakpoint at the entrypoint for all spawned isolates") \ |
52 C(collect_code, false, true, bool, true, \ | 52 C(collect_code, false, true, bool, true, \ |
53 "Attempt to GC infrequently used code.") \ | 53 "Attempt to GC infrequently used code.") \ |
54 P(collect_dynamic_function_names, bool, true, \ | 54 P(collect_dynamic_function_names, bool, true, \ |
55 "Collects all dynamic function names to identify unique targets") \ | 55 "Collects all dynamic function names to identify unique targets") \ |
56 R(concurrent_sweep, USING_MULTICORE, bool, USING_MULTICORE, \ | 56 R(concurrent_sweep, USING_MULTICORE, bool, USING_MULTICORE, \ |
57 "Concurrent sweep for old generation.") \ | 57 "Concurrent sweep for old generation.") \ |
58 R(dedup_instructions, true, bool, false, \ | 58 R(dedup_instructions, true, bool, false, \ |
59 "Canonicalize instructions when precompiling.") \ | 59 "Canonicalize instructions when precompiling.") \ |
60 C(deoptimize_alot, false, false, bool, false, \ | 60 C(deoptimize_alot, false, false, bool, false, \ |
61 "Deoptimizes we are about to return to Dart code from native entries.") \ | 61 "Deoptimizes we are about to return to Dart code from native entries.") \ |
62 C(deoptimize_every, 0, 0, int, 0, \ | 62 C(deoptimize_every, 0, 0, int, 0, \ |
63 "Deoptimize on every N stack overflow checks") \ | 63 "Deoptimize on every N stack overflow checks") \ |
64 R(disable_alloc_stubs_after_gc, false, bool, false, \ | 64 R(disable_alloc_stubs_after_gc, false, bool, false, "Stress testing flag.") \ |
65 "Stress testing flag.") \ | 65 R(disassemble, false, bool, false, "Disassemble dart code.") \ |
66 R(disassemble, false, bool, false, \ | 66 R(disassemble_optimized, false, bool, false, "Disassemble optimized code.") \ |
67 "Disassemble dart code.") \ | 67 R(dump_megamorphic_stats, false, bool, false, \ |
68 R(disassemble_optimized, false, bool, false, \ | 68 "Dump megamorphic cache statistics") \ |
69 "Disassemble optimized code.") \ | 69 R(dump_symbol_stats, false, bool, false, "Dump symbol table statistics") \ |
70 R(dump_megamorphic_stats, false, bool, false, \ | 70 R(enable_asserts, false, bool, false, "Enable assert statements.") \ |
71 "Dump megamorphic cache statistics") \ | 71 C(enable_mirrors, false, false, bool, true, \ |
72 R(dump_symbol_stats, false, bool, false, \ | 72 "Disable to make importing dart:mirrors an error.") \ |
73 "Dump symbol table statistics") \ | 73 R(enable_type_checks, false, bool, false, "Enable type checks.") \ |
74 R(enable_asserts, false, bool, false, \ | 74 R(error_on_bad_override, false, bool, false, \ |
75 "Enable assert statements.") \ | 75 "Report error for bad overrides.") \ |
76 C(enable_mirrors, false, false, bool, true, \ | 76 R(error_on_bad_type, false, bool, false, \ |
77 "Disable to make importing dart:mirrors an error.") \ | 77 "Report error for malformed types.") \ |
78 R(enable_type_checks, false, bool, false, \ | 78 P(external_max_size, int, (kWordSize <= 4) ? 512 : 1024, \ |
79 "Enable type checks.") \ | 79 "Max total size of external allocations in MB, or 0 for unlimited," \ |
80 R(error_on_bad_override, false, bool, false, \ | 80 "e.g: --external_max_size=1024 allows up to 1024MB of externals") \ |
81 "Report error for bad overrides.") \ | 81 P(fields_may_be_reset, bool, false, \ |
82 R(error_on_bad_type, false, bool, false, \ | 82 "Don't optimize away static field initialization") \ |
83 "Report error for malformed types.") \ | 83 C(force_clone_compiler_objects, false, false, bool, false, \ |
84 P(external_max_size, int, (kWordSize <= 4) ? 512 : 1024, \ | 84 "Force cloning of objects needed in compiler (ICData and Field).") \ |
85 "Max total size of external allocations in MB, or 0 for unlimited," \ | 85 R(gc_at_alloc, false, bool, false, "GC at every allocation.") \ |
86 "e.g: --external_max_size=1024 allows up to 1024MB of externals") \ | 86 P(getter_setter_ratio, int, 13, \ |
87 P(fields_may_be_reset, bool, false, \ | 87 "Ratio of getter/setter usage used for double field unboxing heuristics") \ |
88 "Don't optimize away static field initialization") \ | 88 P(guess_icdata_cid, bool, true, \ |
89 C(force_clone_compiler_objects, false, false, bool, false, \ | 89 "Artificially create type feedback for arithmetic etc. operations") \ |
90 "Force cloning of objects needed in compiler (ICData and Field).") \ | 90 P(huge_method_cutoff_in_tokens, int, 20000, \ |
91 R(gc_at_alloc, false, bool, false, \ | 91 "Huge method cutoff in tokens: Disables optimizations for huge methods.") \ |
92 "GC at every allocation.") \ | 92 P(interpret_irregexp, bool, USING_DBC, "Use irregexp bytecode interpreter") \ |
93 P(getter_setter_ratio, int, 13, \ | 93 P(lazy_dispatchers, bool, true, "Generate dispatchers lazily") \ |
94 "Ratio of getter/setter usage used for double field unboxing heuristics") \ | 94 P(link_natives_lazily, bool, false, "Link native calls lazily") \ |
95 P(guess_icdata_cid, bool, true, \ | 95 C(load_deferred_eagerly, true, true, bool, false, \ |
96 "Artificially create type feedback for arithmetic etc. operations") \ | 96 "Load deferred libraries eagerly.") \ |
97 P(huge_method_cutoff_in_tokens, int, 20000, \ | 97 R(log_marker_tasks, false, bool, false, \ |
98 "Huge method cutoff in tokens: Disables optimizations for huge methods.") \ | 98 "Log debugging information for old gen GC marking tasks.") \ |
99 P(interpret_irregexp, bool, USING_DBC, \ | 99 R(marker_tasks, USING_MULTICORE ? 2 : 0, int, USING_MULTICORE ? 2 : 0, \ |
100 "Use irregexp bytecode interpreter") \ | 100 "The number of tasks to spawn during old gen GC marking (0 means " \ |
101 P(lazy_dispatchers, bool, true, \ | 101 "perform all marking on main thread).") \ |
102 "Generate dispatchers lazily") \ | 102 P(max_polymorphic_checks, int, 4, \ |
103 P(link_natives_lazily, bool, false, \ | 103 "Maximum number of polymorphic check, otherwise it is megamorphic.") \ |
104 "Link native calls lazily") \ | 104 P(max_equality_polymorphic_checks, int, 32, \ |
105 C(load_deferred_eagerly, true, true, bool, false, \ | 105 "Maximum number of polymorphic checks in equality operator,") \ |
106 "Load deferred libraries eagerly.") \ | 106 P(merge_sin_cos, bool, false, "Merge sin/cos into sincos") \ |
107 R(log_marker_tasks, false, bool, false, \ | 107 P(new_gen_ext_limit, int, 64, \ |
108 "Log debugging information for old gen GC marking tasks.") \ | 108 "maximum total external size (MB) in new gen before triggering GC") \ |
109 R(marker_tasks, USING_MULTICORE ? 2 : 0, int, USING_MULTICORE ? 2 : 0, \ | 109 P(new_gen_semi_max_size, int, (kWordSize <= 4) ? 16 : 32, \ |
110 "The number of tasks to spawn during old gen GC marking (0 means " \ | 110 "Max size of new gen semi space in MB") \ |
111 "perform all marking on main thread).") \ | 111 P(optimization_counter_threshold, int, 30000, \ |
112 P(max_polymorphic_checks, int, 4, \ | 112 "Function's usage-counter value before it is optimized, -1 means never") \ |
113 "Maximum number of polymorphic check, otherwise it is megamorphic.") \ | 113 P(old_gen_heap_size, int, (kWordSize <= 4) ? 1536 : 0, \ |
114 P(max_equality_polymorphic_checks, int, 32, \ | 114 "Max size of old gen heap size in MB, or 0 for unlimited," \ |
115 "Maximum number of polymorphic checks in equality operator,") \ | 115 "e.g: --old_gen_heap_size=1024 allows up to 1024MB old gen heap") \ |
116 P(merge_sin_cos, bool, false, \ | 116 R(pause_isolates_on_start, false, bool, false, \ |
117 "Merge sin/cos into sincos") \ | 117 "Pause isolates before starting.") \ |
118 P(new_gen_ext_limit, int, 64, \ | 118 R(pause_isolates_on_exit, false, bool, false, "Pause isolates exiting.") \ |
119 "maximum total external size (MB) in new gen before triggering GC") \ | 119 R(pause_isolates_on_unhandled_exceptions, false, bool, false, \ |
120 P(new_gen_semi_max_size, int, (kWordSize <= 4) ? 16 : 32, \ | 120 "Pause isolates on unhandled exceptions.") \ |
121 "Max size of new gen semi space in MB") \ | 121 P(polymorphic_with_deopt, bool, true, \ |
122 P(optimization_counter_threshold, int, 30000, \ | 122 "Polymorphic calls with deoptimization / megamorphic call") \ |
123 "Function's usage-counter value before it is optimized, -1 means never") \ | 123 P(precompiled_mode, bool, false, "Precompilation compiler mode") \ |
124 P(old_gen_heap_size, int, (kWordSize <= 4) ? 1536 : 0, \ | 124 C(precompiled_runtime, true, false, bool, false, "Precompiled runtime mode") \ |
125 "Max size of old gen heap size in MB, or 0 for unlimited," \ | 125 R(print_ssa_liveranges, false, bool, false, \ |
126 "e.g: --old_gen_heap_size=1024 allows up to 1024MB old gen heap") \ | 126 "Print live ranges after allocation.") \ |
127 R(pause_isolates_on_start, false, bool, false, \ | 127 C(print_stop_message, false, false, bool, false, "Print stop message.") \ |
128 "Pause isolates before starting.") \ | 128 D(print_variable_descriptors, bool, false, \ |
129 R(pause_isolates_on_exit, false, bool, false, \ | 129 "Print variable descriptors in disassembly.") \ |
130 "Pause isolates exiting.") \ | 130 R(profiler, false, bool, !USING_DBC && !USING_FUCHSIA, \ |
131 R(pause_isolates_on_unhandled_exceptions, false, bool, false, \ | 131 "Enable the profiler.") \ |
132 "Pause isolates on unhandled exceptions.") \ | 132 P(reorder_basic_blocks, bool, true, "Reorder basic blocks") \ |
133 P(polymorphic_with_deopt, bool, true, \ | 133 R(support_ast_printer, false, bool, true, "Support the AST printer.") \ |
134 "Polymorphic calls with deoptimization / megamorphic call") \ | 134 R(support_compiler_stats, false, bool, true, "Support compiler stats.") \ |
135 P(precompiled_mode, bool, false, \ | 135 C(support_debugger, false, false, bool, true, "Support the debugger.") \ |
136 "Precompilation compiler mode") \ | 136 R(support_disassembler, false, bool, true, "Support the disassembler.") \ |
137 C(precompiled_runtime, true, false, bool, false, \ | 137 R(support_il_printer, false, bool, true, "Support the IL printer.") \ |
138 "Precompiled runtime mode") \ | 138 C(support_reload, false, false, bool, true, "Support isolate reload.") \ |
139 R(print_ssa_liveranges, false, bool, false, \ | 139 R(support_service, false, bool, true, "Support the service protocol.") \ |
140 "Print live ranges after allocation.") \ | 140 R(support_timeline, false, bool, true, "Support timeline.") \ |
141 C(print_stop_message, false, false, bool, false, \ | 141 D(trace_cha, bool, false, "Trace CHA operations") \ |
142 "Print stop message.") \ | 142 D(trace_field_guards, bool, false, "Trace changes in field's cids.") \ |
143 D(print_variable_descriptors, bool, false, \ | 143 D(trace_isolates, bool, false, "Trace isolate creation and shut down.") \ |
144 "Print variable descriptors in disassembly.") \ | 144 D(trace_handles, bool, false, "Traces allocation of handles.") \ |
145 R(profiler, false, bool, !USING_DBC && !USING_FUCHSIA, \ | 145 D(trace_kernel_binary, bool, false, "Trace Kernel reader/writer.") \ |
146 "Enable the profiler.") \ | 146 D(trace_optimization, bool, false, "Print optimization details.") \ |
147 P(reorder_basic_blocks, bool, true, \ | 147 R(trace_profiler, false, bool, false, "Profiler trace") \ |
148 "Reorder basic blocks") \ | 148 D(trace_profiler_verbose, bool, false, "Verbose profiler trace") \ |
149 R(support_ast_printer, false, bool, true, \ | 149 D(trace_ssa_allocator, bool, false, "Trace register allocation over SSA.") \ |
150 "Support the AST printer.") \ | 150 D(trace_zones, bool, false, "Traces allocation sizes in the zone.") \ |
151 R(support_compiler_stats, false, bool, true, \ | 151 P(truncating_left_shift, bool, true, \ |
152 "Support compiler stats.") \ | 152 "Optimize left shift to truncate if possible") \ |
153 C(support_debugger, false, false, bool, true, \ | 153 P(use_cha_deopt, bool, true, \ |
154 "Support the debugger.") \ | 154 "Use class hierarchy analysis even if it can cause deoptimization.") \ |
155 R(support_disassembler, false, bool, true, \ | 155 P(use_field_guards, bool, !USING_DBC, \ |
156 "Support the disassembler.") \ | 156 "Use field guards and track field types") \ |
157 R(support_il_printer, false, bool, true, \ | 157 C(use_osr, false, true, bool, true, "Use OSR") \ |
158 "Support the IL printer.") \ | 158 P(verbose_gc, bool, false, "Enables verbose GC.") \ |
159 C(support_reload, false, false, bool, true, \ | 159 P(verbose_gc_hdr, int, 40, "Print verbose GC header interval.") \ |
160 "Support isolate reload.") \ | 160 R(verify_after_gc, false, bool, false, \ |
161 R(support_service, false, bool, true, \ | 161 "Enables heap verification after GC.") \ |
162 "Support the service protocol.") \ | 162 R(verify_before_gc, false, bool, false, \ |
163 R(support_timeline, false, bool, true, \ | 163 "Enables heap verification before GC.") \ |
164 "Support timeline.") \ | 164 D(verify_on_transition, bool, false, "Verify on dart <==> VM.") |
165 D(trace_cha, bool, false, \ | |
166 "Trace CHA operations") \ | |
167 D(trace_field_guards, bool, false, \ | |
168 "Trace changes in field's cids.") \ | |
169 D(trace_isolates, bool, false, \ | |
170 "Trace isolate creation and shut down.") \ | |
171 D(trace_handles, bool, false, \ | |
172 "Traces allocation of handles.") \ | |
173 D(trace_kernel_binary, bool, false, \ | |
174 "Trace Kernel reader/writer.") \ | |
175 D(trace_optimization, bool, false, \ | |
176 "Print optimization details.") \ | |
177 R(trace_profiler, false, bool, false, \ | |
178 "Profiler trace") \ | |
179 D(trace_profiler_verbose, bool, false, \ | |
180 "Verbose profiler trace") \ | |
181 D(trace_ssa_allocator, bool, false, \ | |
182 "Trace register allocation over SSA.") \ | |
183 D(trace_zones, bool, false, \ | |
184 "Traces allocation sizes in the zone.") \ | |
185 P(truncating_left_shift, bool, true, \ | |
186 "Optimize left shift to truncate if possible") \ | |
187 P(use_cha_deopt, bool, true, \ | |
188 "Use class hierarchy analysis even if it can cause deoptimization.") \ | |
189 P(use_field_guards, bool, !USING_DBC, \ | |
190 "Use field guards and track field types") \ | |
191 C(use_osr, false, true, bool, true, \ | |
192 "Use OSR") \ | |
193 P(verbose_gc, bool, false, \ | |
194 "Enables verbose GC.") \ | |
195 P(verbose_gc_hdr, int, 40, \ | |
196 "Print verbose GC header interval.") \ | |
197 R(verify_after_gc, false, bool, false, \ | |
198 "Enables heap verification after GC.") \ | |
199 R(verify_before_gc, false, bool, false, \ | |
200 "Enables heap verification before GC.") \ | |
201 D(verify_on_transition, bool, false, \ | |
202 "Verify on dart <==> VM.") \ | |
203 | 165 |
204 #endif // RUNTIME_VM_FLAG_LIST_H_ | 166 #endif // RUNTIME_VM_FLAG_LIST_H_ |
OLD | NEW |