diff options
author | Takashi Kokubun <[email protected]> | 2023-02-10 21:06:02 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-03-05 22:41:35 -0800 |
commit | 9e42f315741b8e1be38540ea3d115ef0fc72cd51 (patch) | |
tree | 3b3d457c4aa337412b59b3472de1af51f967e3b3 /lib/ruby_vm/mjit/insn_compiler.rb | |
parent | 20e55be47ccf1ba89d6ca061f45625f1bd8e8578 (diff) |
Do not compile C calls when C tracing is enabled
Diffstat (limited to 'lib/ruby_vm/mjit/insn_compiler.rb')
-rw-r--r-- | lib/ruby_vm/mjit/insn_compiler.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ruby_vm/mjit/insn_compiler.rb b/lib/ruby_vm/mjit/insn_compiler.rb index 0242db76c5..386a97eb26 100644 --- a/lib/ruby_vm/mjit/insn_compiler.rb +++ b/lib/ruby_vm/mjit/insn_compiler.rb @@ -1185,6 +1185,12 @@ module RubyVM::MJIT frame_type |= C.VM_FRAME_FLAG_CFRAME_KW end + # EXEC_EVENT_HOOK: RUBY_EVENT_C_CALL and RUBY_EVENT_C_RETURN + if C.rb_mjit_global_events & (C.RUBY_EVENT_C_CALL | C.RUBY_EVENT_C_RETURN) != 0 + asm.incr_counter(:send_c_tracing) + return CantCompile + end + # rb_check_arity if argc != cfunc.argc asm.incr_counter(:send_arity) |