-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Adds stats for the tier 2 optimizer #109329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We've been collecting and dumping stats for all of the counters in your first list for three months now... but they seem to be ignored in the
@mdboom, maybe you know why these aren't being included in the markdown summaries? From a quick skim, it looks like it might be because we ignore any counters that don't start with "Calls to", "Frame", "GC", or "Object". Maybe we should rework this to not ignore new counters? |
I'd also like to see the reasons why projecting stopped:
@gvanrossum, any other stats we might like to see? |
Those lists look pretty exhaustive. I’d also count anything that I deemed worthy of a DPRINTF call. |
Seems plausible. Let's coordinate on how to get this done -- I'm happy to take this on as I have a bit more time these days. |
I have a PR for the basics up, and then I will tackle some of the other suggestions in smaller chunks. Some questions:
|
I think it would be more useful to have separate counters per tier. But it would be somewhat complex to do that -- the header files that define them would have to check for
Sounds like that question is for @brandtbucher. |
Yeah, we want to see the distribution in number of uops executed per entry into tier two. That's helpful because we can execute many uops in traces that are statically short (if they close a hot loop) and few uops in traces that are statically long (if we deopt quickly). We want to optimize for "uops executed in tier two before deopting", not necessarily "trace projection length". To ease implementation, it's fine to bucket these. The distribution will probably be heavily skewed towards small numbers (since we tend to enter and exit "bad" traces more often), so maybe powers of ten or two would work best? |
This keeps a separate 'miss' counter for each micro-opcode, incremented whenever a guard uop takes a deoptimization side exit.
This keeps a separate 'miss' counter for each micro-opcode, incremented whenever a guard uop takes a deoptimization side exit.
This is all working nicely now. |
This keeps a separate 'miss' counter for each micro-opcode, incremented whenever a guard uop takes a deoptimization side exit.
This keeps a separate 'miss' counter for each micro-opcode, incremented whenever a guard uop takes a deoptimization side exit.
Currently we have no stats for anything regarding the tier 2 optimizer.
Without them we are making too many guesses about what we should be doing.
The performance numbers tell us that things aren't working as well as they should, although not too badly either.
However, performance numbers tell us nothing about why that is, or what is happening.
For example, #109038 should have increased the important ratio of
(number of uops executed)/(traces started)
but we have no idea if it actually did.We need the following stats soon:
The following stats would also be nice, but are less urgent:
Linked PRs
The text was updated successfully, but these errors were encountered: