YJIT: Add inline_block_count stat (#12081)
This commit is contained in:
parent
907146973a
commit
30e1d6b5a8
Notes:
git
2024-11-13 21:17:46 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
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_iseq_count: " + format_number(13, stats[:compiled_iseq_count])
|
||||||
out.puts "compiled_blockid_count:" + format_number(13, stats[:compiled_blockid_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 "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])
|
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
|
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])))
|
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;
|
return generic_ctx;
|
||||||
}
|
}
|
||||||
incr_counter_to!(max_inline_versions, next_versions);
|
if ctx.inline() {
|
||||||
|
incr_counter_to!(max_inline_versions, next_versions);
|
||||||
|
}
|
||||||
|
|
||||||
return *ctx;
|
return *ctx;
|
||||||
}
|
}
|
||||||
@ -2367,6 +2369,9 @@ unsafe fn add_block_version(blockref: BlockRef, cb: &CodeBlock) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
incr_counter!(compiled_block_count);
|
incr_counter!(compiled_block_count);
|
||||||
|
if Context::decode(block.ctx).inline() {
|
||||||
|
incr_counter!(inline_block_count);
|
||||||
|
}
|
||||||
|
|
||||||
// Mark code pages for code GC
|
// Mark code pages for code GC
|
||||||
let iseq_payload = get_iseq_payload(block.iseq.get()).unwrap();
|
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::compiled_branch_count,
|
||||||
Counter::compile_time_ns,
|
Counter::compile_time_ns,
|
||||||
Counter::max_inline_versions,
|
Counter::max_inline_versions,
|
||||||
|
Counter::inline_block_count,
|
||||||
Counter::num_contexts_encoded,
|
Counter::num_contexts_encoded,
|
||||||
Counter::context_cache_hits,
|
Counter::context_cache_hits,
|
||||||
|
|
||||||
@ -570,6 +571,7 @@ make_counters! {
|
|||||||
branch_insn_count,
|
branch_insn_count,
|
||||||
branch_known_count,
|
branch_known_count,
|
||||||
max_inline_versions,
|
max_inline_versions,
|
||||||
|
inline_block_count,
|
||||||
num_contexts_encoded,
|
num_contexts_encoded,
|
||||||
|
|
||||||
freed_iseq_count,
|
freed_iseq_count,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user