summaryrefslogtreecommitdiff
path: root/mjit.h
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-23 14:11:19 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-23 14:11:19 (GMT)
commite1be448840da9ac2db4eeeed5d07ae8a765bacce (patch)
tree0d2ffded9f46497fa10af1a2bc7193750fba49ec /mjit.h
parenta62a776d575ada3cb3a8ae2beb8a2908a27648a1 (diff)
mjit.c: disable calling JIT-ed code
when TracePoint is enabled. We're cancelling JIT-ed code execution AFTER each instruction, but there is no guard before the first insn of method. To prevent spoiling performance, I don't want to modify the JIT-ed code to fix this. So this commit replaces `mjit_enabled` check with `mjit_call_p` check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.h')
-rw-r--r--mjit.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/mjit.h b/mjit.h
index 2f9ea85..9460d75 100644
--- a/mjit.h
+++ b/mjit.h
@@ -51,9 +51,10 @@ struct mjit_options {
typedef VALUE (*mjit_func_t)(rb_execution_context_t *, rb_control_frame_t *);
+extern int mjit_enabled;
RUBY_SYMBOL_EXPORT_BEGIN
extern struct mjit_options mjit_opts;
-extern int mjit_enabled;
+extern int mjit_call_p;
extern void mjit_add_iseq_to_process(const rb_iseq_t *iseq);
extern mjit_func_t mjit_get_iseq_func(struct rb_iseq_constant_body *body);
@@ -94,7 +95,7 @@ mjit_exec(rb_execution_context_t *ec)
long unsigned total_calls;
mjit_func_t func;
- if (!mjit_enabled)
+ if (!mjit_call_p)
return Qundef;
iseq = ec->cfp->iseq;