Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note
Missing some other things in this PR (sig updates, CI updates, etc), but gonna go ahead and put the draft up for discussion.
What does this PR do?
When ruby's extended YJIT stats are available (
--yjit-stat
), thenwe have access to numerous additional stats.
This adds
:ratio_in_yjit
, which is only present when additional statsare enabled.
Example:
Motivation:
This should allow for a better understanding of how to tune
--yjit-exec-mem-size
.From https://github.com/ruby/ruby/blob/ef084cc8f4958c1b6e4ead99136631bef6d8ddba/doc/yjit/yjit.md?plain=1#L213-L223:
Additional Notes:
Fwiw, I directly based this on the previous YJIT PRs, which were very helpful here:
ratio_in_yjit
has been available sine 3.3.0: https://github.com/ruby/ruby/blob/caf0d2058aa223515897401ff94e11e1c0671ce0/doc/NEWS/NEWS-3.3.0.md?plain=1#L436How to test the change?