mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Implement --ujit-call-threshold
This commit is contained in:
parent
58657b33e7
commit
0710bec01e
4 changed files with 31 additions and 17 deletions
7
ruby.c
7
ruby.c
|
@ -1033,12 +1033,13 @@ set_option_encoding_once(const char *type, VALUE *name, const char *e, long elen
|
|||
static void
|
||||
setup_ujit_options(const char *s, struct rb_ujit_options *ujit_opt)
|
||||
{
|
||||
*ujit_opt = (struct rb_ujit_options) { 0 };
|
||||
|
||||
if (*s != '-') return;
|
||||
const size_t l = strlen(++s);
|
||||
|
||||
if (opt_match_noarg(s, l, "stats")) {
|
||||
if (opt_match_arg(s, l, "call-threshold")) {
|
||||
ujit_opt->call_threshold = atoi(s + 1);
|
||||
}
|
||||
else if (opt_match_noarg(s, l, "stats")) {
|
||||
ujit_opt->gen_stats = true;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue