Skip to content

Commit 4b59100

Browse files
committed
ZJIT: Stops optimizing SendWithoutBlock when TracePoint is activated
1 parent 6c7e708 commit 4b59100

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

zjit/src/hir.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,6 +2254,10 @@ impl Function {
22542254
/// Optimize SendWithoutBlock that land in a C method to a direct CCall without
22552255
/// runtime lookup.
22562256
fn optimize_c_calls(&mut self) {
2257+
if unsafe { rb_zjit_method_tracing_currently_enabled() } {
2258+
return;
2259+
}
2260+
22572261
fn gen_patch_points_for_optimized_ccall(fun: &mut Function, block: BlockId, recv_class: VALUE, method_id: ID, method: *const rb_callable_method_entry_struct, state: InsnId) {
22582262
fun.push_insn(block, Insn::PatchPoint { invariant: Invariant::NoTracePoint, state });
22592263
fun.push_insn(block, Insn::PatchPoint { invariant: Invariant::MethodRedefined { klass: recv_class, method: method_id, cme: method }, state });
@@ -2345,9 +2349,6 @@ impl Function {
23452349
}
23462350
// Variadic method
23472351
-1 => {
2348-
if unsafe { rb_zjit_method_tracing_currently_enabled() } {
2349-
return Err(());
2350-
}
23512352
// The method gets a pointer to the first argument
23522353
// func(int argc, VALUE *argv, VALUE recv)
23532354
let ci_flags = unsafe { vm_ci_flag(call_info) };

0 commit comments

Comments
 (0)