From cbe65ebbc3f2b77316d50b94e84df1c00822d0f2 Mon Sep 17 00:00:00 2001 From: Shannon Skipper Date: Sun, 16 Nov 2025 09:01:50 -0800 Subject: ZJIT: Skip empty counter sections in stats --- zjit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zjit.rb b/zjit.rb index 243e6bcf6d..bb6d4d3cdc 100644 --- a/zjit.rb +++ b/zjit.rb @@ -297,7 +297,7 @@ class << RubyVM::ZJIT def print_counters_with_prefix(buf:, stats:, prefix:, prompt:, limit: nil) counters = stats.select { |key, value| key.start_with?(prefix) && value > 0 } - return if stats.empty? + return if counters.empty? counters.transform_keys! { |key| key.to_s.delete_prefix(prefix) } key_pad = counters.keys.map(&:size).max -- cgit v1.2.3