diff options
| author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2023-07-06 10:17:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-06 10:17:03 -0400 |
| commit | 2acb44e0440327ee5fea8d324fa6c121214e6b96 (patch) | |
| tree | 423ec70d69560a02003d0a3a310d87d4e428f786 | |
| parent | 75f8781c08da421d6bcfb2c3c8b7b74efea3bec2 (diff) | |
YJIT: add new stats counter for compiled ISEQ entry points (#8032)
* YJIT: add new stats counter for compiled ISEQ entry points
* Update yjit.rb
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
---------
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
| -rw-r--r-- | yjit.rb | 1 | ||||
| -rw-r--r-- | yjit/src/core.rs | 3 | ||||
| -rw-r--r-- | yjit/src/stats.rs | 1 |
3 files changed, 5 insertions, 0 deletions
@@ -285,6 +285,7 @@ module RubyVM::YJIT out.puts "bindings_allocations: " + format_number(13, stats[:binding_allocations]) out.puts "bindings_set: " + format_number(13, stats[:binding_set]) out.puts "compilation_failure: " + format_number(13, compilation_failure) if compilation_failure != 0 + out.puts "compiled_iseq_entry: " + format_number(13, stats[:compiled_iseq_entry]) 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]) diff --git a/yjit/src/core.rs b/yjit/src/core.rs index 4dd0a387d5..c8e17d325d 100644 --- a/yjit/src/core.rs +++ b/yjit/src/core.rs @@ -2168,6 +2168,9 @@ pub fn gen_entry_point(iseq: IseqPtr, ec: EcPtr) -> Option<CodePtr> { } } + // Count the number of entry points we compile + incr_counter!(compiled_iseq_entry); + // Compilation successful and block not empty return code_ptr; } diff --git a/yjit/src/stats.rs b/yjit/src/stats.rs index 7c5b334421..299db2c696 100644 --- a/yjit/src/stats.rs +++ b/yjit/src/stats.rs @@ -369,6 +369,7 @@ make_counters! { binding_set, vm_insns_count, + compiled_iseq_entry, compiled_iseq_count, compiled_blockid_count, compiled_block_count, |
