Skip to content

Commit 6ad8b12

Browse files
committed
Merge dotnet/main into feature/fcalls-cleanups
2 parents 36e7387 + c3e1bc3 commit 6ad8b12

File tree

172 files changed

+6912
-5505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+6912
-5505
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
]
1616
},
1717
"microsoft.dotnet.xharness.cli": {
18-
"version": "10.0.0-prerelease.24568.1",
18+
"version": "10.0.0-prerelease.24575.1",
1919
"commands": [
2020
"xharness"
2121
]

.github/workflows/jit-format.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,10 @@ jobs:
2828
container: ${{ matrix.os.container }}
2929
name: Format jit codebase ${{ matrix.os.name }}
3030
steps:
31-
- name: Checkout jitutils
32-
uses: actions/checkout@v4
33-
with:
34-
path: jitutils
35-
repository: dotnet/jitutils
36-
ref: main
37-
token: ${{ secrets.GITHUB_TOKEN }}
3831
- name: Install .NET
3932
uses: actions/setup-dotnet@v4
4033
with:
4134
dotnet-version: '8.0.x'
42-
- name: Build jitutils
43-
run: |
44-
./bootstrap${{ matrix.os.extension }}
45-
working-directory: jitutils
4635
- name: Checkout runtime
4736
uses: actions/checkout@v4
4837
with:
@@ -52,7 +41,7 @@ jobs:
5241

5342
- name: Run jitformat.py
5443
run: |
55-
python3 runtime/src/coreclr/scripts/jitformat.py --jitutils jitutils -r runtime -o ${{ matrix.os.name }} -a x64 ${{ matrix.os.cross }}
44+
python3 runtime/src/coreclr/scripts/jitformat.py -r runtime -o ${{ matrix.os.name }} -a x64 ${{ matrix.os.cross }}
5645
env:
5746
ROOTFS_DIR: ${{ matrix.os.rootfs }}
5847

@@ -61,4 +50,4 @@ jobs:
6150
with:
6251
path: runtime/format.patch
6352
name: format.${{matrix.os.name}}.patch
64-
if: failure()
53+
if: failure()

docs/design/coreclr/botr/ilc-architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Note that while "constructed" and "unconstructed" type nodes are modelled separa
129129

130130
Related compiler switches: `--dgmllog` serializes the dependency graph into an XML file. The XML file captures all the nodes in the graph, but only captures the first edge leading to the node (knowing the first edge is enough for most purposes). `--fulllog` generates an even bigger XML file that captures all the edges.
131131

132-
Related tools: [Dependency analysis viewer](../how-to-debug-compiler-dependency-analysis.md) is a tool that listens to ETW events generated by all the ILC compiler processes on the machine and lets you interactively explore the graph.
132+
Related tools: [Dependency analysis viewer](../../../../src/coreclr/tools/aot/DependencyGraphViewer/README.md) is a tool that listens to ETW events generated by all the ILC compiler processes on the machine and lets you interactively explore the graph.
133133

134134
## Object writing
135135
The final phase of compilation is writing out the outputs. The output of the compilation depends on the target environment but will typically be some sort of object file. An object file typically consists of blobs of code or data with links (or relocations) between them, and symbols: named locations within a blob. The relocations point to symbols, either defined within the same object file, or in a different module.

docs/design/coreclr/botr/profilability.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,23 @@ ICorProfilerCallback
3131

3232
This interface comprises the callbacks made by the CLR into the profiler to notify the profiler of interesting events. Each callback is wrapped in a thin method in the EE that handles locating the profiler's implementation of ICorProfilerCallback(2), and calling its corresponding method.
3333

34-
Profilers subscribe to events by specifying the corresponding flag in a call to ICorProfilerInfo::SetEventMask(). The profiling API stores these choices and exposes them to the CLR through specialized inline functions (CORProfiler\*) that mask against the bit corresponding to the flag. Then, sprinkled throughout the CLR, you'll see code that calls the ICorProfilerCallback wrapper to notify the profiler of events as they happen, but this call is conditional on the flag being set (determined by calling the specialized inline function):
34+
Profilers subscribe to events by specifying the corresponding flag in a call to ICorProfilerInfo::SetEventMask()/ICorProfilerInfo::SetEventMask2(). The profiling API stores these choices and exposes them to the CLR through specialized inline functions (CORProfiler\*) that mask against the bit corresponding to the flag. Then, sprinkled throughout the CLR, you'll see code that calls the ICorProfilerCallback wrapper to notify the profiler of events as they happen, but this call is conditional on the flag being set (determined by calling the specialized inline function):
3535

3636
{
37-
//check if profiler set flag, pin profiler
38-
BEGIN_PIN_PROFILER(CORProfilerTrackModuleLoads());
37+
// check if profiler set flag
38+
BEGIN_PROFILER_CALLBACK(CORProfilerTrackModuleLoads());
3939

40-
//call the wrapper around the profiler's callback implementation
41-
g_profControlBlock.pProfInterface->ModuleLoadStarted((ModuleID) this);
40+
// call the ProfControlBlock wrapper around the profiler's callback implementation
41+
// which pins the profiler in DoOneProfilerIteration via EvacuationCounterHolder
42+
(&g_profControlBlock)->ModuleLoadStarted((ModuleID) this);
43+
// unpins the profiler after completing the callback
4244

43-
//unpin profiler
44-
END_PIN_PROFILER();
45+
END_PROFILER_CALLBACK();
4546
}
4647

4748
To be clear, the code above is what you'll see sprinkled throughout the code base. The function it calls (in this case ModuleLoadStarted()) is our wrapper around the profiler's callback implementation (in this case ICorProfilerCallback::ModuleLoadStarted()). All of our wrappers appear in a single file (vm\EEToProfInterfaceImpl.cpp), and the guidance provided in the sections below relate to those wrappers; not to the above sample code that calls the wrappers.
4849

49-
The macro BEGIN\_PIN\_PROFILER evaluates the expression passed as its argument. If the expression is TRUE, then the profiler is pinned into memory (meaning the profiler will not be able to detach from the process) and the code between the BEGIN\_PIN\_PROFILER and END\_PIN\_PROFILER macros is executed. If the expression is FALSE, all code between the BEGIN\_PIN\_PROFILER and END\_PIN\_PROFILER macros is skipped. For more information about the BEGIN\_PIN\_PROFILER and END\_PIN\_PROFILER macros, find their definition in the code base and read the comments there.
50+
The macro BEGIN_PROFILER_CALLBACK evaluates the expression passed as its argument. If the expression is TRUE, the code between the BEGIN_PROFILER_CALLBACK and END_PROFILER_CALLBACK macros is executed, and the profiler is pinned into memory (meaning the profiler will not be able to detach from the process) through the ProfControlBlock wrapper. If the expression is FALSE, all code between the BEGIN_PROFILER_CALLBACK and END_PROFILER_CALLBACK macros is skipped. For more information about the BEGIN_PROFILER_CALLBACK and END_PROFILER_CALLBACK macros, find their definition in the code base and read the comments there.
5051

5152
Contracts
5253
---------

0 commit comments

Comments
 (0)