summaryrefslogtreecommitdiff
path: root/zjit.rb
diff options
context:
space:
mode:
authorStan Lo <stan.lo@shopify.com>2025-09-17 20:17:07 +0100
committerGitHub <noreply@github.com>2025-09-17 15:17:07 -0400
commitc995faa8627fbb2509c5a35cde9e01445639fc83 (patch)
treec1f755327f30c72763ad9d7e38c4f8fb86258d06 /zjit.rb
parent4d003eabec01a5c0be10e3c6bb7e641f9e04eeef (diff)
ZJIT: Add stat for `def_type` of send fallbacks (#14533)
I thought about creating a new HIR like `SendWithoutBlockFailedToOptimize` that can carry very specific reasons later. But it'll mean adding it to every branch matching `SendWithoutBlock` and may make code unnecessarily complicated. So I take the easier path for now: ``` Top-4 send fallback def_types (100.0% of total 21,375,357): cfunc: 20,164,487 (94.3%) optimized: 1,197,897 ( 5.6%) attrset: 12,953 ( 0.1%) alias: 20 ( 0.0%) ```
Diffstat (limited to 'zjit.rb')
-rw-r--r--zjit.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/zjit.rb b/zjit.rb
index 44bce453ff..7d2fd3a10e 100644
--- a/zjit.rb
+++ b/zjit.rb
@@ -44,6 +44,7 @@ class << RubyVM::ZJIT
print_counters_with_prefix(prefix: 'compile_error_', prompt: 'compile error reasons', buf:, stats:, limit: 20)
print_counters_with_prefix(prefix: 'exit_', prompt: 'side exit reasons', buf:, stats:, limit: 20)
print_counters_with_prefix(prefix: 'dynamic_send_type_', prompt: 'dynamic send types', buf:, stats:, limit: 20)
+ print_counters_with_prefix(prefix: 'send_fallback_', prompt: 'send fallback def_types', buf:, stats:, limit: 20)
# Show the most important stats ratio_in_zjit at the end
print_counters([