From 7c75dbe51e9fd9ebd84bc796acec4a4e60c5d367 Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Fri, 23 Jan 2026 16:14:59 -0500 Subject: ZJIT: Reset all the counters in RubyVM::ZJIT::reset_stats! (#15950) We previously forgot about these. --- zjit/src/stats.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zjit/src/stats.rs b/zjit/src/stats.rs index 556a1417a4..96d75b7aec 100644 --- a/zjit/src/stats.rs +++ b/zjit/src/stats.rs @@ -717,6 +717,21 @@ pub extern "C" fn rb_zjit_reset_stats_bang(_ec: EcPtr, _self: VALUE) -> VALUE { // Reset exit counters for YARV instructions exit_counters.as_mut_slice().fill(0); + // Reset send fallback counters + ZJITState::get_send_fallback_counters().as_mut_slice().fill(0); + + // Reset not-inlined counters + ZJITState::get_not_inlined_cfunc_counter_pointers().iter_mut() + .for_each(|b| { **(b.1) = 0; }); + + // Reset not-annotated counters + ZJITState::get_not_annotated_cfunc_counter_pointers().iter_mut() + .for_each(|b| { **(b.1) = 0; }); + + // Reset ccall counters + ZJITState::get_ccall_counter_pointers().iter_mut() + .for_each(|b| { **(b.1) = 0; }); + Qnil } -- cgit v1.2.3