This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Implement stack probing using helpers#27184
Merged
echesakov merged 15 commits intodotnet:masterfrom Oct 29, 2019
echesakov:JitStackProbeHelperArmArch
Merged
Implement stack probing using helpers#27184echesakov merged 15 commits intodotnet:masterfrom echesakov:JitStackProbeHelperArmArch
echesakov merged 15 commits intodotnet:masterfrom
echesakov:JitStackProbeHelperArmArch
Conversation
jkotas
reviewed
Oct 14, 2019
…src/jit/codegenarm.cpp src/jit/codegencommon.cpp src/jit/compiler.h src/jit/target.h
Author
|
This PR is ready for review. I collected the stack traces for the following test cases:
On win-arm the stack traces looks as I would expect them to be: win-arm - windbg - case 1: win-arm - windbg - case 2: On linux-arm in case 2 for some reason the debugger can not unwind beyond linux-arm - lldb - case 1: linux-arm - lldb - case 2: I also fixed the helpers as Jan suggested above so they would probe at the bottom of the pages (i.e. at addresses |
Author
|
/azp run coreclr-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
BruceForstall
approved these changes
Oct 25, 2019
erozenfeld
approved these changes
Oct 26, 2019
Member
erozenfeld
left a comment
There was a problem hiding this comment.
LGTM with a few comment notes.
29 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This partially addresses https://github.com/dotnet/coreclr/issues/26996
CodeGen::genAllocLclFrameinto Arm32 and Arm64 specific functionsImplementation of stack probing via helpers on Arm64 is complicated...
It is related to how we establish frame pointer in a function prolog and the fact that stack probing currently happens before
lris saved on stack.The latter means that we can not call any function until that moment - every call will previous value of
lr.We also can not defer the stack probing until after we save the frame record (i.e.
fp,lrpair) on stack - some types of stack frames store the frame record at the lowest address on the stack.I tried to consider ways of calling the helper without advancing
sp:blwithb). This requires computing return address manually and passing it to the helper. It seems we can't do this in JIT right now (at least I could not find a way to emit INS_adr and specify PCRelOffset). This approach would probably confuse unwinder when SO happens.lrin red zone before call to the helper and restore original value oflrinside the helper. It is not going to work - unwind codes on Arm64 doesn't support negative offsets.lrinto another register - not supported by unwind codes.The only choice I have left is to store
lron the stack, adjustsp, call to the helper and restorelrandspafter the call (or in the helper).@dotnet/jit-contrib @janvorli I would value your feedback on the proposal. For now I would like to merge Arm32 stack probing logic only.