summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Bernstein <rubybugs@bernsteinbear.com>2026-01-23 16:14:59 -0500
committerGitHub <noreply@github.com>2026-01-23 16:14:59 -0500
commit7c75dbe51e9fd9ebd84bc796acec4a4e60c5d367 (patch)
tree08f7f391e4ea06d777144991afb939a94c27e9b3
parente7e930323660c6b0b277a998e178f18b074c3d5c (diff)
ZJIT: Reset all the counters in RubyVM::ZJIT::reset_stats! (#15950)
We previously forgot about these.
-rw-r--r--zjit/src/stats.rs15
1 files changed, 15 insertions, 0 deletions
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
}