summaryrefslogtreecommitdiff
path: root/yjit.rb
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2023-11-28 17:27:11 -0500
committerGitHub <noreply@github.com>2023-11-28 22:27:11 +0000
commitea3e17e430b74b4e58535a707319025e008cc123 (patch)
treeaff895ceb0803be8eadb6ebb7ae8bc1d6755670c /yjit.rb
parenta9c07cbd2128ae8fcb11862265d5fa24feaf3d4f (diff)
YJIT: fix bug in top cfunc logging in `--yjit-stats` (#9056)
YJIT: correctly handle case where there are no cfunc calls Fix bug in top cfunc logging in `--yjit-stats`
Diffstat (limited to 'yjit.rb')
-rw-r--r--yjit.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/yjit.rb b/yjit.rb
index 7100242aff..fe6e7debd4 100644
--- a/yjit.rb
+++ b/yjit.rb
@@ -375,7 +375,9 @@ module RubyVM::YJIT
def print_sorted_cfunc_calls(stats, out:, how_many: 20, left_pad: 4) # :nodoc:
calls = stats[:cfunc_calls]
- #puts calls
+ if calls.empty?
+ return
+ end
# Total number of cfunc calls
num_send_cfunc = stats[:num_send_cfunc]