summaryrefslogtreecommitdiff
path: root/mjit.c
diff options
Diffstat (limited to 'mjit.c')
-rw-r--r--mjit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mjit.c b/mjit.c
index 76e249de62..26a05fc6ea 100644
--- a/mjit.c
+++ b/mjit.c
@@ -491,6 +491,15 @@ mjit_stats_enabled_p(rb_execution_context_t *ec, VALUE self)
return RBOOL(mjit_stats_enabled);
}
+// Disable anything that could impact stats. It ends up disabling JIT calls as well.
+static VALUE
+mjit_stop_stats(rb_execution_context_t *ec, VALUE self)
+{
+ mjit_call_p = false;
+ mjit_stats_p = false;
+ return Qnil;
+}
+
#include "mjit.rbinc"
#endif // USE_MJIT