From 238aaa4cda14add04f7ecb4ff6fc52719589e89d Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 26 Aug 2025 10:03:58 -0400 Subject: [PATCH] [DOC] Document undocumented methods in ZJIT --- zjit.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zjit.rb b/zjit.rb index e07bccb132..3da68b380d 100644 --- a/zjit.rb +++ b/zjit.rb @@ -61,6 +61,7 @@ class << RubyVM::ZJIT buf end + # Outputs counters into +buf+. def print_counters(keys, buf:, stats:) left_pad = keys.map(&:size).max + 1 keys.each do |key| @@ -82,6 +83,7 @@ class << RubyVM::ZJIT end end + # Similar to #print_counters but only includes keys that start with +prefix+. def print_counters_with_prefix(buf:, stats:, prefix:, prompt:) keys = stats.keys.select { |key| key.start_with?(prefix) && stats[key] > 0 } unless keys.empty?