diff --git a/ruby.c b/ruby.c index 55d5bf090c..b5c705002a 100644 --- a/ruby.c +++ b/ruby.c @@ -1041,6 +1041,10 @@ setup_ujit_options(const char *s, struct rb_ujit_options *ujit_opt) if (opt_match_noarg(s, l, "stats")) { ujit_opt->gen_stats = true; } + else { + rb_raise(rb_eRuntimeError, + "invalid ujit option `%s' (--help will show valid ujit options)", s); + } } #if USE_MJIT diff --git a/ujit_codegen.c b/ujit_codegen.c index 010e98ae86..bb0b802fc4 100644 --- a/ujit_codegen.c +++ b/ujit_codegen.c @@ -180,6 +180,7 @@ ujit_gen_block(ctx_t* ctx, block_t* block) } #if RUBY_DEBUG + // Count instructions executed by the JIT mov(cb, REG0, const_ptr_opnd((void *)&rb_ujit_exec_insns_count)); add(cb, mem_opnd(64, REG0, 0), imm_opnd(1)); #endif