зеркало из https://github.com/github/ruby.git
YJIT: Add inline_block_count stat (#12081)
This commit is contained in:
Родитель
907146973a
Коммит
30e1d6b5a8
1
yjit.rb
1
yjit.rb
|
@ -382,6 +382,7 @@ module RubyVM::YJIT
|
|||
out.puts "compiled_iseq_count: " + format_number(13, stats[:compiled_iseq_count])
|
||||
out.puts "compiled_blockid_count:" + format_number(13, stats[:compiled_blockid_count])
|
||||
out.puts "compiled_block_count: " + format_number(13, stats[:compiled_block_count])
|
||||
out.puts "inline_block_count: " + format_number_pct(13, stats[:inline_block_count], stats[:compiled_block_count])
|
||||
out.puts "deleted_defer_block_count:" + format_number_pct(10, stats[:deleted_defer_block_count], stats[:compiled_block_count])
|
||||
if stats[:compiled_blockid_count] != 0
|
||||
out.puts "versions_per_block: " + format_number(13, "%4.3f" % (stats[:compiled_block_count].fdiv(stats[:compiled_blockid_count])))
|
||||
|
|
|
@ -2309,7 +2309,9 @@ pub fn limit_block_versions(blockid: BlockId, ctx: &Context) -> Context {
|
|||
|
||||
return generic_ctx;
|
||||
}
|
||||
incr_counter_to!(max_inline_versions, next_versions);
|
||||
if ctx.inline() {
|
||||
incr_counter_to!(max_inline_versions, next_versions);
|
||||
}
|
||||
|
||||
return *ctx;
|
||||
}
|
||||
|
@ -2367,6 +2369,9 @@ unsafe fn add_block_version(blockref: BlockRef, cb: &CodeBlock) {
|
|||
}
|
||||
|
||||
incr_counter!(compiled_block_count);
|
||||
if Context::decode(block.ctx).inline() {
|
||||
incr_counter!(inline_block_count);
|
||||
}
|
||||
|
||||
// Mark code pages for code GC
|
||||
let iseq_payload = get_iseq_payload(block.iseq.get()).unwrap();
|
||||
|
|
|
@ -282,6 +282,7 @@ pub const DEFAULT_COUNTERS: &'static [Counter] = &[
|
|||
Counter::compiled_branch_count,
|
||||
Counter::compile_time_ns,
|
||||
Counter::max_inline_versions,
|
||||
Counter::inline_block_count,
|
||||
Counter::num_contexts_encoded,
|
||||
Counter::context_cache_hits,
|
||||
|
||||
|
@ -570,6 +571,7 @@ make_counters! {
|
|||
branch_insn_count,
|
||||
branch_known_count,
|
||||
max_inline_versions,
|
||||
inline_block_count,
|
||||
num_contexts_encoded,
|
||||
|
||||
freed_iseq_count,
|
||||
|
|
Загрузка…
Ссылка в новой задаче