зеркало из https://github.com/github/ruby.git
YJIT: add stats for ratio of versions per block (#7653)
This commit is contained in:
Родитель
8525603c72
Коммит
d26d3575ca
4
yjit.rb
4
yjit.rb
|
@ -275,7 +275,11 @@ module RubyVM::YJIT
|
|||
$stderr.puts "bindings_set: " + format_number(13, stats[:binding_set])
|
||||
$stderr.puts "compilation_failure: " + format_number(13, compilation_failure) if compilation_failure != 0
|
||||
$stderr.puts "compiled_iseq_count: " + format_number(13, stats[:compiled_iseq_count])
|
||||
$stderr.puts "compiled_blockid_count:" + format_number(13, stats[:compiled_blockid_count])
|
||||
$stderr.puts "compiled_block_count: " + format_number(13, stats[:compiled_block_count])
|
||||
if stats[:compiled_blockid_count] != 0
|
||||
$stderr.puts "versions_per_block: " + format_number(13, "%4.3f" % (stats[:compiled_block_count].fdiv(stats[:compiled_blockid_count])))
|
||||
end
|
||||
$stderr.puts "compiled_branch_count: " + format_number(13, stats[:compiled_branch_count])
|
||||
$stderr.puts "block_next_count: " + format_number(13, stats[:block_next_count])
|
||||
$stderr.puts "defer_count: " + format_number(13, stats[:defer_count])
|
||||
|
|
|
@ -1416,6 +1416,11 @@ unsafe fn add_block_version(blockref: BlockRef, cb: &CodeBlock) {
|
|||
|
||||
let version_list = get_or_create_version_list(block.get_blockid());
|
||||
|
||||
// If this the first block being compiled with this block id
|
||||
if version_list.len() == 0 {
|
||||
incr_counter!(compiled_blockid_count);
|
||||
}
|
||||
|
||||
version_list.push(blockref);
|
||||
version_list.shrink_to_fit();
|
||||
|
||||
|
|
|
@ -316,6 +316,7 @@ make_counters! {
|
|||
|
||||
vm_insns_count,
|
||||
compiled_iseq_count,
|
||||
compiled_blockid_count,
|
||||
compiled_block_count,
|
||||
compiled_branch_count,
|
||||
compilation_failure,
|
||||
|
|
Загрузка…
Ссылка в новой задаче