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>
This commit is contained in:
Jeremy Evans 2021-08-21 10:15:01 -07:00 committed by GitHub
parent f51a6ace06
commit 48c8df9e0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2021-08-22 02:15:29 +09:00
Merged: https://github.com/ruby/ruby/pull/4739

Merged-By: jeremyevans <code@jeremyevans.net>
5 changed files with 58 additions and 4 deletions

2
iseq.h
View file

@ -74,6 +74,8 @@ ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
RUBY_EVENT_END | \
RUBY_EVENT_CALL | \
RUBY_EVENT_RETURN| \
RUBY_EVENT_C_CALL| \
RUBY_EVENT_C_RETURN| \
RUBY_EVENT_B_CALL| \
RUBY_EVENT_B_RETURN| \
RUBY_EVENT_COVERAGE_LINE| \