Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 229 lines (179 sloc) 8.367 kB
37dc489 Add real Configuration infrastructure
Evan Phoenix authored
1 #ifndef RBX_CONFIGURATION_HPP
2 #define RBX_CONFIGURATION_HPP
3
4 #include "util/configuration.hpp"
5
6 namespace rubinius {
7 class Configuration : public config::Configuration {
8 public:
9 // GC
b0bf4fc @evanphx Increase the malloc threshold to 100M
evanphx authored
10 config::Bytes gc_bytes;
11 config::Bytes gc_large_object;
37dc489 Add real Configuration infrastructure
Evan Phoenix authored
12 config::Integer gc_lifetime;
f080f9a Add generation lifetime autotuning
Evan Phoenix authored
13 config::Bool gc_autotune;
c1c20f7 Minor reformat
Evan Phoenix authored
14 config::Bool gc_show;
e99908e Add -Xgc.immix.debug and streamline immix marking
Evan Phoenix authored
15 config::Bool gc_immix_debug;
e4daf0a Add -Xgc.honor_start to control if GC.start is honored
Evan Phoenix authored
16 config::Bool gc_honor_start;
b70d0be Add ivar detection and automatic packed ivars
Evan Phoenix authored
17 config::Bool gc_autopack;
b0bf4fc @evanphx Increase the malloc threshold to 100M
evanphx authored
18 config::Bytes gc_marksweep_threshold;
19 config::Bytes gc_malloc_threshold;
37dc489 Add real Configuration infrastructure
Evan Phoenix authored
20
21 // JIT/Interpreter
0de71f8 Handle breaking out of a block, enhance rbx.jit.dump_code
Evan Phoenix authored
22 config::Integer jit_dump_code;
e53284c Wire background compiling thread into JIT mode
Evan Phoenix authored
23 config::Integer jit_call_til_compile;
24 config::Integer jit_max_method_size;
c1c20f7 Minor reformat
Evan Phoenix authored
25 config::Bool jit_show_compiling;
94c725b Add flag for enabling profiling of JITd methods
Evan Phoenix authored
26 config::Bool jit_profile;
ca6b0f8 Add generic method inlining support! -Xjit.inline.generic
Evan Phoenix authored
27 config::Bool jit_inline_generic;
28 config::Bool jit_inline_debug;
40bfc03 Add ability to inline blocks into their creation scope
Evan Phoenix authored
29 config::Bool jit_inline_blocks;
449dee7 Add -Xjit.log to control where jit debug info goes
Evan Phoenix authored
30 config::String jit_log;
2ad580f Cleanup some jit config options
Evan Phoenix authored
31 config::Bool jit_disabled;
94817d4 Delete IR after JIT'ing unless -Xjit.debug
Evan Phoenix authored
32 config::Bool jit_debug;
5a39cd0 Add -Xjit.sync, Inliner::fixnum_le, and self recursion cuteness
Evan Phoenix authored
33 config::Bool jit_sync;
8969894 Introduce deoptimization on too many uncommon branches
Evan Phoenix authored
34 config::Bool jit_show_uncommon;
268250b @qmx externalizing deoptimize setting
qmx authored
35 config::Integer jit_deoptimize_threshold;
b3ca6bb Add some code to aid in debug JITd code being destroyed
Evan Phoenix authored
36 config::Bool jit_show_remove;
7e97a1c Support switching a method from JIT to debugging interpreter
Evan Phoenix authored
37 config::Bool jit_check_debugging;
97b26a2 Add -XJ flag to enable best JIT settings
Evan Phoenix authored
38
73fb486 Introduce tooling API, convert profiler to it.
Evan Phoenix authored
39 // Tools
40 config::String tool_to_load;
41
7d84029 Flush/update CAPI handles better. Fixes #455.
Evan Phoenix authored
42 // CAPI
43 config::Bool capi_global_flush;
44
ff881b8 Started query agent, mainly just groundwork thus far
Evan Phoenix authored
45 // Query Agent
46 config::Integer qa_port;
47 config::Bool qa_verbose;
0051012 Allow loopback agent to bind to a TCP port
Evan Phoenix authored
48 config::String qa_tmpdir;
ff881b8 Started query agent, mainly just groundwork thus far
Evan Phoenix authored
49
37dc489 Add real Configuration infrastructure
Evan Phoenix authored
50 // Debug
e53284c Wire background compiling thread into JIT mode
Evan Phoenix authored
51 config::Bool gil_debug;
c1c20f7 Minor reformat
Evan Phoenix authored
52 config::Integer print_config;
66c60d8 Fix up IC profiling, add -Xic.stats
Evan Phoenix authored
53 config::Bool ic_stats;
b69787a Introduce -Xprofile to be used instead of -P
Evan Phoenix authored
54 config::Bool profile;
5beb5e3 Switch to memory friendly Node tree for profiler
Evan Phoenix authored
55 config::Integer profiler_threshold;
c92cb3d Add 'rbx report' and support for VM and ruby crashes
Evan Phoenix authored
56 config::String report_path;
37dc489 Add real Configuration infrastructure
Evan Phoenix authored
57
58 // defaults
59 static const int default_gc_bytes = 1048576 * 3;
40f52a5 @evanphx Boost the LO threshold to 50k
evanphx authored
60 static const int default_gc_large_object = 50 * 1024;
f080f9a Add generation lifetime autotuning
Evan Phoenix authored
61 static const int default_gc_lifetime = 3;
05a420e @evanphx Add ability to set the marksweep allocation threshold
evanphx authored
62 static const int default_gc_marksweep_threshold = (10 * 1024 * 1024);
63
0de71f8 Handle breaking out of a block, enhance rbx.jit.dump_code
Evan Phoenix authored
64 static const int default_jit_dump_code = 0;
f0dfede Bump up the call_til_compile to a sane number (found via profiling)
Evan Phoenix authored
65 static const int default_jit_call_til_compile = 4000;
e53284c Wire background compiling thread into JIT mode
Evan Phoenix authored
66 static const int default_jit_max_method_size = 2048;
268250b @qmx externalizing deoptimize setting
qmx authored
67 // 500 is a number picked after doing some tuning on a specific benchmark.
68 // Not sure if it's the right value, but it seems to work fine.
69 static const int default_jit_deoptimize_threshold = 500;
f080f9a Add generation lifetime autotuning
Evan Phoenix authored
70 static const bool default_jit_on = true;
71 static const bool default_gc_autotune = true;
b0bf4fc @evanphx Increase the malloc threshold to 100M
evanphx authored
72 static const int default_gc_malloc_threshold = 104857600;
37dc489 Add real Configuration infrastructure
Evan Phoenix authored
73
74 Configuration()
c1c20f7 Minor reformat
Evan Phoenix authored
75 : gc_bytes(this, "gc.bytes", default_gc_bytes)
76 , gc_large_object(this, "gc.large_object", default_gc_large_object)
77 , gc_lifetime(this, "gc.lifetime", default_gc_lifetime)
f080f9a Add generation lifetime autotuning
Evan Phoenix authored
78 , gc_autotune(this, "gc.autotune", default_gc_autotune)
c1c20f7 Minor reformat
Evan Phoenix authored
79 , gc_show(this, "gc.show")
e99908e Add -Xgc.immix.debug and streamline immix marking
Evan Phoenix authored
80 , gc_immix_debug(this, "gc.immix.debug")
e4daf0a Add -Xgc.honor_start to control if GC.start is honored
Evan Phoenix authored
81 , gc_honor_start(this, "gc.honor_start", false)
e92fc82 Enable gc.autopack by default
Evan Phoenix authored
82 , gc_autopack(this, "gc.autopack", true)
05a420e @evanphx Add ability to set the marksweep allocation threshold
evanphx authored
83 , gc_marksweep_threshold(this, "gc.marksweep_threshold",
84 default_gc_marksweep_threshold)
e4daf0a Add -Xgc.honor_start to control if GC.start is honored
Evan Phoenix authored
85
b0bf4fc @evanphx Increase the malloc threshold to 100M
evanphx authored
86 , gc_malloc_threshold(this, "gc.malloc_threshold",
87 default_gc_malloc_threshold)
88
e53284c Wire background compiling thread into JIT mode
Evan Phoenix authored
89 , jit_dump_code(this, "jit.dump_code", default_jit_dump_code)
90 , jit_call_til_compile(this, "jit.call_til_compile",
91 default_jit_call_til_compile)
92 , jit_max_method_size(this, "jit.max_method_size",
93 default_jit_max_method_size)
94 , jit_show_compiling(this, "jit.show")
94c725b Add flag for enabling profiling of JITd methods
Evan Phoenix authored
95 , jit_profile(this, "jit.profile")
18ca548 JIT is now on by default, use -Xint to disable it
Evan Phoenix authored
96 , jit_inline_generic(this, "jit.inline.generic", true)
f997d3f Increase restrictions on block inlining, enable it by default
Evan Phoenix authored
97 , jit_inline_debug(this, "jit.inline.debug", false)
98 , jit_inline_blocks(this, "jit.inline.blocks", true)
449dee7 Add -Xjit.log to control where jit debug info goes
Evan Phoenix authored
99 , jit_log(this, "jit.log")
2ad580f Cleanup some jit config options
Evan Phoenix authored
100 , jit_disabled(this, "int")
94817d4 Delete IR after JIT'ing unless -Xjit.debug
Evan Phoenix authored
101 , jit_debug(this, "jit.debug", false)
5a39cd0 Add -Xjit.sync, Inliner::fixnum_le, and self recursion cuteness
Evan Phoenix authored
102 , jit_sync(this, "jit.sync", false)
8969894 Introduce deoptimization on too many uncommon branches
Evan Phoenix authored
103 , jit_show_uncommon(this, "jit.uncommon.print", false)
268250b @qmx externalizing deoptimize setting
qmx authored
104 , jit_deoptimize_threshold(this, "jit.deoptimize_threshold", default_jit_deoptimize_threshold)
b3ca6bb Add some code to aid in debug JITd code being destroyed
Evan Phoenix authored
105 , jit_show_remove(this, "jit.removal.print", false)
7e97a1c Support switching a method from JIT to debugging interpreter
Evan Phoenix authored
106 , jit_check_debugging(this, "jit.check_debugging", false)
107
73fb486 Introduce tooling API, convert profiler to it.
Evan Phoenix authored
108 , tool_to_load(this, "tool")
109
7d84029 Flush/update CAPI handles better. Fixes #455.
Evan Phoenix authored
110 , capi_global_flush(this, "capi.global_flush", false)
111
8a4758c Rename agent.port to agent.start
Evan Phoenix authored
112 , qa_port(this, "agent.start")
ff881b8 Started query agent, mainly just groundwork thus far
Evan Phoenix authored
113 , qa_verbose(this, "agent.verbose")
0051012 Allow loopback agent to bind to a TCP port
Evan Phoenix authored
114 , qa_tmpdir(this, "agent.tmpdir")
e53284c Wire background compiling thread into JIT mode
Evan Phoenix authored
115 , gil_debug(this, "vm.gil.debug")
c1c20f7 Minor reformat
Evan Phoenix authored
116 , print_config(this, "config.print")
66c60d8 Fix up IC profiling, add -Xic.stats
Evan Phoenix authored
117 , ic_stats(this, "ic.stats")
b69787a Introduce -Xprofile to be used instead of -P
Evan Phoenix authored
118 , profile(this, "profile")
5beb5e3 Switch to memory friendly Node tree for profiler
Evan Phoenix authored
119 , profiler_threshold(this, "profiler.threshold", 1000000)
c92cb3d Add 'rbx report' and support for VM and ruby crashes
Evan Phoenix authored
120 , report_path(this, "vm.crash_report_path")
2bc8d00 Add descriptions to config variables
Evan Phoenix authored
121 {
122 gc_bytes.set_description(
123 "The number of bytes the young generation of the GC should use");
c1c20f7 Minor reformat
Evan Phoenix authored
124
2bc8d00 Add descriptions to config variables
Evan Phoenix authored
125 gc_large_object.set_description(
126 "The size (in bytes) of the large object threshold");
c1c20f7 Minor reformat
Evan Phoenix authored
127
2bc8d00 Add descriptions to config variables
Evan Phoenix authored
128 gc_lifetime.set_description(
5de0944 @czarneckid Spelling error fix and changed to JITd to be consistent with all othe…
czarneckid authored
129 "How many young GC cycles an object lives before promotion");
c1c20f7 Minor reformat
Evan Phoenix authored
130
f080f9a Add generation lifetime autotuning
Evan Phoenix authored
131 gc_autotune.set_description(
132 "Set whether or not the GC should adjust itself for performance");
133
e4daf0a Add -Xgc.honor_start to control if GC.start is honored
Evan Phoenix authored
134 gc_honor_start.set_description(
135 "Control whether or not GC.start is honored when called");
136
b70d0be Add ivar detection and automatic packed ivars
Evan Phoenix authored
137 gc_autopack.set_description(
138 "Set whether or not objects should be backed tightly in memory");
139
05a420e @evanphx Add ability to set the marksweep allocation threshold
evanphx authored
140 gc_marksweep_threshold.set_description(
141 "The number of bytes allocated before the marksweep GC region is collected");
b0bf4fc @evanphx Increase the malloc threshold to 100M
evanphx authored
142 gc_malloc_threshold.set_description(
143 "How many bytes allocated by C extensions til the GC is run");
05a420e @evanphx Add ability to set the marksweep allocation threshold
evanphx authored
144
2bc8d00 Add descriptions to config variables
Evan Phoenix authored
145 jit_dump_code.set_description(
146 "1 == show simple IR, 2 == show optimized IR, 4 == show machine code");
c1c20f7 Minor reformat
Evan Phoenix authored
147
2bc8d00 Add descriptions to config variables
Evan Phoenix authored
148 jit_call_til_compile.set_description(
149 "How many times a method is called before the JIT is run on it");
c1c20f7 Minor reformat
Evan Phoenix authored
150
2bc8d00 Add descriptions to config variables
Evan Phoenix authored
151 jit_max_method_size.set_description(
152 "The max size of a method that will be JIT");
c1c20f7 Minor reformat
Evan Phoenix authored
153
2bc8d00 Add descriptions to config variables
Evan Phoenix authored
154 jit_show_compiling.set_description(
155 "Print out a status message when the JIT is operating");
c1c20f7 Minor reformat
Evan Phoenix authored
156
94c725b Add flag for enabling profiling of JITd methods
Evan Phoenix authored
157 jit_profile.set_description(
158 "The JIT will emit code to be sure JITd methods can be profile");
159
ca6b0f8 Add generic method inlining support! -Xjit.inline.generic
Evan Phoenix authored
160 jit_inline_generic.set_description(
161 "Have the JIT inline generic methods");
162
163 jit_inline_debug.set_description(
164 "Have the JIT print out information about inlining");
165
40bfc03 Add ability to inline blocks into their creation scope
Evan Phoenix authored
166 jit_inline_blocks.set_description(
167 "Have the JIT try and inline methods and their literal blocks");
168
449dee7 Add -Xjit.log to control where jit debug info goes
Evan Phoenix authored
169 jit_log.set_description(
170 "Send JIT debugging output to this file rather than stdout");
171
2ad580f Cleanup some jit config options
Evan Phoenix authored
172 jit_disabled.set_description(
18ca548 JIT is now on by default, use -Xint to disable it
Evan Phoenix authored
173 "Force the JIT to never turn on");
174
5a39cd0 Add -Xjit.sync, Inliner::fixnum_le, and self recursion cuteness
Evan Phoenix authored
175 jit_sync.set_description(
176 "Wait for the JIT to finish compiling each method");
177
b3ca6bb Add some code to aid in debug JITd code being destroyed
Evan Phoenix authored
178 jit_show_uncommon.set_description(
179 "Print out information on when methods are deoptimized due to uncommon traps");
180
181 jit_show_remove.set_description(
182 "Print out whenever the JIT is removing unused code");
183
7e97a1c Support switching a method from JIT to debugging interpreter
Evan Phoenix authored
184 jit_check_debugging.set_description(
5de0944 @czarneckid Spelling error fix and changed to JITd to be consistent with all othe…
czarneckid authored
185 "Allow JITd methods to deoptimize if there is a debugging request");
7e97a1c Support switching a method from JIT to debugging interpreter
Evan Phoenix authored
186
7d84029 Flush/update CAPI handles better. Fixes #455.
Evan Phoenix authored
187 capi_global_flush.set_description(
188 "Flush all CAPI handles at CAPI call boundaries");
189
94c725b Add flag for enabling profiling of JITd methods
Evan Phoenix authored
190 print_config.set_description(
191 "blank or 1 == names and values, 2 == description as well");
192
2bc8d00 Add descriptions to config variables
Evan Phoenix authored
193 gil_debug.set_description(
194 "Print out debugging when the GIL is locked/unlocked");
c1c20f7 Minor reformat
Evan Phoenix authored
195
2bc8d00 Add descriptions to config variables
Evan Phoenix authored
196 gc_show.set_description(
197 "Print out whenever the GC runs");
66c60d8 Fix up IC profiling, add -Xic.stats
Evan Phoenix authored
198
e99908e Add -Xgc.immix.debug and streamline immix marking
Evan Phoenix authored
199 gc_immix_debug.set_description(
200 "Print out collection stats when the Immix collector finishes");
201
66c60d8 Fix up IC profiling, add -Xic.stats
Evan Phoenix authored
202 ic_stats.set_description(
203 "Print out stats about the InlineCaches before exiting");
ff881b8 Started query agent, mainly just groundwork thus far
Evan Phoenix authored
204
205 qa_port.set_description(
8a4758c Rename agent.port to agent.start
Evan Phoenix authored
206 "Start the QueryAgent on a TCP port. Default port is a random port");
ff881b8 Started query agent, mainly just groundwork thus far
Evan Phoenix authored
207
208 qa_verbose.set_description(
209 "Whether or not the query agent should print out status to stderr");
b69787a Introduce -Xprofile to be used instead of -P
Evan Phoenix authored
210
0051012 Allow loopback agent to bind to a TCP port
Evan Phoenix authored
211 qa_tmpdir.set_description(
212 "Where to store files used to discover running query agents");
213
b69787a Introduce -Xprofile to be used instead of -P
Evan Phoenix authored
214 profile.set_description(
215 "Configure the system to profile ruby code");
c92cb3d Add 'rbx report' and support for VM and ruby crashes
Evan Phoenix authored
216
5beb5e3 Switch to memory friendly Node tree for profiler
Evan Phoenix authored
217 profiler_threshold.set_description(
218 "The mininum number of nanoseconds a profiler node must have to be reported");
219
c92cb3d Add 'rbx report' and support for VM and ruby crashes
Evan Phoenix authored
220 report_path.set_description(
221 "Set a custom path to write crash reports");
b69787a Introduce -Xprofile to be used instead of -P
Evan Phoenix authored
222 }
223
8133e09 Tooling can be enabled anytime, anywhere.
Evan Phoenix authored
224 void finalize() { }
37dc489 Add real Configuration infrastructure
Evan Phoenix authored
225 };
226 }
227
228 #endif
Something went wrong with that request. Please try again.