mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
YJIT: add context cache size stat, lazily allocate cache
* YJIT: add context cache size stat * Allocate the context cache in a box so CRuby doesn't pay overhead * Add an extra debug assertion
This commit is contained in:
parent
568132af16
commit
39019b6a63
3 changed files with 29 additions and 25 deletions
1
yjit.rb
1
yjit.rb
|
@ -390,6 +390,7 @@ module RubyVM::YJIT
|
|||
out.puts "yjit_alloc_size: " + format_number(13, stats[:yjit_alloc_size]) if stats.key?(:yjit_alloc_size)
|
||||
|
||||
bytes_per_context = stats[:context_data_bytes].fdiv(stats[:num_contexts_encoded])
|
||||
out.puts "context_cache_bytes: " + format_number(13, stats[:context_cache_bytes])
|
||||
out.puts "context_data_bytes: " + format_number(13, stats[:context_data_bytes])
|
||||
out.puts "num_contexts_encoded: " + format_number(13, stats[:num_contexts_encoded])
|
||||
out.puts "bytes_per_context: " + ("%13.2f" % bytes_per_context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue