summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2021-08-21 10:15:01 -0700
committerGitHub <noreply@github.com>2021-08-21 10:15:01 -0700
commit48c8df9e0eb295af06d593ce37ce1933c0ee1d90 (patch)
tree4a8092796f397a12835f89c4f220a84fa8f5f867 /compile.c
parentf51a6ace06cecd193bf00747a63809849e254050 (diff)
Allow tracing of optimized methods
This updates the trace instructions to directly dispatch to opt_send_without_block. So this should cause no slowdown in non-trace mode. To enable the tracing of the optimized methods, RUBY_EVENT_C_CALL and RUBY_EVENT_C_RETURN are added as events to the specialized instructions. Fixes [Bug #14870] Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4739 Merged-By: jeremyevans <code@jeremyevans.net>
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index d73a42a86f..3663430f56 100644
--- a/compile.c
+++ b/compile.c
@@ -3441,6 +3441,7 @@ insn_set_specialized_instruction(rb_iseq_t *iseq, INSN *iobj, int insn_id)
{
iobj->insn_id = insn_id;
iobj->operand_size = insn_len(insn_id) - 1;
+ iobj->insn_info.events |= RUBY_EVENT_C_CALL | RUBY_EVENT_C_RETURN;
if (insn_id == BIN(opt_neq)) {
VALUE original_ci = iobj->operands[0];