From 9e42f315741b8e1be38540ea3d115ef0fc72cd51 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 10 Feb 2023 21:06:02 -0800 Subject: Do not compile C calls when C tracing is enabled --- lib/ruby_vm/mjit/insn_compiler.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/ruby_vm') 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) -- cgit v1.2.3