summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2024-01-25 08:23:26 -0800
committerGitHub <noreply@github.com>2024-01-25 11:23:26 -0500
commitd4cc77e7b6107b136e977e9b107b2d50aaa42314 (patch)
tree63829a77ea286f4337b9d4bfb3d53c23719e661c
parent1301422dfe44ed6aca97b20f672098c276dd9bd4 (diff)
YJIT: Add a counter for invokebuiltin exits (#9696)
-rw-r--r--yjit.rb1
-rw-r--r--yjit/src/codegen.rs2
-rw-r--r--yjit/src/stats.rs2
3 files changed, 5 insertions, 0 deletions
diff --git a/yjit.rb b/yjit.rb
index c25ea8997d..06cb75adb1 100644
--- a/yjit.rb
+++ b/yjit.rb
@@ -271,6 +271,7 @@ module RubyVM::YJIT
branchunless
definedivar
expandarray
+ invokebuiltin
jump
leave
objtostring
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index 33298eed5c..06adbe8553 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -8786,6 +8786,7 @@ fn gen_invokebuiltin(
// ec, self, and arguments
if bf_argc + 2 > C_ARG_OPNDS.len() {
+ incr_counter!(invokebuiltin_too_many_args);
return None;
}
@@ -8825,6 +8826,7 @@ fn gen_opt_invokebuiltin_delegate(
// ec, self, and arguments
if bf_argc + 2 > (C_ARG_OPNDS.len() as i32) {
+ incr_counter!(invokebuiltin_too_many_args);
return None;
}
diff --git a/yjit/src/stats.rs b/yjit/src/stats.rs
index b6add639c1..7e83fa504f 100644
--- a/yjit/src/stats.rs
+++ b/yjit/src/stats.rs
@@ -468,6 +468,8 @@ make_counters! {
setlocal_wb_required,
+ invokebuiltin_too_many_args,
+
opt_plus_overflow,
opt_minus_overflow,
opt_mult_overflow,