summaryrefslogtreecommitdiff
path: root/zjit.rb
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2025-10-28 21:23:02 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2025-10-30 18:14:55 -0400
commit5b71b103b6e49bbe8b1a95112e393da552cf803e (patch)
treeefba4b79ce3b4559ebc8c44906d8678ff823ca49 /zjit.rb
parent68dd1abdec5c222f3a59401cb0ffa07454dcfbe3 (diff)
ZJIT: Unsupported call feature accounting, and new `send_fallback_fancy_call_feature`
In cases we fall back when the callee has an unsupported signature, it was a little inaccurate to use `send_fallback_send_not_optimized_method_type`. We do support the method type in other situations. Add a new `send_fallback_fancy_call_feature` for these situations. Also, `send_fallback_bmethod_non_iseq_proc` so we can stop using `not_optimized_method_type` completely for bmethods. Add accompanying `fancy_arg_pass_*` counters. These don't sum to the number of unoptimized calls that run, but establishes the level of support the optimizer provides for a given workload.
Diffstat (limited to 'zjit.rb')
-rw-r--r--zjit.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/zjit.rb b/zjit.rb
index 39e353f327..72a6e58651 100644
--- a/zjit.rb
+++ b/zjit.rb
@@ -164,6 +164,11 @@ class << RubyVM::ZJIT
print_counters_with_prefix(prefix: 'not_optimized_yarv_insn_', prompt: 'not optimized instructions', buf:, stats:, limit: 20)
print_counters_with_prefix(prefix: 'send_fallback_', prompt: 'send fallback reasons', buf:, stats:, limit: 20)
+ # Show most popular unsupported call features. Because each call can
+ # use multiple fancy features, a decrease in this number does not
+ # necessarily mean an increase in number of optimized calls.
+ print_counters_with_prefix(prefix: 'fancy_arg_pass_', prompt: 'popular unsupported argument-parameter features', buf:, stats:, limit: 10)
+
# Show exit counters, ordered by the typical amount of exits for the prefix at the time
print_counters_with_prefix(prefix: 'unhandled_yarv_insn_', prompt: 'unhandled YARV insns', buf:, stats:, limit: 20)
print_counters_with_prefix(prefix: 'compile_error_', prompt: 'compile error reasons', buf:, stats:, limit: 20)