aboutsummaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2021-02-23 15:22:20 -0500
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:30 -0400
commit0710bec01e405af596fa3e8e29ba38bb8176e39d (patch)
tree5917722657fa3a9ee00efb76bd4fd8ebd5a1586e /ruby.c
parent58657b33e751ec0718f539bc9fa62f0ffa02801f (diff)
downloadruby-0710bec01e405af596fa3e8e29ba38bb8176e39d.tar.gz
Implement --ujit-call-threshold
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ruby.c b/ruby.c
index b5c705002a..78d400278f 100644
--- a/ruby.c
+++ b/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 {