-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Place async resumption info in read-write section outside Windows for AOT #123433
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
Open
jakobbotsch
wants to merge
17
commits into
dotnet:main
Choose a base branch
from
jakobbotsch:fix-121871-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+186
−22
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
7c241a8
Add allocMem support for allocating multiple data chunks
jakobbotsch e8abae4
Fix some docs, do some CSEs
jakobbotsch 2b64b66
Bump JIT-EE GUID
jakobbotsch 2a2eee9
Fix RISCV64/LA64 builds
jakobbotsch e173739
Fix alignment for interpreter allocation
jakobbotsch 5989a20
Use "1" alignment for "default" alignment
jakobbotsch bda074b
Use binary search for emitDataOffsetToPtr
jakobbotsch 843c87b
Run jit-format
jakobbotsch 7506a46
Fix build
jakobbotsch 056f51b
Remove functional change
jakobbotsch f0b7e8a
Revert "Remove functional change"
jakobbotsch e2f56c0
Place async resumption info in read-write section outside Windows
jakobbotsch 1b06d01
New ClassCode
jakobbotsch 438a9d4
Merge branch 'main' of github.com:dotnet/runtime into fix-121871-2
jakobbotsch 01cb4ac
Resolve conflicts, enable async tests on NAOT arm64
jakobbotsch 6a813a1
Fix bad merge
jakobbotsch 1780989
Feedback
jakobbotsch 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
63 changes: 63 additions & 0 deletions
63
src/coreclr/tools/Common/Compiler/DependencyAnalysis/MethodReadWriteDataNode.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.Diagnostics; | ||
|
|
||
| using Internal.Text; | ||
| using Internal.TypeSystem; | ||
|
|
||
| namespace ILCompiler.DependencyAnalysis | ||
| { | ||
| public class MethodReadWriteDataNode : ObjectNode, ISymbolDefinitionNode | ||
| { | ||
| private MethodDesc _owningMethod; | ||
| private ObjectData _data; | ||
|
|
||
| public MethodReadWriteDataNode(MethodDesc owningMethod) | ||
| { | ||
| _owningMethod = owningMethod; | ||
| } | ||
|
|
||
| #if !READYTORUN | ||
| public override bool ShouldSkipEmittingObjectNode(NodeFactory factory) | ||
| { | ||
| IMethodNode owningBody = factory.MethodEntrypoint(_owningMethod); | ||
| return factory.ObjectInterner.GetDeduplicatedSymbol(factory, owningBody) != owningBody; | ||
| } | ||
| #endif | ||
|
|
||
| public override ObjectNodeSection GetSection(NodeFactory factory) | ||
| => ObjectNodeSection.DataSection; | ||
|
|
||
| public override bool StaticDependenciesAreComputed => _data != null; | ||
|
|
||
| public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb) | ||
| { | ||
| sb.Append("__readwritedata_"u8).Append(nameMangler.GetMangledMethodName(_owningMethod)); | ||
| } | ||
| public int Offset => 0; | ||
| public override bool IsShareable => true; | ||
|
|
||
| public void InitializeData(ObjectData data) | ||
| { | ||
| Debug.Assert(_data == null); | ||
| _data = data; | ||
| } | ||
|
|
||
| public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) | ||
| { | ||
| return _data; | ||
| } | ||
|
|
||
| protected override string GetName(NodeFactory factory) => this.GetMangledName(factory.NameMangler); | ||
|
|
||
| #if !SUPPORT_JIT | ||
| public override int ClassCode => 689723708; | ||
|
|
||
| public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) | ||
| { | ||
| return comparer.Compare(_owningMethod, ((MethodReadWriteDataNode)other)._owningMethod); | ||
| } | ||
| #endif | ||
| } | ||
| } |
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.
BTW: it seems questionable whether we need this "put into .text" behavior at all. And if we do (due to distance constraints), then presumably we could hit problems for async resumption info too.
If we end up with the optimization to fold common read only data then we will probably want to disable this so that it also kicks in for arm64.