зеркало из https://github.com/github/ruby.git
Update options available in RJIT
This commit is contained in:
Родитель
00d6772e40
Коммит
1d39d2d334
11
rjit.c
11
rjit.c
|
@ -240,14 +240,11 @@ rjit_setup_options(const char *s, struct rjit_options *rjit_opt)
|
||||||
|
|
||||||
#define M(shortopt, longopt, desc) RUBY_OPT_MESSAGE(shortopt, longopt, desc)
|
#define M(shortopt, longopt, desc) RUBY_OPT_MESSAGE(shortopt, longopt, desc)
|
||||||
const struct ruby_opt_message rjit_option_messages[] = {
|
const struct ruby_opt_message rjit_option_messages[] = {
|
||||||
M("--rjit-warnings", "", "Enable printing JIT warnings"),
|
|
||||||
M("--rjit-debug", "", "Enable JIT debugging (very slow), or add cflags if specified"),
|
|
||||||
M("--rjit-wait", "", "Wait until JIT compilation finishes every time (for testing)"),
|
|
||||||
M("--rjit-save-temps", "", "Save JIT temporary files in $TMP or /tmp (for testing)"),
|
|
||||||
M("--rjit-verbose=num", "", "Print JIT logs of level num or less to stderr (default: 0)"),
|
|
||||||
M("--rjit-max-cache=num", "", "Max number of methods to be JIT-ed in a cache (default: " STRINGIZE(DEFAULT_MAX_CACHE_SIZE) ")"),
|
|
||||||
M("--rjit-call-threshold=num", "", "Number of calls to trigger JIT (for testing, default: " STRINGIZE(DEFAULT_CALL_THRESHOLD) ")"),
|
|
||||||
M("--rjit-stats", "", "Enable collecting RJIT statistics"),
|
M("--rjit-stats", "", "Enable collecting RJIT statistics"),
|
||||||
|
M("--rjit-call-threshold=num", "", "Number of calls to trigger JIT (default: " STRINGIZE(DEFAULT_CALL_THRESHOLD) ")"),
|
||||||
|
#if RUBY_DEBUG
|
||||||
|
M("--rjit-dump-disasm", "", "Dump all JIT code"),
|
||||||
|
#endif
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
#undef M
|
#undef M
|
||||||
|
|
22
ruby.c
22
ruby.c
|
@ -321,20 +321,17 @@ usage(const char *name, int help, int highlight, int columns)
|
||||||
M("syntax_suggest", "", "syntax_suggest (default: "DEFAULT_RUBYGEMS_ENABLED")"),
|
M("syntax_suggest", "", "syntax_suggest (default: "DEFAULT_RUBYGEMS_ENABLED")"),
|
||||||
M("rubyopt", "", "RUBYOPT environment variable (default: enabled)"),
|
M("rubyopt", "", "RUBYOPT environment variable (default: enabled)"),
|
||||||
M("frozen-string-literal", "", "freeze all string literals (default: disabled)"),
|
M("frozen-string-literal", "", "freeze all string literals (default: disabled)"),
|
||||||
#if USE_RJIT
|
|
||||||
M("rjit", "", "C compiler-based JIT compiler (default: disabled)"),
|
|
||||||
#endif
|
|
||||||
#if USE_YJIT
|
#if USE_YJIT
|
||||||
M("yjit", "", "in-process JIT compiler (default: disabled)"),
|
M("yjit", "", "in-process JIT compiler (default: disabled)"),
|
||||||
|
#endif
|
||||||
|
#if USE_RJIT
|
||||||
|
M("rjit", "", "pure-Ruby JIT compiler (default: disabled)"),
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
static const struct ruby_opt_message warn_categories[] = {
|
static const struct ruby_opt_message warn_categories[] = {
|
||||||
M("deprecated", "", "deprecated features"),
|
M("deprecated", "", "deprecated features"),
|
||||||
M("experimental", "", "experimental features"),
|
M("experimental", "", "experimental features"),
|
||||||
};
|
};
|
||||||
#if USE_RJIT
|
|
||||||
extern const struct ruby_opt_message rjit_option_messages[];
|
|
||||||
#endif
|
|
||||||
#if USE_YJIT
|
#if USE_YJIT
|
||||||
static const struct ruby_opt_message yjit_options[] = {
|
static const struct ruby_opt_message yjit_options[] = {
|
||||||
M("--yjit-stats", "", "Enable collecting YJIT statistics"),
|
M("--yjit-stats", "", "Enable collecting YJIT statistics"),
|
||||||
|
@ -343,6 +340,9 @@ usage(const char *name, int help, int highlight, int columns)
|
||||||
M("--yjit-max-versions=num", "", "Maximum number of versions per basic block (default: 4)"),
|
M("--yjit-max-versions=num", "", "Maximum number of versions per basic block (default: 4)"),
|
||||||
M("--yjit-greedy-versioning", "", "Greedy versioning mode (default: disabled)"),
|
M("--yjit-greedy-versioning", "", "Greedy versioning mode (default: disabled)"),
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
#if USE_RJIT
|
||||||
|
extern const struct ruby_opt_message rjit_option_messages[];
|
||||||
#endif
|
#endif
|
||||||
int i;
|
int i;
|
||||||
const char *sb = highlight ? esc_standout+1 : esc_none;
|
const char *sb = highlight ? esc_standout+1 : esc_none;
|
||||||
|
@ -370,16 +370,16 @@ usage(const char *name, int help, int highlight, int columns)
|
||||||
printf("%s""Warning categories:%s\n", sb, se);
|
printf("%s""Warning categories:%s\n", sb, se);
|
||||||
for (i = 0; i < numberof(warn_categories); ++i)
|
for (i = 0; i < numberof(warn_categories); ++i)
|
||||||
SHOW(warn_categories[i]);
|
SHOW(warn_categories[i]);
|
||||||
#if USE_RJIT
|
|
||||||
printf("%s""RJIT options (experimental):%s\n", sb, se);
|
|
||||||
for (i = 0; rjit_option_messages[i].str; ++i)
|
|
||||||
SHOW(rjit_option_messages[i]);
|
|
||||||
#endif
|
|
||||||
#if USE_YJIT
|
#if USE_YJIT
|
||||||
printf("%s""YJIT options:%s\n", sb, se);
|
printf("%s""YJIT options:%s\n", sb, se);
|
||||||
for (i = 0; i < numberof(yjit_options); ++i)
|
for (i = 0; i < numberof(yjit_options); ++i)
|
||||||
SHOW(yjit_options[i]);
|
SHOW(yjit_options[i]);
|
||||||
#endif
|
#endif
|
||||||
|
#if USE_RJIT
|
||||||
|
printf("%s""RJIT options (experimental):%s\n", sb, se);
|
||||||
|
for (i = 0; rjit_option_messages[i].str; ++i)
|
||||||
|
SHOW(rjit_option_messages[i]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#define rubylib_path_new rb_str_new
|
#define rubylib_path_new rb_str_new
|
||||||
|
|
Загрузка…
Ссылка в новой задаче