-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
enable osr stress tests for libraries and add fixes #64116
Conversation
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue Detailsnull
|
Seeing issues with libraries + osr for arm64 over in #63720, want to get a broader view. |
cc @dotnet/jit-contrib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine to me, but to be more consistent with the coreclr tests, maybe there should be a "jit-experimental" testGroup (and pipeline) for libraries.
Or maybe at this point the OSR stuff should "graduate" to its own "osr" testGroup in both places?
Probably a good idea, but the combinatorics of all this start getting messy.... |
/azp run runtime-coreclr libraries-pgo |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-coreclr libraries-pgo |
Azure Pipelines successfully started running 1 pipeline(s). |
Generics context is still not right in case where the OSR method needs to report Some options:
The last one seems the simplest so will do that.... |
/azp run runtime-coreclr libraries-pgo |
Azure Pipelines successfully started running 1 pipeline(s). |
Linux x64 debug failure:
Similar to #61359 -- probably not related to this PR. |
Still seeing some libraries test failures, looks like bad codegen. Let's see if we can catch it in coreclr tests. |
/azp run runtime-jit-experimental |
Azure Pipelines successfully started running 1 pipeline(s). |
* Dump IR after patchpoints phase, if any were added * Fix bug in recursive tail call detection -- if we devirtualize we need to update the method handle we use. This last change is the key bug fix -- OSR methods rely on getting this detection right so they know if they need to import the method entry block.
Last commit fixed a subtle bug. When we devirtualize a tail call we might fail to recognize that the tail call is now a recursive tail call, because we are checking the wrong method handle. For normal methods this just means we may not mark the block range as a loop (which is bad but rarely leads to bugs). But for OSR methods this is fatal because they need to use this to trigger importation of the method entry. One method where this happens is |
Still think the enabling logic for OSR is off. Currently with QJFL=1, OSR=1 we will bail to opt for too many cases. The logic with QJFL=1, OSR=1 should be
but currently it's
So will fix this along with the other changes... |
/azp run runtime-coreclr libraries-pgo |
Azure Pipelines successfully started running 1 pipeline(s). |
x86 libraries test failing
Almost certainly unrelated as this change should be no-diff for x86. |
/azp run runtime-jit-experimental |
Azure Pipelines successfully started running 1 pipeline(s). |
@EgorBo can you make sure to look over the changes in this PR for the OSR enabling/fallback logic? Also perhaps remeasure some of the TE benchmarks (with QFJL=1 OSR=1, since this PR doesn't enable those by default)...? I think we were needlessly optimizing too many methods when OSR was turned on.... |
Libraries stress test still finding issues. |
Sure! |
Summary of the latest batch of issues:
|
Needed to merge up to resolve a conflict and pick up a fix. I think we've probably gotten what we can out of this, the x64 unwind issue is the big remaining open. So after merging up I'll just let the default CI run... @dotnet/jit-contrib PTAL |
@@ -1986,13 +1986,18 @@ inline bool Compiler::lvaKeepAliveAndReportThis() | |||
// the VM requires us to keep the generics context alive or it is used in a look-up. | |||
// We keep it alive in the lookup scenario, even when the VM didn't ask us to, | |||
// because collectible types need the generics context when gc-ing. | |||
// | |||
// Methoods that can inspire OSR methods must always report context as live |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: Methoods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Will fix in subsequent PR.
Enables OSR stress for libraries.
This uncovered a few issues that are fixed with subsequent commits: