mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add counters for tracking invalidations
This commit is contained in:
parent
1f09eb66e6
commit
82405ac48a
4 changed files with 17 additions and 0 deletions
3
yjit.rb
3
yjit.rb
|
@ -177,6 +177,9 @@ module YJIT
|
|||
yjit_ratio_pct = 100.0 * retired_in_yjit.to_f / total_insns_count
|
||||
|
||||
$stderr.puts "compiled_iseq_count: " + ("%10d" % stats[:compiled_iseq_count])
|
||||
$stderr.puts "compiled_block_count: " + ("%10d" % stats[:compiled_block_count])
|
||||
$stderr.puts "invalidation_count: " + ("%10d" % stats[:invalidation_count])
|
||||
$stderr.puts "constant_state_bumps: " + ("%10d" % stats[:constant_state_bumps])
|
||||
$stderr.puts "inline_code_size: " + ("%10d" % stats[:inline_code_size])
|
||||
$stderr.puts "outlined_code_size: " + ("%10d" % stats[:outlined_code_size])
|
||||
|
||||
|
|
|
@ -557,6 +557,10 @@ add_block_version(blockid_t blockid, block_t* block)
|
|||
RB_OBJ_WRITTEN(iseq, Qundef, object);
|
||||
}
|
||||
}
|
||||
|
||||
#if YJIT_STATS
|
||||
yjit_runtime_counters.compiled_block_count++;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Create a new outgoing branch entry for a block
|
||||
|
@ -1144,6 +1148,10 @@ invalidate_block_version(block_t *block)
|
|||
|
||||
yjit_free_block(block);
|
||||
|
||||
#if YJIT_STATS
|
||||
yjit_runtime_counters.invalidation_count++;
|
||||
#endif
|
||||
|
||||
// fprintf(stderr, "invalidation done\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -591,6 +591,9 @@ rb_yjit_constant_state_changed(void)
|
|||
{
|
||||
if (blocks_assuming_stable_global_constant_state) {
|
||||
st_foreach(blocks_assuming_stable_global_constant_state, block_invalidation_iterator, 0);
|
||||
#if YJIT_STATS
|
||||
yjit_runtime_counters.constant_state_bumps++;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,6 +87,9 @@ YJIT_DECLARE_COUNTERS(
|
|||
|
||||
vm_insns_count,
|
||||
compiled_iseq_count,
|
||||
compiled_block_count,
|
||||
invalidation_count,
|
||||
constant_state_bumps,
|
||||
|
||||
expandarray_splat,
|
||||
expandarray_postarg,
|
||||
|
|
Loading…
Add table
Reference in a new issue