File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -98,8 +98,15 @@ def return_results(warmup_iterations, bench_iterations)
9898 yjit_bench_results [ "maxrss" ] = maxrss
9999 end
100100
101- if defined? ( RubyVM ::YJIT ) && RubyVM ::YJIT . stats_enabled?
102- yjit_bench_results [ "yjit_stats" ] = RubyVM ::YJIT . runtime_stats
101+ if defined? ( RubyVM ::YJIT ) && RubyVM ::YJIT . enabled?
102+ yjit_stats = RubyVM ::YJIT . runtime_stats
103+ yjit_bench_results [ "yjit_stats" ] = yjit_stats
104+
105+ formatted_stats = proc { |key | "%10s" % yjit_stats [ key ] . to_s . reverse . scan ( /\d {1,3}/ ) . join ( "," ) . reverse }
106+ puts "inline_code_size: #{ formatted_stats [ :inline_code_size ] } "
107+ puts "outlined_code_size: #{ formatted_stats [ :outlined_code_size ] } "
108+ puts "code_region_size: #{ formatted_stats [ :code_region_size ] } "
109+ puts "yjit_alloc_size: #{ formatted_stats [ :yjit_alloc_size ] } "
103110 end
104111
105112 write_json_file ( yjit_bench_results )
You can’t perform that action at this time.
0 commit comments