-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix for number of used frame infos during crossgen2 compilation #64549
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3430,6 +3430,7 @@ private void reportFatalError(CorJitResult result) | |
| { | ||
| // We could add some logging here, but for now it's unnecessary. | ||
| // CompileMethod is going to fail with this CorJitResult anyway. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment is not correct. |
||
| _numFrameInfos = 0; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this all state that needs to be cleaned up? From cursory look, there seems to be more state that may cause problems. I am wondering whether the retry logic should be rather moved from the JIT to the EE side. It would allow the state cleanup to be more robust. Also, it would allow us to skip the retry in cases where it does not make sense. For example, it does not make sense to retry with no optimizations when generating Tier1 code. @dotnet/jit-contrib Thoughts?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Maybe I'm missing something: the proposed change is in crossgen2, not the JIT (or EE). In the JIT'ing case, we already have a backout function:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have similar method in crossgen2 as well (
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see. There's a "small" window where, after the JIT has already started allocating EH/GC/code space from the VM, where it can hit a NO_WAY assert and decide to retry. It would make sense for the JIT to call back through the JIT/EE interface before retrying saying "I'm going to retry".
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally I think it makes sense to leave it up to the consumer of the JIT to retry if that is the desired behavior -- it seems a little strange to me that the JIT does this implicitly even though optimizations were requested. It was also the reason behind the unexpected debug codegen in #63708.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There is retry logic in the VM to deal with relocs overflow that does proper cleanup before retrying. In other words, we have one retry logic in the JIT itself and second retry logic in the VM. My point was whether it would be better to have just one retry logic in the VM that handles both cases.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this all state that needs to be cleaned up? From cursory look, there seems to be more state that may cause problems. I am wondering whether the retry logic should be rather moved from the JIT to the EE side. It would allow the state cleanup to be more robust. Also, it would allow us to skip the retry in cases where it does not make sense. For example, it does not make sense to retry with no optimizations when generating Tier1 code. @dotnet/jit-contrib Thoughts? |
||
| } | ||
|
|
||
| private void recordCallSite(uint instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_STRUCT_* methodHandle) | ||
|
|
||
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 comment is not correct.
CompileMethodis not always going to fail.