Skip to content

Update ImportThunk for community architectures to use PC-relative addressing - #121453

Merged
jkoritzinsky merged 5 commits into
dotnet:mainfrom
jkoritzinsky:pc-relative-community-arch
Nov 11, 2025
Merged

Update ImportThunk for community architectures to use PC-relative addressing#121453
jkoritzinsky merged 5 commits into
dotnet:mainfrom
jkoritzinsky:pc-relative-community-arch

Conversation

@jkoritzinsky

Copy link
Copy Markdown
Member

They now match the ARM64 model we just moved to in #121352

Also, clean up the ARM64 import thunk code while we're at it.

They now match the ARM64 model we just moved to in dotnet#121352
Also, clean up the ARM64 emitter while we're at it.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the ImportThunk code generation for RiscV64 and LoongArch64 architectures to use a more efficient PC-relative addressing approach for loading the Module* pointer. The changes simplify the code by introducing new EmitLD(Register, ISymbolNode) overloads that emit PC-relative relocations directly in the instruction sequence, eliminating the need for manually managing offset calculations and DIR64 data slots that were required in the previous implementation.

  • Removes complex PC-based offset calculations and replaces them with cleaner PC-relative relocations
  • Introduces new EmitLD(Register, ISymbolNode) helper methods in both RiscV64Emitter and LoongArch64Emitter
  • Simplifies ImportThunk code by removing manual relocation management and offset tracking
  • Removes the _symbolOffset field and ISymbolNode.Offset override that were needed for alignment workarounds

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_RiscV64/ImportThunk.csRefactored to use new EmitLD helper for Module* loading, removing manual PC-relative addressing code
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_LoongArch64/ImportThunk.csRefactored to use new EmitLD helper for Module* loading, removing manual PC-relative addressing code
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_ARM64/ImportThunk.csRemoved relocsOnly early return handling as part of code cleanup
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportThunk.csRemoved _symbolOffset field and related offset adjustment logic no longer needed with new approach
src/coreclr/tools/Common/Compiler/DependencyAnalysis/Target_RiscV64/RiscV64Emitter.csAdded new EmitLD overload for symbol-based loading; simplified EmitJMP to use the new helper
src/coreclr/tools/Common/Compiler/DependencyAnalysis/Target_LoongArch64/LoongArch64Emitter.csAdded new EmitLD overload for symbol-based loading; simplified EmitJMP to use the new helper
Comments suppressed due to low confidence (1)

src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_RiscV64/ImportThunk.cs:27

  • Dead code. The case Kind.Eager is unreachable because it's already handled by the early return at lines 18-22. This case should be removed as it can never be executed.
 case Kind.Eager:
break;

am11
am11 approved these changes Nov 7, 2025

@am11am11 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

cc @dotnet/samsung @LuckyXu-HF@shushanhf

@am11

am11 commented Nov 7, 2025

Copy link
Copy Markdown
Member

Running AOT smoke tests leg (QEMU) against this PR:

linux-riscv64: https://github.com/am11/CrossRepoCITesting/actions/runs/19179619151
linux-musl-riscv64: https://github.com/am11/CrossRepoCITesting/actions/runs/19179622330
linux-loongarch64: https://github.com/am11/CrossRepoCITesting/actions/runs/19179625414
linux-musl-loongarch64: https://github.com/am11/CrossRepoCITesting/actions/runs/19179629519

…yAnalysis/ReadyToRun/Target_RiscV64/ImportThunk.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@am11

am11 commented Nov 7, 2025

Copy link
Copy Markdown
Member

Errors look related:

riscv64:

 Generating native image of System.Private.CoreLib for linux.riscv64.Checked. Logging to /runtime/artifacts/bin/coreclr/linux.riscv64.Checked/x64/crossgen2/crossgen2 -o:/runtime/artifacts/bin/coreclr/linux.riscv64.Checked/System.Private.CoreLib.dll -r:/runtime/artifacts/bin/coreclr/linux.riscv64.Checked/IL/*.dll --targetarch:riscv64 --targetos:linux -m:/runtime/artifacts/bin/coreclr/linux.riscv64.Checked/StandardOptimizationData.mibc --embed-pgo-data -O --verify-type-and-field-layout --enable-cached-interface-dispatch-support /runtime/artifacts/bin/coreclr/linux.riscv64.Checked/IL/System.Private.CoreLib.dll --perfmap-format-version:1 --perfmap --perfmap-path:/runtime/artifacts/bin/coreclr/linux.riscv64.Checked/
Process terminated.
Assertion failed.
_index != InvalidOffset
at ILCompiler.DependencyAnalysis.EmbeddedObjectNode.get_IndexFromBeginningOfArray() in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs:line 38
at ILCompiler.DependencyAnalysis.ReadyToRun.ImportThunk.EmitCode(NodeFactory factory, RiscV64Emitter& instructionEncoder, Boolean relocsOnly) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_RiscV64/ImportThunk.cs:line 36
at ILCompiler.DependencyAnalysis.AssemblyStubNode.GetData(NodeFactory factory, Boolean relocsOnly) in /_/src/coreclr/tools/Common/Compiler/DependencyAnalysis/AssemblyStubNode.cs:line 80
at ILCompiler.DependencyAnalysis.ObjectNode.GetStaticDependencies(NodeFactory factory) in /_/src/coreclr/tools/Common/Compiler/DependencyAnalysis/ObjectNode.cs:line 59
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.GetStaticDependenciesImpl(DependencyNodeCore`1 node) in /_/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 182
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ProcessMarkStack() in /_/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 257
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() in /_/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 308
at ILCompiler.ReadyToRunCodegenCompilation.Compile(String outputFile) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs:line 393
at ILCompiler.Program.RunSingleCompilation(Dictionary`2 inFilePaths, InstructionSetSupport instructionSetSupport, String compositeRootPath, Dictionary`2 unrootedInputFilePaths, HashSet`1 versionBubbleModulesHash, ReadyToRunCompilerContext typeSystemContext, Logger logger) in /_/src/coreclr/tools/aot/crossgen2/Program.cs:line 641
at ILCompiler.Program.Run() in /_/src/coreclr/tools/aot/crossgen2/Program.cs:line 304
at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass211_0.<.ctor>b__0(ParseResult result) in /_/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs:line 268
at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult parseResult)
at ILCompiler.Program.Main(String[] args) in /_/src/coreclr/tools/aot/crossgen2/Program.cs:line 918

loongarch64:

 Generating native image of System.Private.CoreLib for linux.loongarch64.Checked. Logging to /runtime/artifacts/bin/coreclr/linux.loongarch64.Checked/x64/crossgen2/crossgen2 -o:/runtime/artifacts/bin/coreclr/linux.loongarch64.Checked/System.Private.CoreLib.dll -r:/runtime/artifacts/bin/coreclr/linux.loongarch64.Checked/IL/*.dll --targetarch:loongarch64 --targetos:linux -m:/runtime/artifacts/bin/coreclr/linux.loongarch64.Checked/StandardOptimizationData.mibc --embed-pgo-data -O --verify-type-and-field-layout --enable-cached-interface-dispatch-support /runtime/artifacts/bin/coreclr/linux.loongarch64.Checked/IL/System.Private.CoreLib.dll --perfmap-format-version:1 --perfmap --perfmap-path:/runtime/artifacts/bin/coreclr/linux.loongarch64.Checked/
Process terminated.
Assertion failed.
_index != InvalidOffset
at ILCompiler.DependencyAnalysis.EmbeddedObjectNode.get_IndexFromBeginningOfArray() in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs:line 38
at ILCompiler.DependencyAnalysis.ReadyToRun.ImportThunk.EmitCode(NodeFactory factory, LoongArch64Emitter& instructionEncoder, Boolean relocsOnly) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_LoongArch64/ImportThunk.cs:line 36
at ILCompiler.DependencyAnalysis.AssemblyStubNode.GetData(NodeFactory factory, Boolean relocsOnly) in /_/src/coreclr/tools/Common/Compiler/DependencyAnalysis/AssemblyStubNode.cs:line 73
at ILCompiler.DependencyAnalysis.ObjectNode.GetStaticDependencies(NodeFactory factory) in /_/src/coreclr/tools/Common/Compiler/DependencyAnalysis/ObjectNode.cs:line 59
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.GetStaticDependenciesImpl(DependencyNodeCore`1 node) in /_/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 182
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ProcessMarkStack() in /_/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 257
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() in /_/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 308
at ILCompiler.ReadyToRunCodegenCompilation.Compile(String outputFile) in /_/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs:line 393
at ILCompiler.Program.RunSingleCompilation(Dictionary`2 inFilePaths, InstructionSetSupport instructionSetSupport, String compositeRootPath, Dictionary`2 unrootedInputFilePaths, HashSet`1 versionBubbleModulesHash, ReadyToRunCompilerContext typeSystemContext, Logger logger) in /_/src/coreclr/tools/aot/crossgen2/Program.cs:line 641
at ILCompiler.Program.Run() in /_/src/coreclr/tools/aot/crossgen2/Program.cs:line 304
at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass211_0.<.ctor>b__0(ParseResult result) in /_/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs:line 268
at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult parseResult)
at ILCompiler.Program.Main(String[] args) in /_/src/coreclr/tools/aot/crossgen2/Program.cs:line 918

@jkoritzinsky

Copy link
Copy Markdown
MemberAuthor

Guess I still need the relocs-only paths. I'll go fix that.

@jkoritzinsky

Copy link
Copy Markdown
MemberAuthor

@am11 can you validate this PR again in your testing?

@am11

am11 commented Nov 10, 2025

Copy link
Copy Markdown
Member

Already ran and most of them have passed:

linux-riscv64: https://github.com/am11/CrossRepoCITesting/actions/runs/19242307084
linux-musl-riscv64: https://github.com/am11/CrossRepoCITesting/actions/runs/19242290314
linux-loongarch64: https://github.com/am11/CrossRepoCITesting/actions/runs/19243815389
linux-musl-loongarch64: https://github.com/am11/CrossRepoCITesting/actions/runs/19242301945

linux-musl-loongarch64 has unrelated exception but you might be interested:

 ===== Running test BasicThreading.Run =====
Process terminated. Assertion failed.
_ownerThread == null
at System.Diagnostics.DebugProvider.Fail(String, String) + 0x48
at System.Diagnostics.Debug.Fail(String, String) + 0x5c
at System.Threading.WaitSubsystem.ThreadWaitInfo.Wait(Int32, Boolean, Boolean, WaitSubsystem.LockHolder&) + 0x53c
at System.Threading.WaitSubsystem.Wait(WaitSubsystem.IWaitableObject, WaitSubsystem.ThreadWaitInfo, Int32, Boolean, Boolean) + 0x118
at System.Threading.WaitHandle.WaitOneNoCheck(Int32, Boolean, Object, NativeRuntimeEventSource.WaitHandleWaitSourceMap) + 0x124
at System.Threading.Condition.Wait(Int32, Object) + 0xe8
at System.Threading.ManualResetEventSlim.Wait(Int32, CancellationToken) + 0x318
at System.Threading.Tasks.Task.WaitAllBlockingCore(List`1, Int32, CancellationToken) + 0x1e8
at System.Threading.Tasks.Task.WaitAllCore(ReadOnlySpan`1, Int32, CancellationToken) + 0x390
at System.Threading.Tasks.Task.WaitAll(Task[]) + 0x68
at ThreadTest.TestConcurrentIsBackgroundProperty() + 0x338
at ThreadTest.Run() + 0x70
at BasicThreading.Run() + 0x48
at Program.<<Main>$>g__RunTest|0_0(Func`1, String) + 0x70
at Program.<Main>$(String[] args) + 0x78

@am11am11 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jkoritzinsky
jkoritzinsky enabled auto-merge (squash) November 10, 2025 19:58
@shushanhf

Copy link
Copy Markdown
Contributor

We will check the LoongArch64 again. Thanks.

@LuckyXu-HF

Copy link
Copy Markdown
Contributor

We will check the LoongArch64 again. Thanks.

The Release/Debug/Checked nativeaot testcases passed on our local Alpine-6.12.3-0-lts environment based on this PR:

nativeaot-Release
xuliangyu@loongson-alpine:~/PR121453/runtime$ ./src/tests/run.sh --runnativeaottests release Build Architecture : loongarch64
Build Configuration : Release
Running NativeAOT compiled tests
python3 /home/xuliangyu/PR121453/runtime/src/tests/run.py -arch loongarch64 -build_type Release --run_nativeaot_tests
host_os : linux
arch : loongarch64
build_type : Release
runtime_repo_location : /home/xuliangyu/PR121453/runtime
core_root : /home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Release/Tests/Core_Root
test_location : /home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Release
logs_dir : /home/xuliangyu/PR121453/runtime/artifacts/log
Running tests NativeAOT
Setting __TestTimeout=1800000
Setting CORE_ROOT=/home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Release/Tests/Core_Root
Setting __TestDotNetCmd=/home/xuliangyu/PR121453/runtime/dotnet.sh
/home/xuliangyu/PR121453/runtime/dotnet.sh msbuild /home/xuliangyu/PR121453/runtime/src/tests/build.proj /t:RunTests /fileLoggerParameters:"Verbosity=normal;LogFile=/home/xuliangyu/PR121453/runtime/artifacts/log/TestRunResults_linux_loongarch64_Release.log" /fileLoggerParameters1:"WarningsOnly;LogFile=/home/xuliangyu/PR121453/runtime/artifacts/log/TestRunResults_linux_loongarch64_Release.wrn" /fileLoggerParameters2:"ErrorsOnly;LogFile=/home/xuliangyu/PR121453/runtime/artifacts/log/TestRunResults_linux_loongarch64_Release.err" /binaryLogger:/home/xuliangyu/PR121453/runtime/artifacts/log/TestRunResults_linux_loongarch64_Release.binlog /consoleLoggerParameters:"ShowCommandLine;Summary" /p:TargetOS=linux /p:TargetArchitecture=loongarch64 /p:Configuration=Release /p:__LogsDir=/home/xuliangyu/PR121453/runtime/artifacts/log
/home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Release/nativeaot/nativeaot/nativeaot.sh >/home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Release/nativeaot/nativeaot/nativeaot.log 2>&1
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:13.67
Test run finished.
Parsing test results from (/home/xuliangyu/PR121453/runtime/artifacts/log)
Analyzing /home/xuliangyu/PR121453/runtime/artifacts/log/nativeaot.nativeaot.testRun.xml
Time [secs] | Total | Passed | Failed | Skipped | Assembly Execution Summary
============================================================================
12.154 | 20 | 20 | 0 | 0 | nativeaot.nativeaot
----------------------------------------------------------------------------
12.154 | 20 | 20 | 0 | 0 | (total)
nativeaot-Debug
xuliangyu@loongson-alpine:~/PR121453/runtime$ ./src/tests/run.sh --runnativeaottests debug Build Architecture : loongarch64
Build Configuration : Debug
Running NativeAOT compiled tests
python3 /home/xuliangyu/PR121453/runtime/src/tests/run.py -arch loongarch64 -build_type Debug --run_nativeaot_tests
host_os : linux
arch : loongarch64
build_type : Debug
runtime_repo_location : /home/xuliangyu/PR121453/runtime
core_root : /home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Debug/Tests/Core_Root
test_location : /home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Debug
logs_dir : /home/xuliangyu/PR121453/runtime/artifacts/log
Running tests NativeAOT
Setting __TestTimeout=1800000
Setting CORE_ROOT=/home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Debug/Tests/Core_Root
Setting __TestDotNetCmd=/home/xuliangyu/PR121453/runtime/dotnet.sh
/home/xuliangyu/PR121453/runtime/dotnet.sh msbuild /home/xuliangyu/PR121453/runtime/src/tests/build.proj /t:RunTests /fileLoggerParameters:"Verbosity=normal;LogFile=/home/xuliangyu/PR121453/runtime/artifacts/log/TestRunResults_linux_loongarch64_Debug.log" /fileLoggerParameters1:"WarningsOnly;LogFile=/home/xuliangyu/PR121453/runtime/artifacts/log/TestRunResults_linux_loongarch64_Debug.wrn" /fileLoggerParameters2:"ErrorsOnly;LogFile=/home/xuliangyu/PR121453/runtime/artifacts/log/TestRunResults_linux_loongarch64_Debug.err" /binaryLogger:/home/xuliangyu/PR121453/runtime/artifacts/log/TestRunResults_linux_loongarch64_Debug.binlog /consoleLoggerParameters:"ShowCommandLine;Summary" /p:TargetOS=linux /p:TargetArchitecture=loongarch64 /p:Configuration=Debug /p:__LogsDir=/home/xuliangyu/PR121453/runtime/artifacts/log
/home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Debug/nativeaot/nativeaot/nativeaot.sh >/home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Debug/nativeaot/nativeaot/nativeaot.log 2>&1
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:36.29
Test run finished.
Parsing test results from (/home/xuliangyu/PR121453/runtime/artifacts/log)
Analyzing /home/xuliangyu/PR121453/runtime/artifacts/log/nativeaot.nativeaot.testRun.xml
Time [secs] | Total | Passed | Failed | Skipped | Assembly Execution Summary
============================================================================
34.778 | 20 | 20 | 0 | 0 | nativeaot.nativeaot
----------------------------------------------------------------------------
34.778 | 20 | 20 | 0 | 0 | (total)
nativeaot-Checked
xuliangyu@loongson-alpine:~/PR121453/runtime$ ./src/tests/run.sh --runnativeaottests checked
Build Architecture : loongarch64
Build Configuration : Checked
Running NativeAOT compiled tests
python3 /home/xuliangyu/PR121453/runtime/src/tests/run.py -arch loongarch64 -build_type Checked --run_nativeaot_tests
host_os : linux
arch : loongarch64
build_type : Checked
runtime_repo_location : /home/xuliangyu/PR121453/runtime
core_root : /home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Checked/Tests/Core_Root
test_location : /home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Checked
logs_dir : /home/xuliangyu/PR121453/runtime/artifacts/log
Running tests NativeAOT
Setting __TestTimeout=1800000
Setting CORE_ROOT=/home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Checked/Tests/Core_Root
Setting __TestDotNetCmd=/home/xuliangyu/PR121453/runtime/dotnet.sh
/home/xuliangyu/PR121453/runtime/dotnet.sh msbuild /home/xuliangyu/PR121453/runtime/src/tests/build.proj /t:RunTests /fileLoggerParameters:"Verbosity=normal;LogFile=/home/xuliangyu/PR121453/runtime/artifacts/log/TestRunResults_linux_loongarch64_Checked.log" /fileLoggerParameters1:"WarningsOnly;LogFile=/home/xuliangyu/PR121453/runtime/artifacts/log/TestRunResults_linux_loongarch64_Checked.wrn" /fileLoggerParameters2:"ErrorsOnly;LogFile=/home/xuliangyu/PR121453/runtime/artifacts/log/TestRunResults_linux_loongarch64_Checked.err" /binaryLogger:/home/xuliangyu/PR121453/runtime/artifacts/log/TestRunResults_linux_loongarch64_Checked.binlog /consoleLoggerParameters:"ShowCommandLine;Summary" /p:TargetOS=linux /p:TargetArchitecture=loongarch64 /p:Configuration=Checked /p:__LogsDir=/home/xuliangyu/PR121453/runtime/artifacts/log
/home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Checked/nativeaot/nativeaot/nativeaot.sh >/home/xuliangyu/PR121453/runtime/artifacts/tests/coreclr/linux.loongarch64.Checked/nativeaot/nativeaot/nativeaot.log 2>&1
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:14.85
Test run finished.
Parsing test results from (/home/xuliangyu/PR121453/runtime/artifacts/log)
Analyzing /home/xuliangyu/PR121453/runtime/artifacts/log/nativeaot.nativeaot.testRun.xml
Time [secs] | Total | Passed | Failed | Skipped | Assembly Execution Summary
============================================================================
13.352 | 20 | 20 | 0 | 0 | nativeaot.nativeaot
----------------------------------------------------------------------------
13.352 | 20 | 20 | 0 | 0 | (total)

The BasicThreading.Run passed 10 times with 0 failed in UnitTests.
Thank you very much!

@MichalStrehovsky

Copy link
Copy Markdown
Member

The Release/Debug/Checked nativeaot testcases passed on our local Alpine-6.12.3-0-lts environment based on this PR:

I don't think this change affects native AOT - this is a ReadyToRun change. I see some changes to files shared with native AOT under Common/Compiler, but I don't believe the if (symbol.RepresentsIndirectionCell) branches are ever taken under native AOT.

@LuckyXu-HF

LuckyXu-HF commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

The Release/Debug/Checked nativeaot testcases passed on our local Alpine-6.12.3-0-lts environment based on this PR:

I don't think this change affects native AOT - this is a ReadyToRun change. I see some changes to files shared with native AOT under Common/Compiler, but I don't believe the if (symbol.RepresentsIndirectionCell) branches are ever taken under native AOT.

I will check about the R2R, thank you.


The building and testing results related to R2R looks good, all R2R tests passed:

  • Release CoreRoot(S.P.C.dll PE32+): Total: 14280 ; Passed: 14094 ; Failed: 0 ; Skipped: 186 ; Time: 2231.004s ; PassRate: 100%
  • Debug CoreRoot(S.P.C.dll PE32+): Total: 14280 ; Passed: 14094 ; Failed: 0 ; Skipped: 186 ; Time: 11338.514s ; PassRate: 100%
Release CoreRoot
Time [secs] | Total | Passed | Failed | Skipped | Assembly Execution Summary
============================================================================
3.955 | 208 | 208 | 0 | 0 | JIT.Methodical.Methodical_d2
3.974 | 116 | 116 | 0 | 0 | JIT.SIMD.JIT.SIMD
2.530 | 17 | 17 | 0 | 0 | reflection.reflection
24.349 | 170 | 155 | 0 | 15 | baseservices.exceptions.baseservices-exceptions
1.105 | 290 | 290 | 0 | 0 | JIT.Regression.Regression_6
0.712 | 170 | 170 | 0 | 0 | JIT.Regression.Regression_7
0.290 | 0 | 0 | 0 | 0 | JIT.Regression.Regression_r_1
5.758 | 67 | 67 | 0 | 0 | Loader.classloader.regressions.LoaderClassloaderRegressions
1.659 | 405 | 405 | 0 | 0 | JIT.IL_Conformance.IL_Conformance
0.390 | 0 | 0 | 0 | 0 | JIT.jit64.jit64_4
3.958 | 178 | 177 | 0 | 1 | JIT.Regression.Regression_ro_2
51.055 | 1 | 1 | 0 | 0 | readytorun.coreroot_determinism.readytorun_coreroot_determinism
231.336 | 45 | 43 | 0 | 2 | GC.Features.GC-features
1.045 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests0-99
1.171 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests400-499
0.418 | 37 | 37 | 0 | 0 | JIT.Regression.Regression_PdbOnly_r_1
0.629 | 160 | 160 | 0 | 0 | JIT.CodeGenBringUpTests.JIT.CodeGenBringUpTests_ro
22.950 | 2584 | 2584 | 0 | 0 | JIT.HardwareIntrinsics.HardwareIntrinsics_General_r
0.361 | 3 | 3 | 0 | 0 | JIT.Regression.Regression_PdbOnly_ro
1.295 | 81 | 81 | 0 | 0 | JIT.jit64.jit64_1
0.629 | 161 | 161 | 0 | 0 | JIT.CodeGenBringUpTests.JIT.CodeGenBringUpTests_r
57.617 | 88 | 88 | 0 | 0 | baseservices.threading.threading_group2
0.615 | 3 | 3 | 0 | 0 | JIT.JIT_do
3.187 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests700-799
0.970 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests100-199
3.172 | 83 | 83 | 0 | 0 | JIT.Methodical.Methodical_do
68.577 | 105 | 98 | 0 | 7 | GC.GC
182.171 | 12 | 12 | 0 | 0 | JIT.JIT_others
6.489 | 112 | 112 | 0 | 0 | JIT.Regression.Regression_1
4.236 | 216 | 216 | 0 | 0 | Loader.classloader.generics.LoaderClassloaderGenerics
3.176 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests1200-1299
8.090 | 231 | 230 | 0 | 1 | JIT.Directed.Directed_3
3.910 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests800-899
2.435 | 101 | 101 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests1400-1599
0.513 | 6 | 6 | 0 | 0 | JIT.Regression.Regression_do
2.731 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests600-699
9.427 | 2 | 2 | 0 | 0 | JIT.Regression.Regression_d
0.400 | 4 | 4 | 0 | 0 | JIT.Regression.Regression_NoOptimize_r_1
0.496 | 160 | 160 | 0 | 0 | JIT.CodeGenBringUpTests.JIT.CodeGenBringUpTests_do
5.955 | 18 | 18 | 0 | 0 | JIT.JIT_r
7.724 | 217 | 217 | 0 | 0 | JIT.Directed.Directed_1
3.000 | 216 | 216 | 0 | 0 | JIT.Generics.JIT.Generics
18.740 | 90 | 86 | 0 | 4 | JIT.Regression.Regression_2
80.475 | 19 | 18 | 0 | 1 | readytorun.readytorun
3.349 | 36 | 36 | 0 | 0 | tracing.tracing
12.909 | 88 | 88 | 0 | 0 | JIT.Regression.Regression_4
3.511 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests1000-1099
3.438 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests1100-1199
6.591 | 275 | 275 | 0 | 0 | JIT.Methodical.Methodical_d1
1.843 | 158 | 90 | 0 | 68 | JIT.Regression.Regression_o_2
4.101 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests900-999
0.504 | 2 | 2 | 0 | 0 | JIT.JIT_d
0.605 | 2 | 2 | 0 | 0 | Exceptions.Exceptions
287.298 | 382 | 381 | 0 | 1 | JIT.opt.JIT.opt
2.364 | 165 | 152 | 0 | 13 | JIT.Regression.Regression_o_3
4.772 | 113 | 110 | 0 | 3 | JIT.Regression.Regression_o_1
7.835 | 55 | 55 | 0 | 0 | CoreMangLib.CoreMangLib
0.779 | 32 | 32 | 0 | 0 | JIT.Regression.Regression_PdbOnly_r_3
363.504 | 100 | 100 | 0 | 0 | JIT.Performance.JIT.performance
18.440 | 26 | 26 | 0 | 0 | profiler.profiler
0.967 | 56 | 56 | 0 | 0 | JIT.Methodical.Methodical_others
0.256 | 0 | 0 | 0 | 0 | JIT.Regression.Regression_PdbOnly_r
3.068 | 211 | 211 | 0 | 0 | JIT.Methodical.Methodical_r2
62.104 | 39 | 35 | 0 | 4 | baseservices.baseservices
0.319 | 11 | 11 | 0 | 0 | JIT.Regression.Regression_8
15.489 | 215 | 215 | 0 | 0 | JIT.Directed.Directed_2
1.075 | 13 | 13 | 0 | 0 | ilasm.ilasm_tests
57.919 | 75 | 74 | 0 | 1 | baseservices.threading.threading_group1
131.006 | 131 | 131 | 0 | 0 | JIT.jit64.jit64_3
157.143 | 232 | 232 | 0 | 0 | JIT.jit64.jit64_5
0.648 | 160 | 160 | 0 | 0 | JIT.CodeGenBringUpTests.JIT.CodeGenBringUpTests_d
0.344 | 28 | 8 | 0 | 20 | JIT.Regression.Regression_9
1.712 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests200-299
4.093 | 229 | 207 | 0 | 22 | Interop.Interop
4.885 | 60 | 59 | 0 | 1 | JIT.Regression.Regression_ro_1
0.239 | 0 | 0 | 0 | 0 | JIT.Regression.Regression_PdbOnly_r_4
3.489 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests1300-1399
3.153 | 83 | 83 | 0 | 0 | JIT.Methodical.Methodical_ro
0.276 | 0 | 0 | 0 | 0 | managed.Managed
0.324 | 3 | 3 | 0 | 0 | JIT.Regression.Regression_NoOptimize_d
5.763 | 18 | 18 | 0 | 0 | JIT.JIT_ro
1.602 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests300-399
5.530 | 278 | 278 | 0 | 0 | JIT.Methodical.Methodical_r1
0.567 | 14 | 14 | 0 | 0 | JIT.Regression.Regression_5
1.173 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests500-599
0.327 | 35 | 34 | 0 | 1 | JIT.Regression.Regression_PdbOnly_r_2
29.375 | 86 | 86 | 0 | 0 | Regressions.Regressions
81.344 | 347 | 346 | 0 | 1 | Loader.Loader
79.307 | 51 | 51 | 0 | 0 | GC.Scenarios.GC-scenarios1
2.196 | 116 | 116 | 0 | 0 | JIT.Regression.Regression_3
19.469 | 2551 | 2551 | 0 | 0 | JIT.HardwareIntrinsics.HardwareIntrinsics_General_ro
0.328 | 28 | 8 | 0 | 20 | JIT.Regression.Regression_10
----------------------------------------------------------------------------
2231.004 | 14280 | 14094 | 0 | 186 | (total)
Debug CoreRoot
Time [secs] | Total | Passed | Failed | Skipped | Assembly Execution Summary
============================================================================
34.693 | 112 | 112 | 0 | 0 | JIT.Regression.Regression_1
150.755 | 39 | 35 | 0 | 4 | baseservices.baseservices
66.349 | 83 | 83 | 0 | 0 | JIT.Methodical.Methodical_ro
33.000 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests200-299
28.220 | 18 | 18 | 0 | 0 | JIT.JIT_r
4.763 | 3 | 3 | 0 | 0 | JIT.JIT_do
410.261 | 105 | 98 | 0 | 7 | GC.GC
77.560 | 55 | 55 | 0 | 0 | CoreMangLib.CoreMangLib
6.669 | 14 | 14 | 0 | 0 | JIT.Regression.Regression_5
77.100 | 278 | 278 | 0 | 0 | JIT.Methodical.Methodical_r1
717.574 | 215 | 215 | 0 | 0 | JIT.Directed.Directed_2
41.725 | 216 | 216 | 0 | 0 | JIT.Generics.JIT.Generics
19.978 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests400-499
94.244 | 231 | 230 | 0 | 1 | JIT.Directed.Directed_3
4.732 | 3 | 3 | 0 | 0 | JIT.Regression.Regression_PdbOnly_ro
72.689 | 275 | 275 | 0 | 0 | JIT.Methodical.Methodical_d1
21.097 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests0-99
95.714 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests1300-1399
68.571 | 116 | 116 | 0 | 0 | JIT.Regression.Regression_3
0.907 | 0 | 0 | 0 | 0 | managed.Managed
3.612 | 11 | 11 | 0 | 0 | JIT.Regression.Regression_8
17.017 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests100-199
205.810 | 75 | 74 | 0 | 1 | baseservices.threading.threading_group1
112.729 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests900-999
326.711 | 232 | 232 | 0 | 0 | JIT.jit64.jit64_5
57.102 | 211 | 211 | 0 | 0 | JIT.Methodical.Methodical_r2
452.934 | 100 | 100 | 0 | 0 | JIT.Performance.JIT.performance
17.606 | 290 | 290 | 0 | 0 | JIT.Regression.Regression_6
2.027 | 35 | 34 | 0 | 1 | JIT.Regression.Regression_PdbOnly_r_2
28.428 | 18 | 18 | 0 | 0 | JIT.JIT_ro
6.180 | 2 | 2 | 0 | 0 | Exceptions.Exceptions
46.177 | 116 | 116 | 0 | 0 | JIT.SIMD.JIT.SIMD
19.945 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests500-599
76.110 | 88 | 88 | 0 | 0 | baseservices.threading.threading_group2
237.724 | 88 | 88 | 0 | 0 | JIT.Regression.Regression_4
465.136 | 86 | 86 | 0 | 0 | Regressions.Regressions
14.723 | 113 | 110 | 0 | 3 | JIT.Regression.Regression_o_1
708.078 | 347 | 346 | 0 | 1 | Loader.Loader
92.317 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests1100-1199
286.349 | 19 | 18 | 0 | 1 | readytorun.readytorun
21.713 | 60 | 59 | 0 | 1 | JIT.Regression.Regression_ro_1
0.730 | 0 | 0 | 0 | 0 | JIT.Regression.Regression_PdbOnly_r
0.726 | 0 | 0 | 0 | 0 | JIT.Regression.Regression_r_1
409.282 | 51 | 51 | 0 | 0 | GC.Scenarios.GC-scenarios1
3.419 | 6 | 6 | 0 | 0 | JIT.Regression.Regression_do
5.267 | 160 | 160 | 0 | 0 | JIT.CodeGenBringUpTests.JIT.CodeGenBringUpTests_do
9.942 | 56 | 56 | 0 | 0 | JIT.Methodical.Methodical_others
413.258 | 2584 | 2584 | 0 | 0 | JIT.HardwareIntrinsics.HardwareIntrinsics_General_r
6.934 | 158 | 90 | 0 | 68 | JIT.Regression.Regression_o_2
1.608 | 4 | 4 | 0 | 0 | JIT.Regression.Regression_NoOptimize_r_1
118.033 | 67 | 67 | 0 | 0 | Loader.classloader.regressions.LoaderClassloaderRegressions
86.799 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests1200-1299
11.660 | 170 | 170 | 0 | 0 | JIT.Regression.Regression_7
16.731 | 81 | 81 | 0 | 0 | JIT.jit64.jit64_1
66.428 | 83 | 83 | 0 | 0 | JIT.Methodical.Methodical_do
66.441 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests600-699
10.814 | 2 | 2 | 0 | 0 | JIT.Regression.Regression_d
8.177 | 165 | 152 | 0 | 13 | JIT.Regression.Regression_o_3
62.171 | 208 | 208 | 0 | 0 | JIT.Methodical.Methodical_d2
615.212 | 1 | 1 | 0 | 0 | readytorun.coreroot_determinism.readytorun_coreroot_determinism
1080.810 | 382 | 381 | 0 | 1 | JIT.opt.JIT.opt
338.346 | 12 | 12 | 0 | 0 | JIT.JIT_others
362.856 | 2551 | 2551 | 0 | 0 | JIT.HardwareIntrinsics.HardwareIntrinsics_General_ro
1.945 | 28 | 8 | 0 | 20 | JIT.Regression.Regression_10
4.138 | 28 | 8 | 0 | 20 | JIT.Regression.Regression_9
79.599 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests700-799
0.842 | 0 | 0 | 0 | 0 | JIT.jit64.jit64_4
317.826 | 131 | 131 | 0 | 0 | JIT.jit64.jit64_3
134.042 | 90 | 86 | 0 | 4 | JIT.Regression.Regression_2
4.215 | 2 | 2 | 0 | 0 | JIT.JIT_d
221.793 | 26 | 26 | 0 | 0 | profiler.profiler
14.411 | 178 | 177 | 0 | 1 | JIT.Regression.Regression_ro_2
132.312 | 229 | 207 | 0 | 22 | Interop.Interop
455.684 | 45 | 43 | 0 | 2 | GC.Features.GC-features
41.174 | 36 | 36 | 0 | 0 | tracing.tracing
9.705 | 13 | 13 | 0 | 0 | ilasm.ilasm_tests
1.436 | 3 | 3 | 0 | 0 | JIT.Regression.Regression_NoOptimize_d
99.109 | 216 | 216 | 0 | 0 | Loader.classloader.generics.LoaderClassloaderGenerics
8.788 | 32 | 32 | 0 | 0 | JIT.Regression.Regression_PdbOnly_r_3
30.541 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests300-399
261.146 | 170 | 155 | 0 | 15 | baseservices.exceptions.baseservices-exceptions
230.777 | 217 | 217 | 0 | 0 | JIT.Directed.Directed_1
20.115 | 405 | 405 | 0 | 0 | JIT.IL_Conformance.IL_Conformance
0.819 | 0 | 0 | 0 | 0 | JIT.Regression.Regression_PdbOnly_r_4
10.097 | 160 | 160 | 0 | 0 | JIT.CodeGenBringUpTests.JIT.CodeGenBringUpTests_d
62.780 | 17 | 17 | 0 | 0 | reflection.reflection
60.002 | 101 | 101 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests1400-1599
10.009 | 161 | 161 | 0 | 0 | JIT.CodeGenBringUpTests.JIT.CodeGenBringUpTests_r
94.710 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests800-899
99.080 | 100 | 100 | 0 | 0 | Loader.classloader.TypeGeneratorTests.TypeGeneratorTests1000-1099
5.093 | 37 | 37 | 0 | 0 | JIT.Regression.Regression_PdbOnly_r_1
5.655 | 160 | 160 | 0 | 0 | JIT.CodeGenBringUpTests.JIT.CodeGenBringUpTests_ro
----------------------------------------------------------------------------
11338.514 | 14280 | 14094 | 0 | 186 | (total)

@jkoritzinsky

Copy link
Copy Markdown
MemberAuthor

/ba-g android timeout

@jkoritzinsky
jkoritzinsky merged commit a12ecf9 into dotnet:mainNov 11, 2025
85 of 96 checks passed
@jkoritzinsky
jkoritzinsky deleted the pc-relative-community-arch branch November 11, 2025 22:12
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Dec 12, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-loongarch64arch-riscvRelated to the RISC-V architecturearea-ReadyToRun

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@jkoritzinsky@am11@shushanhf@LuckyXu-HF@MichalStrehovsky@jkotas