diff options
author | Noah Gibbs <noah.gibbs@shopify.com> | 2023-05-09 20:40:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-10 04:40:26 +0900 |
commit | e1c84e8ee6a3a7d50ba726c18ea99395aa0bf4ce (patch) | |
tree | b55dd6bdb34d7f64ec25570058fb71a268f01818 | |
parent | 986268afae7bde07073da3ba483d12549b12801f (diff) | |
download | ruby-e1c84e8ee6a3a7d50ba726c18ea99395aa0bf4ce.tar.gz |
For YJIT stats, set avg_len_in_yjit to 0 if denominator would be 0 (#7793)
-rw-r--r-- | yjit.rb | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -165,7 +165,7 @@ module RubyVM::YJIT retired_in_yjit = stats[:exec_instruction] - side_exits # Average length of instruction sequences executed by YJIT - avg_len_in_yjit = retired_in_yjit.to_f / total_exits + avg_len_in_yjit = total_exits > 0 ? retired_in_yjit.to_f / total_exits : 0 # This only available on yjit stats builds if stats.key?(:vm_insns_count) |