-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[SuperPMI] Support spmi-asmdiffs on Arm64 #48683
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
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
35f7bf1
Implement IMAGE_REL_ARM64_BRANCH26 in compileresult.cpp
echesakov 80be600
Introduce GetSpmiTargetArchitecture/SetSpmiTargetArchitecture helpers…
echesakov bbd037f
Do platform specific relocations (IMAGE_REL_BASED_HIGHLOW) first in C…
echesakov f5ec6d2
Do Arm64 specific relocations first (IMAGE_REL_ARM64_*) in src/corecl…
echesakov 226acee
Rename 'relocWasHandled' -> 'wasRelocHandled' in src/coreclr/ToolBox/…
echesakov a4cce85
Do 64-bit target specific relocations first (IMAGE_REL_BASED_DIR64) i…
echesakov bd38deb
Remove remaning 'if defined(TARGET_*)' in src/coreclr/ToolBox/superpm…
echesakov 1e31f44
Call repCompileMethod() on Arm64 to adjust hotCodeSize in src/coreclr…
echesakov 72c97ba
Add PutArm64Rel28 helper in src/coreclr/ToolBox/superpmi/superpmi-sha…
echesakov 48aff18
Add PutArm64Rel21 and PutArm64Rel12 helpers in src/coreclr/ToolBox/su…
echesakov ae3fa9d
Re-implement IMAGE_REL_ARM64_BRANCH26 and implement IMAGE_REL_ARM64_P…
echesakov a0b8cb4
Add PutThumb2Mov32 and PutThumb2BlRel24 helpers in src/coreclr/ToolBo…
echesakov 0a763b4
Enable IMAGE_REL_BASED_HIGHLOW on Arm in compileresult.cpp
echesakov 30023dd
Implement IMAGE_REL_BASED_THUMB_MOV32 IMAGE_REL_BASED_REL_THUMB_MOV32…
echesakov 6fe2d46
Add comment about functions copied from utilcode in spmiutil.cpp
echesakov df78f9c
Generalize checks for altjits in jitinstance.cpp
echesakov b9c6214
Add comment and add logic for figuring out roDataBlock/roDataSize on …
echesakov b88159d
Remove redundant cast in compileresult.cpp
echesakov 13d16ea
Use one error message for both 32-bit and 64-bit targets in compilere…
echesakov 227d6f6
Add comment before all platform relocations in src/coreclr/ToolBox/su…
echesakov ac3ce2e
Remove another redundant cast in compileresult.cpp
echesakov 365b24a
Remove unused CallUtils::HasRetBuffArg in callutils.cpp callutils.h
echesakov f805314
Add IsSpmiTarget64Bit() and SpmiTargetPointerSize() helpers in spmiut…
echesakov b4e70da
Update TypeUtils in typeutils.cpp
echesakov 74681c6
Use IsSpmiTarget64Bit() in compileresult.cpp
echesakov 3ad3238
Replace sizeof(void*) -> SpmiTargetPointerSize() in methodcontext.cpp
echesakov d280c5b
Fix warning in methodcontext.cpp
echesakov 5f9e9fd
Nit: "theor" -> "their" in neardiffer.cpp
echesakov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
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.
I was not sure what to do here. IIRC, if such overflow occurs in real product during crossgen the JIT would be required to re-compile the method without using this type of relocation.
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.
@BruceForstall Any opinion if this is desired behavior? What would/should happen during spmi collect when such relocation overflow occurs? Would the corresponding method context be included in the final collection?
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.
I'm not sure what would happen during spmi collection if it failed. It's supposed to throw and retry, but the retry logic for relocs in crossgen1 seems to be dependent on m_fNGenLastRetry, but I can't find how that ever gets set to true (because it's dependent on fNgenLastRetry, which is never set to true).
It looks like crossgen2 always returns IMAGE_REL_BASED_THUMB_BRANCH24 with no provision for overflow.
I would guess spmi would only record the retry compilation, but it's not clear that ever happens.