mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Allow specifying arbitrary MJIT flags by --jit-debug
This is a secret feature for me. It's only for testing and any behavior with this flag override is unsupported. I needed this because I sometimes want to add debug options but do not want to disable optimizations, for using Linux perf.
This commit is contained in:
parent
bdc62dfc8e
commit
a19d625e66
5 changed files with 48 additions and 3 deletions
5
ruby.c
5
ruby.c
|
@ -298,7 +298,7 @@ usage(const char *name, int help)
|
|||
};
|
||||
static const struct message mjit_options[] = {
|
||||
M("--jit-warnings", "", "Enable printing JIT warnings"),
|
||||
M("--jit-debug", "", "Enable JIT debugging (very slow)"),
|
||||
M("--jit-debug", "", "Enable JIT debugging (very slow), or add cflags if specified"),
|
||||
M("--jit-wait", "", "Wait until JIT compilation is finished everytime (for testing)"),
|
||||
M("--jit-save-temps", "", "Save JIT temporary files in $TMP or /tmp (for testing)"),
|
||||
M("--jit-verbose=num", "", "Print JIT logs of level num or less to stderr (default: 0)"),
|
||||
|
@ -969,6 +969,9 @@ setup_mjit_options(const char *s, struct mjit_options *mjit_opt)
|
|||
else if (strcmp(s, "-warnings") == 0) {
|
||||
mjit_opt->warnings = 1;
|
||||
}
|
||||
else if (strncmp(s, "-debug=", 7) == 0) {
|
||||
mjit_opt->debug_flags = strdup(s + 7);
|
||||
}
|
||||
else if (strcmp(s, "-debug") == 0) {
|
||||
mjit_opt->debug = 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue