Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions harness/harness-common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,15 @@ def return_results(warmup_iterations, bench_iterations)
yjit_bench_results["maxrss"] = maxrss
end

if defined?(RubyVM::YJIT) && RubyVM::YJIT.stats_enabled?
yjit_bench_results["yjit_stats"] = RubyVM::YJIT.runtime_stats
if defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled?
yjit_stats = RubyVM::YJIT.runtime_stats
yjit_bench_results["yjit_stats"] = yjit_stats

formatted_stats = proc { |key| "%10s" % yjit_stats[key].to_s.reverse.scan(/\d{1,3}/).join(",").reverse }
puts "inline_code_size: #{formatted_stats[:inline_code_size]}"
puts "outlined_code_size: #{formatted_stats[:outlined_code_size]}"
puts "code_region_size: #{formatted_stats[:code_region_size]}"
puts "yjit_alloc_size: #{formatted_stats[:yjit_alloc_size]}"
end

write_json_file(yjit_bench_results)
Expand Down