YJIT: add code_region_overhead stat output (#8262)

This commit is contained in:
Maxime Chevalier-Boisvert 2023-08-22 17:36:12 -04:00 коммит произвёл GitHub
Родитель 2d75069779
Коммит c23e2e19b7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -273,6 +273,8 @@ module RubyVM::YJIT
# Number of failed compiler invocations # Number of failed compiler invocations
compilation_failure = stats[:compilation_failure] compilation_failure = stats[:compilation_failure]
code_region_overhead = stats[:code_region_size] - (stats[:inline_code_size] + stats[:outlined_code_size])
out.puts "num_send: " + format_number(13, stats[:num_send]) out.puts "num_send: " + format_number(13, stats[:num_send])
out.puts "num_send_known_class: " + format_number_pct(13, stats[:num_send_known_class], stats[:num_send]) out.puts "num_send_known_class: " + format_number_pct(13, stats[:num_send_known_class], stats[:num_send])
out.puts "num_send_polymorphic: " + format_number_pct(13, stats[:num_send_polymorphic], stats[:num_send]) out.puts "num_send_polymorphic: " + format_number_pct(13, stats[:num_send_polymorphic], stats[:num_send])
@ -318,6 +320,8 @@ module RubyVM::YJIT
out.puts "inline_code_size: " + format_number(13, stats[:inline_code_size]) out.puts "inline_code_size: " + format_number(13, stats[:inline_code_size])
out.puts "outlined_code_size: " + format_number(13, stats[:outlined_code_size]) out.puts "outlined_code_size: " + format_number(13, stats[:outlined_code_size])
out.puts "code_region_size: " + format_number(13, stats[:code_region_size]) out.puts "code_region_size: " + format_number(13, stats[:code_region_size])
out.puts "code_region_overhead: " + format_number_pct(13, code_region_overhead, stats[:code_region_size])
out.puts "freed_code_size: " + format_number(13, stats[:freed_code_size]) out.puts "freed_code_size: " + format_number(13, stats[:freed_code_size])
out.puts "yjit_alloc_size: " + format_number(13, stats[:yjit_alloc_size]) if stats.key?(:yjit_alloc_size) out.puts "yjit_alloc_size: " + format_number(13, stats[:yjit_alloc_size]) if stats.key?(:yjit_alloc_size)
out.puts "live_context_size: " + format_number(13, stats[:live_context_size]) out.puts "live_context_size: " + format_number(13, stats[:live_context_size])