aboutsummaryrefslogtreecommitdiffstats
path: root/mjit.c
diff options
context:
space:
mode:
Diffstat (limited to 'mjit.c')
-rw-r--r--mjit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mjit.c b/mjit.c
index 9dd48ff311..b810ae4e4d 100644
--- a/mjit.c
+++ b/mjit.c
@@ -63,6 +63,7 @@ struct mjit_options mjit_opts;
// true if MJIT is enabled.
bool mjit_enabled = false;
+bool mjit_stats_enabled = false;
// true if JIT-ed code should be called. When `ruby_vm_event_enabled_global_flags & ISEQ_TRACE_EVENTS`
// and `mjit_call_p == false`, any JIT-ed code execution is cancelled as soon as possible.
bool mjit_call_p = false;
@@ -394,6 +395,13 @@ mjit_finish(bool close_handle_p)
// TODO: implement
}
+// Same as `RubyVM::MJIT::C.enabled?`, but this is used before mjit_init.
+static VALUE
+mjit_stats_enabled_p(rb_execution_context_t *ec, VALUE self)
+{
+ return RBOOL(mjit_stats_enabled);
+}
+
#include "mjit.rbinc"
#endif // USE_MJIT