From e424e0538fcafa56802d6ee23263aa0772e327d3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 13:00:04 +0100 Subject: [PATCH 01/30] Automated bump of chrome version (#112066) Co-authored-by: github-actions[bot] --- eng/testing/BrowserVersions.props | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/testing/BrowserVersions.props b/eng/testing/BrowserVersions.props index 674577d8559fc2..04449d76d065fa 100644 --- a/eng/testing/BrowserVersions.props +++ b/eng/testing/BrowserVersions.props @@ -4,10 +4,10 @@ 1381561 https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1381561 13.2.152 - 132.0.6834.84 - 1381561 - https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1381570 - 13.2.152 + 133.0.6943.35 + 1402768 + https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1402771 + 13.3.415 125.0.1 0.34.0 125.0.1 From 4fd9470900aea2fe6b0cd72aab1d3141d7540bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Mon, 3 Feb 2025 13:20:53 +0100 Subject: [PATCH 02/30] Fail tests if LTCG is used (#111651) #111566 is not the first time we accidentally shipped something built with LTCG. We should ideally not allow merging such code into `main`. --- eng/testing/tests.singlefile.targets | 1 + .../BuildIntegration/Microsoft.NETCore.Native.targets | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets index be4d606f0891d6..9c5585602da775 100644 --- a/eng/testing/tests.singlefile.targets +++ b/eng/testing/tests.singlefile.targets @@ -28,6 +28,7 @@ $(CoreCLRAotSdkDir) $(NetCoreAppCurrentTestHostSharedFrameworkPath) $(NetCoreAppCurrentTestHostSharedFrameworkPath) + module compiled with /GL found $(NoWarn);IL1005;IL2122;IL3000;IL3001;IL3002;IL3003;IL3050;IL3051;IL3052;IL3053 partial true diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets index 3f156ac50fe48c..16c7fbb4081a9c 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets @@ -372,11 +372,16 @@ The .NET Foundation licenses this file to you under the MIT license. - + - + From a7c18688a72b2a21273435dde5d4de2169466675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Mon, 3 Feb 2025 14:04:35 +0100 Subject: [PATCH 03/30] Fix string trimming in AppleSdk.cs (#112090) --- src/tasks/MobileBuildTasks/Apple/AppleSdk.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tasks/MobileBuildTasks/Apple/AppleSdk.cs b/src/tasks/MobileBuildTasks/Apple/AppleSdk.cs index 29b9b98515116e..07d9dc1de1e5ee 100644 --- a/src/tasks/MobileBuildTasks/Apple/AppleSdk.cs +++ b/src/tasks/MobileBuildTasks/Apple/AppleSdk.cs @@ -104,7 +104,7 @@ private string GetXCodeDevRoot() debugMessageImportance: MessageImportance.Low, label: "xcode-select"); - output.Trim(); + output = output.Trim(); if (Directory.Exists(output)) { if (output.EndsWith("/Contents/Developer", StringComparison.Ordinal)) From 13795b1995f7034ec5cf908ce032694444542ba3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:17:57 +0100 Subject: [PATCH 04/30] [main] Update dependencies from dotnet/roslyn-analyzers (#111518) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20250116.1 Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers From Version 3.12.0-beta1.24629.1 -> To Version 3.12.0-beta1.25066.1 * Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20250122.1 Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers From Version 3.12.0-beta1.24629.1 -> To Version 3.12.0-beta1.25072.1 * Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20250123.1 Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers From Version 3.12.0-beta1.24629.1 -> To Version 3.12.0-beta1.25073.1 * Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20250124.5 Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers From Version 3.12.0-beta1.24629.1 -> To Version 3.12.0-beta1.25074.5 * Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20250126.4 Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers From Version 3.12.0-beta1.24629.1 -> To Version 3.12.0-beta1.25076.4 * Fix SupportedOSPlatform("maccatalyst") order in ref assemblies See https://github.com/dotnet/runtime/pull/105409 for background. * Suppress CA1416 for browser cases in Normalization.Icu.cs * Fix windows build * Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20250131.1 Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers From Version 3.12.0-beta1.24629.1 -> To Version 3.12.0-beta1.25081.1 * Add unsupported OS attribute for browser to Pkcs12CertBag.GetCertificate() X509CertificateLoader.LoadCertificate() is not supported there, bubble up the warning. * Fix ApiCompat --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Alexander Köplinger --- eng/Version.Details.xml | 8 ++--- eng/Versions.props | 4 +-- .../src/System/RuntimeType.CoreCLR.cs | 1 + .../Cryptography/Pkcs/Pkcs12CertBag.cs | 2 ++ .../ref/System.Diagnostics.Process.cs | 36 +++++++++---------- .../System/Globalization/Normalization.Icu.cs | 2 ++ .../System.Runtime/ref/System.Runtime.cs | 2 +- ...m.Security.Cryptography.Pkcs.netcoreapp.cs | 1 + 8 files changed, 31 insertions(+), 25 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a7faf16a2bd23a..32893b180a2900 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -388,13 +388,13 @@ https://github.com/dotnet/roslyn 250065a15ef94895ef87f3e09b313b987375b5b1 - + https://github.com/dotnet/roslyn-analyzers - 5ed336762c6260a83ece35cd1f6749251452bad0 + 8fe7aeb135c64e095f43292c427453858d937184 - + https://github.com/dotnet/roslyn-analyzers - 5ed336762c6260a83ece35cd1f6749251452bad0 + 8fe7aeb135c64e095f43292c427453858d937184 diff --git a/eng/Versions.props b/eng/Versions.props index c13b4256065336..3f90e4fb78ea46 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,8 +36,8 @@ - 3.12.0-beta1.24629.1 - 10.0.0-preview.24629.1 + 3.12.0-beta1.25081.1 + 10.0.0-preview.25081.1 - + https://github.com/dotnet/roslyn - 250065a15ef94895ef87f3e09b313b987375b5b1 + b5e48cce69950f6f8cf8b6c6919cddf4c03a2f48 diff --git a/eng/Versions.props b/eng/Versions.props index 3f90e4fb78ea46..e7d92d22a57100 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -44,9 +44,9 @@ Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure they do not break the local dev experience. --> - 4.14.0-2.25079.2 - 4.14.0-2.25079.2 - 4.14.0-2.25079.2 + 4.14.0-2.25081.4 + 4.14.0-2.25081.4 + 4.14.0-2.25081.4 diff --git a/eng/Versions.props b/eng/Versions.props index e7d92d22a57100..8ffd692f792943 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -164,12 +164,12 @@ 10.0.0-alpha.0.25070.1 - 1.0.0-prerelease.25067.2 - 1.0.0-prerelease.25067.2 - 1.0.0-prerelease.25067.2 - 1.0.0-prerelease.25067.2 - 1.0.0-prerelease.25067.2 - 1.0.0-prerelease.25067.2 + 1.0.0-prerelease.25079.10 + 1.0.0-prerelease.25079.10 + 1.0.0-prerelease.25079.10 + 1.0.0-prerelease.25079.10 + 1.0.0-prerelease.25079.10 + 1.0.0-prerelease.25079.10 2.0.0 17.10.0-beta1.24272.1 From 6e5920cced49e3dc1f36df36793c7c9c23d021ac Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:23:16 +0100 Subject: [PATCH 07/30] Update dependencies from https://github.com/dotnet/arcade build 20250130.7 (#112084) Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitAssert , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions From Version 10.0.0-beta.25080.5 -> To Version 10.0.0-beta.25080.7 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 84 +++++++++++------------ eng/Versions.props | 32 ++++----- eng/common/native/install-dependencies.sh | 6 +- global.json | 6 +- 4 files changed, 64 insertions(+), 64 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d2f1ac0eb5c2c8..7be3d2eb1effc3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -84,87 +84,87 @@ - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 https://github.com/dotnet/runtime-assets @@ -348,9 +348,9 @@ https://github.com/dotnet/xharness 3119edb6d70fb252e6128b0c7e45d3fc2f49f249 - + https://github.com/dotnet/arcade - 44e60bcd48b52296fdc7d963ecb9e3fa66d2b55b + bbea86c614fcf4380c58c80eacd279a0b8305a79 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 8ffd692f792943..ce5dbd9d186a8d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -85,22 +85,22 @@ 10.0.100-alpha.1.25077.2 - 10.0.0-beta.25080.5 - 10.0.0-beta.25080.5 - 10.0.0-beta.25080.5 - 10.0.0-beta.25080.5 - 2.9.2-beta.25080.5 - 10.0.0-beta.25080.5 - 2.9.2-beta.25080.5 - 10.0.0-beta.25080.5 - 10.0.0-beta.25080.5 - 10.0.0-beta.25080.5 - 10.0.0-beta.25080.5 - 10.0.0-beta.25080.5 - 10.0.0-beta.25080.5 - 10.0.0-beta.25080.5 - 10.0.0-beta.25080.5 - 10.0.0-beta.25080.5 + 10.0.0-beta.25080.7 + 10.0.0-beta.25080.7 + 10.0.0-beta.25080.7 + 10.0.0-beta.25080.7 + 2.9.2-beta.25080.7 + 10.0.0-beta.25080.7 + 2.9.2-beta.25080.7 + 10.0.0-beta.25080.7 + 10.0.0-beta.25080.7 + 10.0.0-beta.25080.7 + 10.0.0-beta.25080.7 + 10.0.0-beta.25080.7 + 10.0.0-beta.25080.7 + 10.0.0-beta.25080.7 + 10.0.0-beta.25080.7 + 10.0.0-beta.25080.7 1.4.0 diff --git a/eng/common/native/install-dependencies.sh b/eng/common/native/install-dependencies.sh index 71bde0e4573b26..ce661e9e5cd8de 100755 --- a/eng/common/native/install-dependencies.sh +++ b/eng/common/native/install-dependencies.sh @@ -24,13 +24,13 @@ case "$os" in apt update apt install -y build-essential gettext locales cmake llvm clang lld lldb liblldb-dev libunwind8-dev libicu-dev liblttng-ust-dev \ - libssl-dev libkrb5-dev zlib1g-dev pigz cpio + libssl-dev libkrb5-dev pigz cpio localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 elif [ "$ID" = "fedora" ] || [ "$ID" = "rhel" ]; then - dnf install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel zlib-devel lttng-ust-devel pigz cpio + dnf install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio elif [ "$ID" = "alpine" ]; then - apk add build-base cmake bash curl clang llvm-dev lld lldb krb5-dev lttng-ust-dev icu-dev zlib-dev openssl-dev pigz cpio + apk add build-base cmake bash curl clang llvm-dev lld lldb krb5-dev lttng-ust-dev icu-dev openssl-dev pigz cpio else echo "Unsupported distro. distro: $ID" exit 1 diff --git a/global.json b/global.json index 2d83db85c8d9bd..d00329a3e0da85 100644 --- a/global.json +++ b/global.json @@ -8,9 +8,9 @@ "dotnet": "10.0.100-alpha.1.25077.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25080.5", - "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25080.5", - "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25080.5", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25080.7", + "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25080.7", + "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25080.7", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", "Microsoft.NET.Sdk.IL": "10.0.0-alpha.1.25068.1" From 4d463baf32f5f650f35440b3434c44b78aa248f7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:23:47 +0100 Subject: [PATCH 08/30] [main] Update dependencies from dotnet/cecil, dotnet/hotreload-utils, dotnet/source-build-externals (#112085) * Update dependencies from https://github.com/dotnet/hotreload-utils build 20250127.1 Microsoft.DotNet.HotReload.Utils.Generator.BuildTool From Version 10.0.0-alpha.0.25070.1 -> To Version 10.0.0-alpha.0.25077.1 * Update dependencies from https://github.com/dotnet/cecil build 20250128.1 Microsoft.SourceBuild.Intermediate.cecil , Microsoft.DotNet.Cecil From Version 0.11.5-alpha.25069.2 -> To Version 0.11.5-alpha.25078.1 * Update dependencies from https://github.com/dotnet/source-build-externals build 20250129.1 Microsoft.SourceBuild.Intermediate.source-build-externals From Version 10.0.607101 -> To Version 10.0.607901 --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7be3d2eb1effc3..0499271ca5b013 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -50,14 +50,14 @@ feb61c7f328a2401d74f4317b39d02126cfdfe24 - + https://github.com/dotnet/cecil - 2d5c8fb9aa8bd4c7fc085a73520061075c601655 + dfa03011d6474bd0e6c9d0363e4f3b18b99f2ad8 - + https://github.com/dotnet/cecil - 2d5c8fb9aa8bd4c7fc085a73520061075c601655 + dfa03011d6474bd0e6c9d0363e4f3b18b99f2ad8 @@ -77,9 +77,9 @@ - + https://github.com/dotnet/source-build-externals - 0c377e9585d2aeae504ff1d6529ccb1abef36172 + 962bb86f95ebece01c2b1de97ed7d4261e00b058 @@ -368,9 +368,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization 9fc4fa70da875eed41d3a69a5d65c83d2e3f4b06 - + https://github.com/dotnet/hotreload-utils - a8ba820e852306e5098dce560629cd98e0eb8a4a + f30fb00238a27eff06b5a6bf11ff9c4a5e35c9ca https://github.com/dotnet/runtime-assets diff --git a/eng/Versions.props b/eng/Versions.props index ce5dbd9d186a8d..b02e0514059993 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -162,7 +162,7 @@ 10.0.0-prerelease.24610.1 10.0.0-prerelease.24610.1 - 10.0.0-alpha.0.25070.1 + 10.0.0-alpha.0.25077.1 1.0.0-prerelease.25079.10 1.0.0-prerelease.25079.10 @@ -219,7 +219,7 @@ 9.0.0-preview-20241010.1 - 0.11.5-alpha.25069.2 + 0.11.5-alpha.25078.1 10.0.0-preview.2.25074.1 From b2880aed272879e1f847a8694dcdc72d13034946 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:25:16 +0100 Subject: [PATCH 09/30] [main] Update dependencies from dotnet/source-build-reference-packages (#111329) * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20250110.4 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 10.0.605601 -> To Version 10.0.606004 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20250115.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 10.0.605601 -> To Version 10.0.606501 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20250124.2 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 10.0.605601 -> To Version 10.0.607402 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20250130.4 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 10.0.605601 -> To Version 10.0.608004 --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Viktor Hofer --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0499271ca5b013..cdc568400829d9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -71,9 +71,9 @@ - + https://github.com/dotnet/source-build-reference-packages - 67bfe60ba059348bfaec48537acd36157cd2be6e + f18184030957ae8b02c6cb971ff2a58a06d2e7b1 From b41e8cbe26e8ea8bf04af405ee4fc16276bbd95d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:29:55 +0100 Subject: [PATCH 10/30] [main] Update dependencies from dotnet/xharness (#111604) * Update dependencies from https://github.com/dotnet/xharness build 20250114.3 Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 10.0.0-prerelease.24610.1 -> To Version 10.0.0-prerelease.25064.3 * Update dependencies from https://github.com/dotnet/xharness build 20250124.1 Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 10.0.0-prerelease.24610.1 -> To Version 10.0.0-prerelease.25074.1 * Update dependencies from https://github.com/dotnet/xharness build 20250127.1 Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 10.0.0-prerelease.24610.1 -> To Version 10.0.0-prerelease.25077.1 --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Larry Ewing --- .config/dotnet-tools.json | 2 +- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 3cda07de4daf6d..d372056dad042d 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "10.0.0-prerelease.24610.1", + "version": "10.0.0-prerelease.25077.1", "commands": [ "xharness" ] diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index cdc568400829d9..6ffff5e8b23e86 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -336,17 +336,17 @@ https://github.com/dotnet/runtime 29013d8ae50f5bc35427a9155234ccebfa5e227c - + https://github.com/dotnet/xharness - 3119edb6d70fb252e6128b0c7e45d3fc2f49f249 + 0d72885f0fd3329e58254831f04f4517a73e1b56 - + https://github.com/dotnet/xharness - 3119edb6d70fb252e6128b0c7e45d3fc2f49f249 + 0d72885f0fd3329e58254831f04f4517a73e1b56 - + https://github.com/dotnet/xharness - 3119edb6d70fb252e6128b0c7e45d3fc2f49f249 + 0d72885f0fd3329e58254831f04f4517a73e1b56 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index b02e0514059993..f0f01b6dfbdaf0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -158,9 +158,9 @@ 10.0.0-beta.25070.2 10.0.0-beta.25070.2 - 10.0.0-prerelease.24610.1 - 10.0.0-prerelease.24610.1 - 10.0.0-prerelease.24610.1 + 10.0.0-prerelease.25077.1 + 10.0.0-prerelease.25077.1 + 10.0.0-prerelease.25077.1 10.0.0-alpha.0.25077.1 From a95b9d9f7f96166b82fe76587eb07ad0ff26965e Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Mon, 3 Feb 2025 17:19:03 +0200 Subject: [PATCH 11/30] Remove one usage of `Unsafe.AsPointer`. (#112079) --- .../src/System/Reflection/TypeNameResolver.Mono.cs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/TypeNameResolver.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/TypeNameResolver.Mono.cs index ef5d63ec28074d..9825299577c395 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/TypeNameResolver.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/TypeNameResolver.Mono.cs @@ -18,7 +18,7 @@ internal unsafe ref partial struct TypeNameResolver private Func? _typeResolver; private bool _throwOnError; private bool _ignoreCase; - private void* _stackMark; + private ref StackCrawlMark _stackMark; [RequiresUnreferencedCode("The type might be removed")] internal static Type? GetType( @@ -52,7 +52,7 @@ internal unsafe ref partial struct TypeNameResolver _typeResolver = typeResolver, _throwOnError = throwOnError, _ignoreCase = ignoreCase, - _stackMark = Unsafe.AsPointer(ref stackMark) + _stackMark = ref stackMark }.Resolve(parsed); } @@ -69,11 +69,9 @@ internal unsafe ref partial struct TypeNameResolver } else { - ref StackCrawlMark stackMark = ref Unsafe.AsRef(_stackMark); - if (_throwOnError) { - assembly = Assembly.Load(name, ref stackMark, null); + assembly = Assembly.Load(name, ref _stackMark, null); } else { @@ -81,7 +79,7 @@ internal unsafe ref partial struct TypeNameResolver // Other exceptions like BadImangeFormatException should still fly. try { - assembly = Assembly.Load(name, ref stackMark, null); + assembly = Assembly.Load(name, ref _stackMark, null); } catch (FileNotFoundException) { @@ -123,9 +121,7 @@ internal unsafe ref partial struct TypeNameResolver { if (assembly is null) { - ref StackCrawlMark stackMark = ref Unsafe.AsRef(_stackMark); - - type = RuntimeType.GetType(escapedTypeName, _throwOnError, _ignoreCase, ref stackMark); + type = RuntimeType.GetType(escapedTypeName, _throwOnError, _ignoreCase, ref _stackMark); } else { From 7c3297ef03217ae4ec59ad21656a0951131b2f58 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 3 Feb 2025 17:05:58 +0100 Subject: [PATCH 12/30] [mono][mini] Remove support for the Xamarin.iOS and Xamarin.Mac assemblies in the AOT compiler. (#108886) This code hasn't been needed for many years. Co-authored-by: Larry Ewing --- src/mono/mono/mini/intrinsics.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mono/mono/mini/intrinsics.c b/src/mono/mono/mini/intrinsics.c index 10ce426717eb75..41c5be9c82022c 100644 --- a/src/mono/mono/mini/intrinsics.c +++ b/src/mono/mono/mini/intrinsics.c @@ -2224,11 +2224,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign } } return NULL; - } else if (((!strcmp (cmethod_klass_image->assembly->aname.name, "Xamarin.iOS") || - !strcmp (cmethod_klass_image->assembly->aname.name, "Xamarin.TVOS") || - !strcmp (cmethod_klass_image->assembly->aname.name, "Xamarin.MacCatalyst") || - !strcmp (cmethod_klass_image->assembly->aname.name, "Xamarin.Mac") || - !strcmp (cmethod_klass_image->assembly->aname.name, "Microsoft.iOS") || + } else if (((!strcmp (cmethod_klass_image->assembly->aname.name, "Microsoft.iOS") || !strcmp (cmethod_klass_image->assembly->aname.name, "Microsoft.tvOS") || !strcmp (cmethod_klass_image->assembly->aname.name, "Microsoft.MacCatalyst") || !strcmp (cmethod_klass_image->assembly->aname.name, "Microsoft.macOS")) && From ca99c8084c3a5da8f1aa9b04aed00dbf094bf09a Mon Sep 17 00:00:00 2001 From: Daniel Svensson Date: Mon, 3 Feb 2025 17:45:43 +0100 Subject: [PATCH 13/30] Some System.Decimal performance improvements (#99212) * Improve performance of decimal division * Remove usage of mulx via instrinct on 32bit x86 since it produces worse code than Job=ShortRun IterationCount=3 LaunchCount=1 WarmupCount=3 | Method | a | b | Mean | Error | StdDev | Allocated | |--------------------------- |-- |----------- |---------:|----------:|----------:|----------:| | Mul64By32_New | 3 | 4294967295 | 2.068 ns | 0.0459 ns | 0.0383 ns | - | | Mul64By32_Ori | 3 | 4294967295 | 2.916 ns | 0.0231 ns | 0.0193 ns | - | * update part of Multiply - Add comment to BigMul64By32 and make it return nunit to avoid clearing upper 32 bits - Simplify IncreaseScale * remove unintentional file * Improve division by 64bit value on x64 * Remove some more 64bit divides for x86 * Call IncreaseScale in one more place * add extra paranthesis * review: remove X86.X86Base.X64.DivRem * Remove BigMul64By32 and add overloads of Math.BigMul instead so that it can easily be removed once JIT recognize and optimize "ulong * uint" * Simplify Div96By32 * Remove 64 bit path from Div96By32 * Add Div64By32 helper to avoid check for X86 in multiple places * Use 64*32 multiply in more places * Add new IncreaseScale overload to fix issue with Store-To-Load forwarding * Gives around 20% faster perf for 64bit for full 96bit division * removes cast * Add back old 32bit code for IncreaseScale * makes the 5-10% regression 20% faster (25% speedup) for 1/3 * 6% faster with longer increasescale * Add back Bmi2.MultiplyNoFlags in Math.BigMul * fix Math.Bigmul compilation * switch from Bigmul to (ulong)a * (uint)b in IncreaseScale * Gives up to 10ns (or 14% faster) * Call IncreaseScale(ref Buf12) from IncreaseScale(ref Buf16) for 32bit code * Add #pragma warning disable CA2252 * Change supression to SYSLIB5004 now that DivRem is marked as [Experimental] --------- Co-authored-by: Tanner Gooding --- .../src/System/Decimal.DecCalc.cs | 373 ++++++++++-------- .../System.Private.CoreLib/src/System/Math.cs | 25 ++ 2 files changed, 235 insertions(+), 163 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Decimal.DecCalc.cs b/src/libraries/System.Private.CoreLib/src/System/Decimal.DecCalc.cs index 722a1343a0537d..442e00870d4935 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Decimal.DecCalc.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Decimal.DecCalc.cs @@ -8,6 +8,8 @@ using X86 = System.Runtime.Intrinsics.X86; +#pragma warning disable SYSLIB5004 // DivRem is marked as [Experimental], see https://github.com/dotnet/runtime/issues/82194 + namespace System { public partial struct Decimal @@ -186,35 +188,74 @@ private static void UInt64x64To128(ulong a, ulong b, ref DecCalc result) result.High = (uint)high; } + // Do partial divide for the case where (left >> 32) < den + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static (uint Quotient, uint Remainder) Div64By32(ulong dividend, uint den) + { + if (X86.X86Base.IsSupported) + { + return X86.X86Base.DivRem((uint)dividend, (uint)(dividend >> 32), den); + } + else + { + // TODO: https://github.com/dotnet/runtime/issues/5213 + uint quo = (uint)(dividend / den); + return (quo, (uint)dividend - quo * den); + } + } + /// /// Do full divide, yielding 96-bit result and 32-bit remainder. /// /// 96-bit dividend as array of uints, least-sig first /// 32-bit divisor /// Returns remainder. Quotient overwrites dividend. + [MethodImpl(MethodImplOptions.AggressiveInlining)] private static uint Div96By32(ref Buf12 bufNum, uint den) { - // TODO: https://github.com/dotnet/runtime/issues/5213 - ulong tmp, div; - if (bufNum.U2 != 0) - { - tmp = bufNum.High64; - div = tmp / den; - bufNum.High64 = div; - tmp = ((tmp - (uint)div * den) << 32) | bufNum.U0; + if (X86.X86Base.IsSupported) + { + uint remainder = 0; + + if (bufNum.U2 != 0) + goto Div3Word; + if (bufNum.U1 >= den) + goto Div2Word; + + remainder = bufNum.U1; + bufNum.U1 = 0; + goto Div1Word; +Div3Word: + (bufNum.U2, remainder) = X86.X86Base.DivRem(bufNum.U2, remainder, den); +Div2Word: + (bufNum.U1, remainder) = X86.X86Base.DivRem(bufNum.U1, remainder, den); +Div1Word: + (bufNum.U0, remainder) = X86.X86Base.DivRem(bufNum.U0, remainder, den); + return remainder; + } + else + { + ulong tmp, div, rem; + if (bufNum.U2 != 0) + { + tmp = bufNum.High64; + + (div, rem) = Math.DivRem(tmp, den); + bufNum.High64 = div; + tmp = (rem << 32) | bufNum.U0; + if (tmp == 0) + return 0; + (div, rem) = Math.DivRem(tmp, den); + bufNum.U0 = (uint)div; + return (uint)rem; + } + + tmp = bufNum.Low64; if (tmp == 0) return 0; - uint div32 = (uint)(tmp / den); - bufNum.U0 = div32; - return (uint)tmp - div32 * den; + (bufNum.Low64, rem) = Math.DivRem(tmp, den); + return (uint)rem; } - - tmp = bufNum.Low64; - if (tmp == 0) - return 0; - div = tmp / den; - bufNum.Low64 = div; - return (uint)(tmp - div * den); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -312,6 +353,32 @@ private static void Unscale(ref uint low, ref ulong high64, ref int scale) scale--; } + /// + /// Do partial divide, yielding 64-bit result and 64-bit remainder. + /// Divisor must be larger than upper 64 bits of dividend. + /// + /// 128-bit dividend as array of uints, least-sig first + /// 64-bit divisor + /// Returns quotient. Remainder overwrites lower 64-bits of dividend. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe ulong Div128By64(Buf16* bufNum, ulong den) + { + Debug.Assert(den > bufNum->High64); + + if (X86.X86Base.X64.IsSupported) + { + // Assert above states: den > bufNum.High64 so den > bufNum.U2 and we can be sure we will not overflow + (ulong quotient, bufNum->Low64) = X86.X86Base.X64.DivRem(bufNum->Low64, bufNum->High64, den); + return quotient; + } + else + { + uint hiBits = Div96By64(ref *(Buf12*)&bufNum->U1, den); + uint loBits = Div96By64(ref *(Buf12*)bufNum, den); + return ((ulong)hiBits << 32 | loBits); + } + } + /// /// Do partial divide, yielding 32-bit result and 64-bit remainder. /// Divisor must be larger than upper 64 bits of dividend. @@ -322,6 +389,14 @@ private static void Unscale(ref uint low, ref ulong high64, ref int scale) private static uint Div96By64(ref Buf12 bufNum, ulong den) { Debug.Assert(den > bufNum.High64); + + if (X86.X86Base.X64.IsSupported) + { + // Assert above states: den > bufNum.High64 so den > bufNum.U2 and we can be sure we will not overflow + (ulong quotient, bufNum.Low64) = X86.X86Base.X64.DivRem(bufNum.Low64, bufNum.U2, den); + return (uint)quotient; + } + ulong num; uint num2 = bufNum.U2; if (num2 == 0) @@ -367,9 +442,9 @@ private static uint Div96By64(ref Buf12 bufNum, ulong den) // return 0; - // TODO: https://github.com/dotnet/runtime/issues/5213 - quo = (uint)(num64 / denHigh32); - num = bufNum.U0 | ((num64 - quo * denHigh32) << 32); // remainder + + (quo, uint rem) = Div64By32(num64, denHigh32); + num = bufNum.U0 | ((ulong)rem << 32); // remainder // Compute full remainder, rem = dividend - (quo * divisor). // @@ -413,23 +488,17 @@ private static uint Div128By96(ref Buf16 bufNum, ref Buf12 bufDen) // return 0; - // TODO: https://github.com/dotnet/runtime/issues/5213 - uint quo = (uint)(dividend / den); - uint remainder = (uint)dividend - quo * den; + (uint quo, uint remainder) = Div64By32(dividend, den); // Compute full remainder, rem = dividend - (quo * divisor). // - ulong prod1 = Math.BigMul(quo, bufDen.U0); // quo * lo divisor - ulong prod2 = Math.BigMul(quo, bufDen.U1); // quo * mid divisor - prod2 += prod1 >> 32; - prod1 = (uint)prod1 | (prod2 << 32); - prod2 >>= 32; - - ulong num = bufNum.Low64; - num -= prod1; + ulong prod1; + uint prod2 = (uint)Math.BigMul(bufDen.Low64, quo, out prod1); + ulong num = bufNum.Low64 - prod1; remainder -= (uint)prod2; // Propagate carries + // can be simplified if https://github.com/dotnet/runtime/issues/48247 is done // if (num > ~prod1) { @@ -479,24 +548,52 @@ private static uint Div128By96(ref Buf16 bufNum, ref Buf12 bufDen) /// Returns highest 32 bits of product private static uint IncreaseScale(ref Buf12 bufNum, uint power) { - ulong tmp = Math.BigMul(bufNum.U0, power); +#if TARGET_64BIT + ulong hi64 = Math.BigMul(bufNum.Low64, power, out ulong low64); + bufNum.Low64 = low64; + hi64 = Math.BigMul(bufNum.U2, power) + hi64; + bufNum.U2 = (uint)hi64; + return (uint)(hi64 >> 32); +#else + ulong tmp = (ulong)bufNum.U0 * power; bufNum.U0 = (uint)tmp; tmp >>= 32; - tmp += Math.BigMul(bufNum.U1, power); + tmp += (ulong)bufNum.U1 * power; bufNum.U1 = (uint)tmp; tmp >>= 32; - tmp += Math.BigMul(bufNum.U2, power); + tmp += (ulong)bufNum.U2 * power; bufNum.U2 = (uint)tmp; return (uint)(tmp >> 32); +#endif + } + + /// + /// Multiply the two numbers. The result overwrite the input. + /// + /// buffer + /// Scale factor to multiply by + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static void IncreaseScale(ref Buf16 bufNum, uint power) + { +#if TARGET_64BIT + ulong hi64 = Math.BigMul(bufNum.Low64, power, out ulong low64); + bufNum.Low64 = low64; + bufNum.High64 = Math.BigMul(bufNum.U2, power) + (nuint)hi64; +#else + bufNum.U3 = IncreaseScale(ref Unsafe.As(ref bufNum), power); +#endif } + /// + /// Multiply the two numbers 64bit * 32bit. + /// The 96 bits of the result overwrite the input. + /// + /// 64-bit number as array of uints, least-sig first + /// Scale factor to multiply by private static void IncreaseScale64(ref Buf12 bufNum, uint power) { - ulong tmp = Math.BigMul(bufNum.U0, power); - bufNum.U0 = (uint)tmp; - tmp >>= 32; - tmp += Math.BigMul(bufNum.U1, power); - bufNum.High64 = tmp; + bufNum.U2 = (uint)Math.BigMul(bufNum.Low64, power, out ulong low64); + bufNum.Low64 = low64; } /// @@ -712,13 +809,28 @@ private static int OverflowUnscale(ref Buf12 bufQuo, int scale, bool sticky) // We have overflown, so load the high bit with a one. const ulong highbit = 1UL << 32; bufQuo.U2 = (uint)(highbit / 10); - ulong tmp = ((highbit % 10) << 32) + bufQuo.U1; - uint div = (uint)(tmp / 10); - bufQuo.U1 = div; - tmp = ((tmp - div * 10) << 32) + bufQuo.U0; - div = (uint)(tmp / 10); - bufQuo.U0 = div; - uint remainder = (uint)(tmp - div * 10); + + uint remainder; +#if TARGET_32BIT + if (X86.X86Base.IsSupported) + { + // 32-bit RyuJIT doesn't convert 64-bit division by constant into multiplication by reciprocal. + // Do "32bit" divides instead of calling full 64bit helper + (bufQuo.U1, remainder) = X86.X86Base.DivRem(bufQuo.U1, (uint)(highbit % 10), 10); + (bufQuo.U0, remainder) = X86.X86Base.DivRem(bufQuo.U0, remainder, 10); + } + else +#endif + { + ulong tmp = ((highbit % 10) << 32) + bufQuo.U1; + uint div = (uint)(tmp / 10); + bufQuo.U1 = div; + tmp = ((tmp - div * 10) << 32) + bufQuo.U0; + div = (uint)(tmp / 10); + bufQuo.U0 = div; + remainder = (uint)(tmp - div * 10); + } + // The remainder is the last digit that does not fit, so we can use it to work out if we need to round up if (remainder > 5 || remainder == 5 && (sticky || (bufQuo.U0 & 1) != 0)) Add32To96(ref bufQuo, 1); @@ -883,7 +995,7 @@ internal static unsafe void DecAddSub(ref DecCalc d1, ref DecCalc d2, bool sign) } uint power; - ulong tmp64, tmpLow; + ulong tmp64; // d1 will need to be multiplied by 10^scale so // it will have the same scale as d2. We could be @@ -924,10 +1036,7 @@ internal static unsafe void DecAddSub(ref DecCalc d1, ref DecCalc d2, bool sign) power = TenToPowerNine; if (scale < MaxInt32Scale) power = UInt32Powers10[scale]; - tmpLow = Math.BigMul((uint)low64, power); - tmp64 = Math.BigMul((uint)(low64 >> 32), power) + (tmpLow >> 32); - low64 = (uint)tmpLow + (tmp64 << 32); - high = (uint)(tmp64 >> 32); + high = (uint)Math.BigMul(low64, power, out low64); if ((scale -= MaxInt32Scale) <= 0) goto AlignedAdd; } while (high == 0); @@ -940,10 +1049,7 @@ internal static unsafe void DecAddSub(ref DecCalc d1, ref DecCalc d2, bool sign) power = TenToPowerNine; if (scale < MaxInt32Scale) power = UInt32Powers10[scale]; - tmpLow = Math.BigMul((uint)low64, power); - tmp64 = Math.BigMul((uint)(low64 >> 32), power) + (tmpLow >> 32); - low64 = (uint)tmpLow + (tmp64 << 32); - tmp64 >>= 32; + tmp64 = Math.BigMul(low64, power, out low64); tmp64 += Math.BigMul(high, power); scale -= MaxInt32Scale; @@ -1179,12 +1285,8 @@ internal static long VarCyFromDec(ref DecCalc pdecIn) if (pdecIn.High != 0) goto ThrowOverflow; uint pwr = UInt32Powers10[-scale]; - ulong high = Math.BigMul(pwr, pdecIn.Mid); - if (high > uint.MaxValue) - goto ThrowOverflow; - ulong low = Math.BigMul(pwr, pdecIn.Low); - low += high <<= 32; - if (low < high) + ulong high = Math.BigMul(pdecIn.Low64, pwr, out ulong low); + if (high != 0) goto ThrowOverflow; value = (long)low; } @@ -1267,10 +1369,7 @@ private static int VarDecCmpSub(in decimal d1, in decimal d2) do { uint power = scale >= MaxInt32Scale ? TenToPowerNine : UInt32Powers10[scale]; - ulong tmpLow = Math.BigMul((uint)low64, power); - ulong tmp = Math.BigMul((uint)(low64 >> 32), power) + (tmpLow >> 32); - low64 = (uint)tmpLow + (tmp << 32); - tmp >>= 32; + ulong tmp = Math.BigMul(low64, power, out low64); tmp += Math.BigMul(high, power); // If the scaled value has more than 96 significant bits then it's greater than d2 if (tmp > uint.MaxValue) @@ -1345,12 +1444,8 @@ internal static unsafe void VarDecMul(ref DecCalc d1, ref DecCalc d2) else { // Left value is 32-bit, result fits in 4 uints - tmp = Math.BigMul(d1.Low, d2.Low); - bufProd.U0 = (uint)tmp; - - tmp = Math.BigMul(d1.Low, d2.Mid) + (tmp >> 32); - bufProd.U1 = (uint)tmp; - tmp >>= 32; + tmp = Math.BigMul(d1.Low, d2.Low64, out ulong low); + bufProd.Low64 = low; if (d2.High != 0) { @@ -1369,12 +1464,8 @@ internal static unsafe void VarDecMul(ref DecCalc d1, ref DecCalc d2) else if ((d2.High | d2.Mid) == 0) { // Right value is 32-bit, result fits in 4 uints - tmp = Math.BigMul(d2.Low, d1.Low); - bufProd.U0 = (uint)tmp; - - tmp = Math.BigMul(d2.Low, d1.Mid) + (tmp >> 32); - bufProd.U1 = (uint)tmp; - tmp >>= 32; + tmp = Math.BigMul(d1.Low64, d2.Low, out ulong low); + bufProd.Low64 = low; if (d1.High != 0) { @@ -1391,80 +1482,50 @@ internal static unsafe void VarDecMul(ref DecCalc d1, ref DecCalc d2) } else { - // Both operands have bits set in the upper 64 bits. + // At least one operand has bits set in the upper 64 bits. // // Compute and accumulate the 9 partial products into a - // 192-bit (24-byte) result. + // 192-bit (3*64bit) result. // - // [l-h][l-m][l-l] left high, middle, low - // x [r-h][r-m][r-l] right high, middle, low - // ------------------------------ + // [l-hi][l-lo] left high32, low64 + // x [r-hi][r-lo] right high32, low64 + // ------------------------------- // - // [0-h][0-l] l-l * r-l - // [1ah][1al] l-l * r-m - // [1bh][1bl] l-m * r-l - // [2ah][2al] l-m * r-m - // [2bh][2bl] l-l * r-h - // [2ch][2cl] l-h * r-l - // [3ah][3al] l-m * r-h - // [3bh][3bl] l-h * r-m - // [4-h][4-l] l-h * r-h + // [ 0-h][0-l ] l-lo * r-lo => 64 + 64 bit result + // [ h*l][h*l ] l-lo * r-hi => 32 + 64 bit result + // [ l*h][l*h ] l-hi * r-lo => 32 + 64 bit result + // [ h*h] l-hi * r-hi => 32 + 32 bit result // ------------------------------ - // [p-5][p-4][p-3][p-2][p-1][p-0] prod[] array + // [Hi64][Mid64][Low64] bufProd "array" // - tmp = Math.BigMul(d1.Low, d2.Low); - bufProd.U0 = (uint)tmp; - - ulong tmp2 = Math.BigMul(d1.Low, d2.Mid) + (tmp >> 32); + ulong mid64 = Math.BigMul(d1.Low64, d2.Low64, out tmp); + bufProd.Low64 = tmp; - tmp = Math.BigMul(d1.Mid, d2.Low); - tmp += tmp2; // this could generate carry - bufProd.U1 = (uint)tmp; - if (tmp < tmp2) // detect carry - tmp2 = (tmp >> 32) | (1UL << 32); - else - tmp2 = tmp >> 32; - - tmp = Math.BigMul(d1.Mid, d2.Mid) + tmp2; - - if ((d1.High | d2.High) > 0) + if ((d1.High | d2.High) != 0) { - // Highest 32 bits is non-zero. Calculate 5 more partial products. - // - tmp2 = Math.BigMul(d1.Low, d2.High); - tmp += tmp2; // this could generate carry - uint tmp3 = 0; - if (tmp < tmp2) // detect carry - tmp3 = 1; - - tmp2 = Math.BigMul(d1.High, d2.Low); - tmp += tmp2; // this could generate carry - bufProd.U2 = (uint)tmp; - if (tmp < tmp2) // detect carry - tmp3++; - tmp2 = ((ulong)tmp3 << 32) | (tmp >> 32); - - tmp = Math.BigMul(d1.Mid, d2.High); - tmp += tmp2; // this could generate carry - tmp3 = 0; - if (tmp < tmp2) // detect carry - tmp3 = 1; - - tmp2 = Math.BigMul(d1.High, d2.Mid); - tmp += tmp2; // this could generate carry - bufProd.U3 = (uint)tmp; - if (tmp < tmp2) // detect carry - tmp3++; - tmp = ((ulong)tmp3 << 32) | (tmp >> 32); - - bufProd.High64 = Math.BigMul(d1.High, d2.High) + tmp; - + // hi64 will never overflow since the result will always fit in 192 (2*96) bits + ulong hi64 = Math.BigMul(d1.High, d2.High); + + // Do crosswise multiplications between upper 32bit and lower 64 bits + hi64 += Math.BigMul(d1.Low64, d2.High, out tmp); + mid64 += tmp; + // propagate carry, can be simplified if https://github.com/dotnet/runtime/issues/48247 is done + if (mid64 < tmp) + ++hi64; + + hi64 += Math.BigMul(d2.Low64, d1.High, out tmp); + mid64 += tmp; + if (mid64 < tmp) + ++hi64; + + bufProd.Mid64 = mid64; + bufProd.High64 = hi64; hiProd = 5; } else { - bufProd.Mid64 = tmp; + bufProd.Mid64 = mid64; hiProd = 3; } } @@ -1472,7 +1533,7 @@ internal static unsafe void VarDecMul(ref DecCalc d1, ref DecCalc d2) // Check for leading zero uints on the product // uint* product = (uint*)&bufProd; - while (product[(int)hiProd] == 0) + while (product[hiProd] == 0) { if (hiProd == 0) goto ReturnZero; @@ -1595,12 +1656,8 @@ internal static void VarDecFromR4(float input, out DecCalc result) else { ulong low64 = Math.BigMul(mant, UInt32Powers10[power - 9]); - ulong hi64 = Math.BigMul(TenToPowerNine, (uint)(low64 >> 32)); - low64 = Math.BigMul(TenToPowerNine, (uint)low64); - result.Low = (uint)low64; - hi64 += low64 >> 32; - result.Mid = (uint)hi64; - hi64 >>= 32; + ulong hi64 = Math.BigMul(TenToPowerNine, low64, out low64); + result.Low64 = low64; result.High = (uint)hi64; } } @@ -1952,9 +2009,7 @@ internal static unsafe void VarDecDiv(ref DecCalc d1, ref DecCalc d2) goto ThrowOverflow; ulong num = Math.BigMul(remainder, power); - // TODO: https://github.com/dotnet/runtime/issues/5213 - uint div = (uint)(num / den); - remainder = (uint)num - div * den; + (uint div, remainder) = Div64By32(num, den); if (!Add32To96(ref bufQuo, div)) { @@ -1993,9 +2048,7 @@ internal static unsafe void VarDecDiv(ref DecCalc d1, ref DecCalc d2) // (currently 96 bits spread over 4 uints) will be < divisor. // bufQuo.U2 = 0; - bufQuo.U1 = Div96By64(ref *(Buf12*)&bufRem.U1, divisor); - bufQuo.U0 = Div96By64(ref *(Buf12*)&bufRem, divisor); - + bufQuo.Low64 = Div128By64(&bufRem, divisor); while (true) { if (bufRem.Low64 == 0) @@ -2104,7 +2157,7 @@ internal static unsafe void VarDecDiv(ref DecCalc d1, ref DecCalc d2) if (IncreaseScale(ref bufQuo, power) != 0) goto ThrowOverflow; - bufRem.U3 = IncreaseScale(ref *(Buf12*)&bufRem, power); + IncreaseScale(ref bufRem, power); tmp = Div128By96(ref bufRem, ref bufDivisor); if (!Add32To96(ref bufQuo, tmp)) { @@ -2184,12 +2237,9 @@ internal static void VarDecMod(ref DecCalc d1, ref DecCalc d2) do { uint power = scale >= MaxInt32Scale ? TenToPowerNine : UInt32Powers10[scale]; - ulong tmp = Math.BigMul(d2.Low, power); - d2.Low = (uint)tmp; - tmp >>= 32; - tmp += (d2.Mid + ((ulong)d2.High << 32)) * power; - d2.Mid = (uint)tmp; - d2.High = (uint)(tmp >> 32); + uint hi32 = (uint)Math.BigMul(d2.Low64, power, out ulong low64); + d2.Low64 = low64; + d2.High = hi32 + d2.High * power; } while ((scale -= MaxInt32Scale) > 0); scale = 0; } @@ -2211,10 +2261,7 @@ internal static void VarDecMod(ref DecCalc d1, ref DecCalc d2) break; uint power = iCurScale >= MaxInt32Scale ? TenToPowerNine : UInt32Powers10[iCurScale]; scale += iCurScale; - ulong tmp = Math.BigMul(bufQuo.U0, power); - bufQuo.U0 = (uint)tmp; - tmp >>= 32; - bufQuo.High64 = tmp + bufQuo.High64 * power; + IncreaseScale(ref bufQuo, power); if (power != TenToPowerNine) break; } diff --git a/src/libraries/System.Private.CoreLib/src/System/Math.cs b/src/libraries/System.Private.CoreLib/src/System/Math.cs index 32c3eee4712bfc..9337314de15b01 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Math.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Math.cs @@ -181,6 +181,31 @@ public static long BigMul(int a, int b) return ((long)a) * b; } + + /// + /// Perform multiplication between 64 and 32 bit numbers, returning lower 64 bits in + /// + /// hi bits of the result + /// REMOVE once BigMul(ulong, ulong) is treated as intrinsics and optimizes 32 by 64 multiplications + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ulong BigMul(ulong a, uint b, out ulong low) + { +#if TARGET_64BIT + return Math.BigMul((ulong)a, (ulong)b, out low); +#else + ulong prodL = ((ulong)(uint)a) * b; + ulong prodH = (prodL >> 32) + (((ulong)(uint)(a >> 32)) * b); + + low = ((prodH << 32) | (uint)prodL); + return (prodH >> 32); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static ulong BigMul(uint a, ulong b, out ulong low) + => BigMul(b, a, out low); + /// Produces the full product of two unsigned 64-bit numbers. /// The first number to multiply. /// The second number to multiply. From b2a62662916f5fa30a559d796b72d683bde6ee32 Mon Sep 17 00:00:00 2001 From: VincentBu <44959937+VincentBu@users.noreply.github.com> Date: Tue, 4 Feb 2025 01:43:47 +0800 Subject: [PATCH 14/30] Tests ran counter (#111145) * record how many times each test ran for * record all tests * use lock when constructing string and clean the code * rename counter * remove sln file --------- Co-authored-by: Manish Godse <61718172+mangod9@users.noreply.github.com> --- .../Stress/Framework/ReliabilityFramework.cs | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/tests/GC/Stress/Framework/ReliabilityFramework.cs b/src/tests/GC/Stress/Framework/ReliabilityFramework.cs index 478b6895049a66..3403e33e5091d8 100644 --- a/src/tests/GC/Stress/Framework/ReliabilityFramework.cs +++ b/src/tests/GC/Stress/Framework/ReliabilityFramework.cs @@ -119,6 +119,8 @@ public class ReliabilityFramework private int _reportedFailCnt = 0; private RFLogging _logger = new RFLogging(); private DateTime _lastLogTime = DateTime.Now; + private Dictionary _testRunCounter = new(); + private object _testRunCounterLock = new(); // static members private static int s_seed = (int)System.DateTime.Now.Ticks; @@ -161,6 +163,11 @@ public static int Main(string[] args) ReliabilityFramework rf = new ReliabilityFramework(); rf._logger.WriteToInstrumentationLog(null, LoggingLevels.StartupShutdown, "Started"); + + Console.CancelKeyPress += (object _, ConsoleCancelEventArgs _) => { + rf.RecordTestRunCount(); + }; + var configVars = GC.GetConfigurationVariables(); foreach (var kvp in configVars) { @@ -305,7 +312,7 @@ public static int Main(string[] args) } NoExitPoll(); - + rf.RecordTestRunCount(); rf._logger.WriteToInstrumentationLog(null, LoggingLevels.StartupShutdown, String.Format("Shutdown w/ ret val of {0}", retVal)); @@ -314,6 +321,19 @@ public static int Main(string[] args) return (retVal); } + public void RecordTestRunCount() + { + StringBuilder sb = new(); + lock (_testRunCounterLock) + { + foreach(var item in _testRunCounter) + { + sb.AppendLine($"{item.Key}: {item.Value}"); + } + } + _logger.WriteToInstrumentationLog(_curTestSet, LoggingLevels.StartupShutdown, $"Tests run count:\n{sb}"); + } + public void HandleOom(Exception e, string message) { _logger.WriteToInstrumentationLog(_curTestSet, LoggingLevels.Tests, String.Format("Exception while running tests: {0}", e)); @@ -621,6 +641,11 @@ private void TestStarter() DateTime lastStart = DateTime.Now; // keeps track of when we last started a test TimeSpan minTimeToStartTest = new TimeSpan(0, 5, 0); // after 5 minutes if we haven't started a test we're having problems... int cpuAdjust = 0, memAdjust = 0; // if we discover that we're not starting new tests quick enough we adjust the CPU/Mem percentages + + foreach (var test in _curTestSet.Tests) + { + _testRunCounter[test.RefOrID] = 0; + } // so we start new tests sooner (so they start BEFORE we drop below our minimum CPU) //Console.WriteLine("RF - TestStarter found {0} tests to run", totalTestsToRun); @@ -1196,6 +1221,12 @@ private void StartTestWorker(object test) } break; } + + lock (_testRunCounterLock) + { + string testRefOrID = daTest.RefOrID; + _testRunCounter[testRefOrID] = _testRunCounter.GetValueOrDefault(testRefOrID, 0) + 1; + } } catch (Exception e) { From cd1657d977337ba52e652be51c253f769739c8b5 Mon Sep 17 00:00:00 2001 From: Andrew Au Date: Mon, 3 Feb 2025 10:32:46 -0800 Subject: [PATCH 15/30] Let the debugger knows DATAS is on (#107115) --- src/coreclr/debug/daccess/daccess.cpp | 4 ++ src/coreclr/debug/daccess/dacimpl.h | 6 +- src/coreclr/debug/daccess/request.cpp | 18 +++++ src/coreclr/debug/daccess/request_common.h | 37 +++++++++- src/coreclr/gc/dac_gcheap_fields.h | 2 +- src/coreclr/gc/gc.cpp | 19 ++++- src/coreclr/gc/gcinterface.dac.h | 4 ++ src/coreclr/gc/gcinterface.dacvars.def | 3 + src/coreclr/gc/gcinterface.h | 2 +- src/coreclr/inc/sospriv.idl | 10 +++ src/coreclr/pal/prebuilt/idl/sospriv_i.cpp | 3 + src/coreclr/pal/prebuilt/inc/sospriv.h | 80 ++++++++++++++++++++++ 12 files changed, 180 insertions(+), 8 deletions(-) diff --git a/src/coreclr/debug/daccess/daccess.cpp b/src/coreclr/debug/daccess/daccess.cpp index 5deb0937c3acbd..8af160fd73d064 100644 --- a/src/coreclr/debug/daccess/daccess.cpp +++ b/src/coreclr/debug/daccess/daccess.cpp @@ -3245,6 +3245,10 @@ ClrDataAccess::QueryInterface(THIS_ { ifaceRet = static_cast(this); } + else if (IsEqualIID(interfaceId, __uuidof(ISOSDacInterface16))) + { + ifaceRet = static_cast(this); + } else { *iface = NULL; diff --git a/src/coreclr/debug/daccess/dacimpl.h b/src/coreclr/debug/daccess/dacimpl.h index 588777171333db..c8947048ec92ef 100644 --- a/src/coreclr/debug/daccess/dacimpl.h +++ b/src/coreclr/debug/daccess/dacimpl.h @@ -814,7 +814,8 @@ class ClrDataAccess public ISOSDacInterface12, public ISOSDacInterface13, public ISOSDacInterface14, - public ISOSDacInterface15 + public ISOSDacInterface15, + public ISOSDacInterface16 { public: ClrDataAccess(ICorDebugDataTarget * pTarget, ICLRDataTarget * pLegacyTarget=0); @@ -1222,6 +1223,9 @@ class ClrDataAccess // ISOSDacInterface15 virtual HRESULT STDMETHODCALLTYPE GetMethodTableSlotEnumerator(CLRDATA_ADDRESS mt, ISOSMethodEnum **enumerator); + // ISOSDacInterface16 + virtual HRESULT STDMETHODCALLTYPE GetGCDynamicAdaptationMode(int* pDynamicAdaptationMode); + // // ClrDataAccess. // diff --git a/src/coreclr/debug/daccess/request.cpp b/src/coreclr/debug/daccess/request.cpp index 7a07a8c0f6c3c1..9c6669b0810f76 100644 --- a/src/coreclr/debug/daccess/request.cpp +++ b/src/coreclr/debug/daccess/request.cpp @@ -2908,6 +2908,24 @@ ClrDataAccess::GetGCHeapStaticData(struct DacpGcHeapDetails *detailsData) return hr; } +HRESULT +ClrDataAccess::GetGCDynamicAdaptationMode(int* pDynamicAdaptationMode) +{ + SOSDacEnter(); + if (IsDatasEnabled()) + { + *pDynamicAdaptationMode = *g_gcDacGlobals->dynamic_adaptation_mode; + hr = S_OK; + } + else + { + *pDynamicAdaptationMode = -1; + hr = S_FALSE; + } + SOSDacLeave(); + return hr; +} + HRESULT ClrDataAccess::GetHeapSegmentData(CLRDATA_ADDRESS seg, struct DacpHeapSegmentData *heapSegment) { diff --git a/src/coreclr/debug/daccess/request_common.h b/src/coreclr/debug/daccess/request_common.h index 623761ba250687..e2f4531e267b97 100644 --- a/src/coreclr/debug/daccess/request_common.h +++ b/src/coreclr/debug/daccess/request_common.h @@ -103,14 +103,47 @@ HeapTableIndex(DPTR(unused_gc_heap**) heaps, size_t index) DacEnumMemoryRegion(p_##field_name.GetAddr(), sizeof(field_type) * array_length); \ } +inline bool UseBuildVariant() +{ + int major = g_gcDacGlobals->major_version_number; + int minor = g_gcDacGlobals->minor_version_number; + return (major > 2) || (major == 2 && minor >= 4); +} + inline bool IsRegionGCEnabled() { - return (g_gcDacGlobals->minor_version_number & 1) != 0; + if (UseBuildVariant()) + { + return (*(g_gcDacGlobals->build_variant) & build_variant_use_region) != 0; + } + else + { + return (g_gcDacGlobals->minor_version_number & 1) != 0; + } } inline bool IsBackgroundGCEnabled() { - return (g_gcDacGlobals->minor_version_number & 2) == 0; + if (UseBuildVariant()) + { + return (*(g_gcDacGlobals->build_variant) & build_variant_background_gc) != 0; + } + else + { + return (g_gcDacGlobals->minor_version_number & 2) == 0; + } +} + +inline bool IsDatasEnabled() +{ + if (UseBuildVariant()) + { + return (*(g_gcDacGlobals->build_variant) & build_variant_dynamic_heap_count) != 0; + } + else + { + return false; + } } // Load an instance of dac_gc_heap for the heap pointed by heap. diff --git a/src/coreclr/gc/dac_gcheap_fields.h b/src/coreclr/gc/dac_gcheap_fields.h index 39b2dca81008ac..862ef04fac4cb9 100644 --- a/src/coreclr/gc/dac_gcheap_fields.h +++ b/src/coreclr/gc/dac_gcheap_fields.h @@ -53,4 +53,4 @@ DEFINE_MISSING_FIELD(freeable_uoh_segment) DEFINE_ARRAY_FIELD (free_regions, dac_region_free_list, FREE_REGION_KINDS) #else DEFINE_MISSING_FIELD(free_regions) -#endif // ALL_FIELDS +#endif // defined(ALL_FIELDS) || defined(USE_REGIONS) diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index 3b717a6e239157..8bc4043b54e7e2 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -53194,6 +53194,7 @@ bool GCHeap::IsConcurrentGCEnabled() void PopulateDacVars(GcDacVars *gcDacVars) { bool v2 = gcDacVars->minor_version_number >= 2; + bool v4 = gcDacVars->minor_version_number >= 4; #define DEFINE_FIELD(field_name, field_type) offsetof(CLASS_NAME, field_name), #define DEFINE_DPTR_FIELD(field_name, field_type) offsetof(CLASS_NAME, field_name), @@ -53225,15 +53226,16 @@ void PopulateDacVars(GcDacVars *gcDacVars) // work differently than .Net SOS. When making breaking changes here you may need to // find NativeAOT's equivalent of SOS_BREAKING_CHANGE_VERSION and increment it. gcDacVars->major_version_number = 2; - gcDacVars->minor_version_number = 0; + gcDacVars->minor_version_number = 4; if (v2) { gcDacVars->total_bookkeeping_elements = total_bookkeeping_elements; gcDacVars->card_table_info_size = sizeof(card_table_info); } + g_build_variant = 0; #ifdef USE_REGIONS - gcDacVars->minor_version_number |= 1; + g_build_variant |= build_variant_use_region; if (v2) { gcDacVars->count_free_region_kinds = count_free_region_kinds; @@ -53242,8 +53244,11 @@ void PopulateDacVars(GcDacVars *gcDacVars) } #endif //USE_REGIONS #ifndef BACKGROUND_GC - gcDacVars->minor_version_number |= 2; + g_build_variant |= build_variant_background_gc; #endif //!BACKGROUND_GC +#ifdef DYNAMIC_HEAP_COUNT + g_build_variant |= build_variant_dynamic_heap_count; +#endif //DYNAMIC_HEAP_COUNT gcDacVars->built_with_svr = &g_built_with_svr_gc; gcDacVars->build_variant = &g_build_variant; gcDacVars->gc_structures_invalid_cnt = const_cast(&GCScan::m_GcStructuresInvalidCnt); @@ -53319,6 +53324,14 @@ void PopulateDacVars(GcDacVars *gcDacVars) { gcDacVars->bookkeeping_start = &gc_heap::bookkeeping_start; } + if (v4) + { +#ifdef DYNAMIC_HEAP_COUNT + gcDacVars->dynamic_adaptation_mode = &gc_heap::dynamic_adaptation_mode; +#else + gcDacVars->dynamic_adaptation_mode = nullptr; +#endif //DYNAMIC_HEAP_COUNT + } } int GCHeap::RefreshMemoryLimit() diff --git a/src/coreclr/gc/gcinterface.dac.h b/src/coreclr/gc/gcinterface.dac.h index b3be7b09cee60f..fadb890ccc638a 100644 --- a/src/coreclr/gc/gcinterface.dac.h +++ b/src/coreclr/gc/gcinterface.dac.h @@ -206,6 +206,10 @@ struct unused_generation uint8_t unused; }; +#define build_variant_use_region 1 +#define build_variant_background_gc 2 +#define build_variant_dynamic_heap_count 4 + // The DAC links against six symbols that build as part of the VM DACCESS_COMPILE // build. These symbols are considered to be GC-private functions, but the DAC needs // to use them in order to perform some handle-related functions. These six functions diff --git a/src/coreclr/gc/gcinterface.dacvars.def b/src/coreclr/gc/gcinterface.dacvars.def index a78b9d720930c6..fc071e881faef8 100644 --- a/src/coreclr/gc/gcinterface.dacvars.def +++ b/src/coreclr/gc/gcinterface.dacvars.def @@ -88,6 +88,9 @@ GC_DAC_VAL (int, total_bookkeeping_elements) GC_DAC_VAL (int, count_free_region_kinds) GC_DAC_VAL (size_t, card_table_info_size) +// Here is where v5.4 fields starts +GC_DAC_VAR (int, dynamic_adaptation_mode) + #undef GC_DAC_VAR #undef GC_DAC_ARRAY_VAR #undef GC_DAC_PTR_VAR diff --git a/src/coreclr/gc/gcinterface.h b/src/coreclr/gc/gcinterface.h index b41d3005ae6721..bb1e5bc173e1b7 100644 --- a/src/coreclr/gc/gcinterface.h +++ b/src/coreclr/gc/gcinterface.h @@ -11,7 +11,7 @@ // The minor version of the IGCHeap interface. Non-breaking changes are required // to bump the minor version number. GCs and EEs with minor version number // mismatches can still interoperate correctly, with some care. -#define GC_INTERFACE_MINOR_VERSION 3 +#define GC_INTERFACE_MINOR_VERSION 4 // The major version of the IGCToCLR interface. Breaking changes to this interface // require bumps in the major version number. diff --git a/src/coreclr/inc/sospriv.idl b/src/coreclr/inc/sospriv.idl index 141f597dcb4e94..0820d20386b9e0 100644 --- a/src/coreclr/inc/sospriv.idl +++ b/src/coreclr/inc/sospriv.idl @@ -562,3 +562,13 @@ interface ISOSDacInterface15 : IUnknown { HRESULT GetMethodTableSlotEnumerator(CLRDATA_ADDRESS mt, ISOSMethodEnum **enumerator); } + +[ + object, + local, + uuid(4ba12ff8-daac-4e43-ac56-98cf8d5c595d) +] +interface ISOSDacInterface16 : IUnknown +{ + HRESULT GetGCDynamicAdaptationMode(int* pDynamicAdaptationMode); +} diff --git a/src/coreclr/pal/prebuilt/idl/sospriv_i.cpp b/src/coreclr/pal/prebuilt/idl/sospriv_i.cpp index 579be51d356f7f..f3c4867a3a0ace 100644 --- a/src/coreclr/pal/prebuilt/idl/sospriv_i.cpp +++ b/src/coreclr/pal/prebuilt/idl/sospriv_i.cpp @@ -127,6 +127,9 @@ MIDL_DEFINE_GUID(IID, IID_ISOSMethodEnum,0x3c0fe725,0xc324,0x4a4f,0x81,0x00,0xd3 MIDL_DEFINE_GUID(IID, IID_ISOSDacInterface15,0x7ed81261,0x52a9,0x4a23,0xa3,0x58,0xc3,0x31,0x3d,0xea,0x30,0xa8); + +MIDL_DEFINE_GUID(IID, IID_ISOSDacInterface16,0x4ba12ff8,0xdaac,0x4e43,0xac,0x56,0x98,0xcf,0x8d,0x5c,0x59,0x5d); + #undef MIDL_DEFINE_GUID #ifdef __cplusplus diff --git a/src/coreclr/pal/prebuilt/inc/sospriv.h b/src/coreclr/pal/prebuilt/inc/sospriv.h index a3d741f740defa..4ff12d95b74894 100644 --- a/src/coreclr/pal/prebuilt/inc/sospriv.h +++ b/src/coreclr/pal/prebuilt/inc/sospriv.h @@ -3685,6 +3685,86 @@ EXTERN_C const IID IID_ISOSDacInterface15; #endif /* __ISOSDacInterface15_INTERFACE_DEFINED__ */ +#ifndef __ISOSDacInterface16_INTERFACE_DEFINED__ +#define __ISOSDacInterface16_INTERFACE_DEFINED__ + +/* interface ISOSDacInterface16 */ +/* [uuid][local][object] */ + + +EXTERN_C const IID IID_ISOSDacInterface16; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("4ba12ff8-daac-4e43-ac56-98cf8d5c595d") + ISOSDacInterface16 : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetGCDynamicAdaptationMode( + int *pDynamicAdaptationMode) = 0; + + }; + + +#else /* C style interface */ + + typedef struct ISOSDacInterface16Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISOSDacInterface16 * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISOSDacInterface16 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISOSDacInterface16 * This); + + HRESULT ( STDMETHODCALLTYPE *GetGCDynamicAdaptationMode )( + ISOSDacInterface16 * This, + int *pDynamicAdaptationMode); + + END_INTERFACE + } ISOSDacInterface16Vtbl; + + interface ISOSDacInterface16 + { + CONST_VTBL struct ISOSDacInterface16Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISOSDacInterface16_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define ISOSDacInterface16_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define ISOSDacInterface16_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define ISOSDacInterface16_GetGCDynamicAdaptationMode(This,pDynamicAdaptationMode) \ + ( (This)->lpVtbl -> GetGCDynamicAdaptationMode(This,pDynamicAdaptationMode) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __ISOSDacInterface16_INTERFACE_DEFINED__ */ + + /* Additional Prototypes for ALL interfaces */ /* end of Additional Prototypes */ From 3ab8574307f12f4afbb813fbe708734334f87914 Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Mon, 3 Feb 2025 13:42:04 -0600 Subject: [PATCH 16/30] Enable Mono tests (#111981) --- .../tests/DirectoryServicesTestHelpers.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libraries/System.DirectoryServices.Protocols/tests/DirectoryServicesTestHelpers.cs b/src/libraries/System.DirectoryServices.Protocols/tests/DirectoryServicesTestHelpers.cs index 422c37e70dbb30..4a11570d810344 100644 --- a/src/libraries/System.DirectoryServices.Protocols/tests/DirectoryServicesTestHelpers.cs +++ b/src/libraries/System.DirectoryServices.Protocols/tests/DirectoryServicesTestHelpers.cs @@ -4,8 +4,6 @@ using System.Runtime.InteropServices; using Xunit; -[assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/35912", TestRuntimes.Mono)] - namespace System.DirectoryServices.Protocols.Tests { public static class DirectoryServicesTestHelpers From fffbd3eaaa0de6984c1b72d3e0b39e2a2d8841de Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 14:28:30 -0600 Subject: [PATCH 17/30] [main] Update dependencies from dotnet/emsdk (#111690) * Update dependencies from https://github.com/dotnet/emsdk build 20250121.2 Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport From Version 10.0.0-alpha.1.25059.1 -> To Version 10.0.0-alpha.1.25071.2 Dependency coherency updates runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.linux-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.osx-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.osx-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.win-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.win-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport From Version 19.1.0-alpha.1.25055.2 -> To Version 19.1.0-alpha.1.25057.1 (parent: Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport * Update dependencies from https://github.com/dotnet/emsdk build 20250124.1 Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport From Version 10.0.0-alpha.1.25059.1 -> To Version 10.0.0-preview.2.25074.1 * Update dependencies from https://github.com/dotnet/emsdk build 20250127.2 Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport From Version 10.0.0-alpha.1.25059.1 -> To Version 10.0.0-preview.2.25077.2 Dependency coherency updates runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools From Version 19.1.0-alpha.1.25055.2 -> To Version 19.1.0-alpha.1.25070.1 (parent: Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport * Update dependencies from https://github.com/dotnet/emsdk build 20250129.1 Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport From Version 10.0.0-alpha.1.25059.1 -> To Version 10.0.0-preview.2.25079.1 Dependency coherency updates runtime.linux-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.linux-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.osx-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.osx-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.win-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport,runtime.win-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport From Version 10.0.0-alpha.1.25057.1 -> To Version 10.0.0-alpha.1.25077.1 (parent: Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport * Update dependencies from https://github.com/dotnet/emsdk build 20250130.1 Microsoft.SourceBuild.Intermediate.emsdk , Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport From Version 10.0.0-alpha.1.25059.1 -> To Version 10.0.0-preview.2.25080.1 * Update dependencies from https://github.com/dotnet/emsdk build 20250203.1 Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport , Microsoft.SourceBuild.Intermediate.emsdk From Version 10.0.0-alpha.1.25059.1 -> To Version 10.0.0-preview.2.25103.1 Dependency coherency updates runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools From Version 19.1.0-alpha.1.25055.2 -> To Version 19.1.0-alpha.1.25077.1 (parent: Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 156 ++++++++++++++++++++-------------------- eng/Versions.props | 62 ++++++++-------- 2 files changed, 109 insertions(+), 109 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6ffff5e8b23e86..d4109bba4deda3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -8,37 +8,37 @@ https://github.com/dotnet/wcf 7f504aabb1988e9a093c1e74d8040bd52feb2f01 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 https://github.com/dotnet/command-line-api @@ -60,14 +60,14 @@ dfa03011d6474bd0e6c9d0363e4f3b18b99f2ad8 - + https://github.com/dotnet/emsdk - 0de3165cb0d56323b6caaf8e9916d4d9e72da32d + 191ba073d94b647f70bce142d16ec96bfd436387 - + https://github.com/dotnet/emsdk - 0de3165cb0d56323b6caaf8e9916d4d9e72da32d + 191ba073d94b647f70bce142d16ec96bfd436387 @@ -218,89 +218,89 @@ https://github.com/dotnet/runtime-assets fc476e8f2d685eb7cadf6342393a0af2708f4dbf - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 - + https://github.com/dotnet/llvm-project - 317598aea216019b6164f599859c738f69595c60 + 0417b8265304b7e52c63c9309271b15feb39ddd3 https://github.com/dotnet/runtime @@ -432,37 +432,37 @@ https://github.com/NuGet/NuGet.Client 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8 - + https://github.com/dotnet/node - 703264f70f553a06adfb330378c96f56b7583273 + 7609fd62519260f6b2c10131b03ed878e671a2e4 - + https://github.com/dotnet/node - 703264f70f553a06adfb330378c96f56b7583273 + 7609fd62519260f6b2c10131b03ed878e671a2e4 - + https://github.com/dotnet/node - 703264f70f553a06adfb330378c96f56b7583273 + 7609fd62519260f6b2c10131b03ed878e671a2e4 - + https://github.com/dotnet/node - 703264f70f553a06adfb330378c96f56b7583273 + 7609fd62519260f6b2c10131b03ed878e671a2e4 - + https://github.com/dotnet/node - 703264f70f553a06adfb330378c96f56b7583273 + 7609fd62519260f6b2c10131b03ed878e671a2e4 - + https://github.com/dotnet/node - 703264f70f553a06adfb330378c96f56b7583273 + 7609fd62519260f6b2c10131b03ed878e671a2e4 - + https://github.com/dotnet/node - 703264f70f553a06adfb330378c96f56b7583273 + 7609fd62519260f6b2c10131b03ed878e671a2e4 - + https://github.com/dotnet/node - 703264f70f553a06adfb330378c96f56b7583273 + 7609fd62519260f6b2c10131b03ed878e671a2e4 https://github.com/dotnet/runtime-assets diff --git a/eng/Versions.props b/eng/Versions.props index f0f01b6dfbdaf0..ccf12d4891af61 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -226,51 +226,51 @@ 2.4.3 9.0.0-alpha.1.24167.3 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 - 10.0.0-alpha.1.25059.1 + 10.0.0-preview.2.25103.1 $(MicrosoftNETWorkloadEmscriptenCurrentManifest100100TransportVersion) 1.1.87-gba258badda 1.0.0-v3.14.0.5722 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 - 19.1.0-alpha.1.25055.2 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 + 19.1.0-alpha.1.25077.1 3.1.7 1.0.406601 $(MicrosoftDotNetApiCompatTaskVersion) - 10.0.0-alpha.1.25057.1 + 10.0.0-alpha.1.25077.1 $(MicrosoftNETRuntimeEmscriptenVersion) $(runtimewinx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion) From fd9c728bd3560850afde9a38a063a07dc1f3ed96 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Mon, 3 Feb 2025 12:51:37 -0800 Subject: [PATCH 18/30] Include PDB for all TfmRuntimeSpecificPackageFile (#111879) Previously this would only include the PDB for the primary output which missed any other additions to TfmRuntimeSpecificPackageFile - such as those from references or packages. --- eng/packaging.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/packaging.targets b/eng/packaging.targets index f2dc6bfcf5e133..c64ccfb2fcc393 100644 --- a/eng/packaging.targets +++ b/eng/packaging.targets @@ -122,7 +122,7 @@ - <_RuntimeSymbolPath Include="$(RuntimeSymbolPath)" /> + <_RuntimeSymbolPath Include="@(TfmRuntimeSpecificPackageFile->'%(RootDir)%(Directory)%(FileName).pdb')" Condition="'%(TfmRuntimeSpecificPackageFile.Extension)' == '.dll'" KeepMetadata="None" /> Date: Mon, 3 Feb 2025 23:11:30 +0200 Subject: [PATCH 19/30] use collection syntax in illink (#108458) Co-authored-by: Sven Boemer Co-authored-by: Andy Gocke --- src/tools/illink/external/Mono.Options/Options.cs | 2 +- .../DynamicallyAccessedMembersCodeFixProvider.cs | 4 ++-- src/tools/illink/src/ILLink.CodeFix/RequiresHelpers.cs | 2 +- .../UnconditionalSuppressMessageCodeFixProvider.cs | 2 +- .../illink/src/ILLink.RoslynAnalyzer/NullableAttributes.cs | 4 ++-- src/tools/illink/src/linker/Linker/AssemblyResolver.cs | 2 +- src/tools/illink/src/tlens/TLens/LensesCollection.cs | 5 +++-- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/tools/illink/external/Mono.Options/Options.cs b/src/tools/illink/external/Mono.Options/Options.cs index d8b3d78a455096..b89840c83b6c25 100644 --- a/src/tools/illink/external/Mono.Options/Options.cs +++ b/src/tools/illink/external/Mono.Options/Options.cs @@ -440,7 +440,7 @@ protected Option (string prototype, string description, int maxValueCount, bool this.names = (this is OptionSet.Category) // append GetHashCode() so that "duplicate" categories have distinct // names, e.g. adding multiple "" categories should be valid. - ? new[]{prototype + this.GetHashCode ()} + ? [prototype + this.GetHashCode ()] : prototype.Split ('|'); if (this is OptionSet.Category || this is CommandOption) diff --git a/src/tools/illink/src/ILLink.CodeFix/DynamicallyAccessedMembersCodeFixProvider.cs b/src/tools/illink/src/ILLink.CodeFix/DynamicallyAccessedMembersCodeFixProvider.cs index 28d82bafae8872..2c4763bd99f035 100644 --- a/src/tools/illink/src/ILLink.CodeFix/DynamicallyAccessedMembersCodeFixProvider.cs +++ b/src/tools/illink/src/ILLink.CodeFix/DynamicallyAccessedMembersCodeFixProvider.cs @@ -132,14 +132,14 @@ private static async Task AddAttributeAsync ( var editor = await DocumentEditor.CreateAsync (document, cancellationToken).ConfigureAwait (false); var generator = editor.Generator; - var attributeArguments = new[] { generator.AttributeArgument (generator.MemberAccessExpression (generator.DottedName ("System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes"), stringArguments)) }; + SyntaxNode[] attributeArguments = [generator.AttributeArgument (generator.MemberAccessExpression (generator.DottedName ("System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes"), stringArguments))]; var attribute = generator.Attribute ( generator.TypeExpression (attributeSymbol), attributeArguments) .WithAdditionalAnnotations (Simplifier.Annotation, Simplifier.AddImportsAnnotation); if (addAsReturnAttribute) { // don't use AddReturnAttribute because it's the same as AddAttribute https://github.com/dotnet/roslyn/pull/63084 - editor.ReplaceNode (targetNode, (d, g) => g.AddReturnAttributes (d, new[] { attribute })); + editor.ReplaceNode (targetNode, (d, g) => g.AddReturnAttributes (d, [attribute])); } else if (addGenericParameterAttribute) { // AddReturnAttributes currently doesn't support adding attributes to type arguments https://github.com/dotnet/roslyn/pull/63292 var newNode = (TypeParameterSyntax) targetNode; diff --git a/src/tools/illink/src/ILLink.CodeFix/RequiresHelpers.cs b/src/tools/illink/src/ILLink.CodeFix/RequiresHelpers.cs index b38f11ca4a8e5e..b150275e49c4fb 100644 --- a/src/tools/illink/src/ILLink.CodeFix/RequiresHelpers.cs +++ b/src/tools/illink/src/ILLink.CodeFix/RequiresHelpers.cs @@ -16,7 +16,7 @@ internal static SyntaxNode[] GetAttributeArgumentsForRequires (ISymbol targetSym if (string.IsNullOrEmpty (symbolDisplayName) || hasPublicAccessibility) return Array.Empty (); - return new[] { syntaxGenerator.AttributeArgument (syntaxGenerator.LiteralExpression ($"Calls {symbolDisplayName}")) }; + return [syntaxGenerator.AttributeArgument (syntaxGenerator.LiteralExpression ($"Calls {symbolDisplayName}"))]; } } } diff --git a/src/tools/illink/src/ILLink.CodeFix/UnconditionalSuppressMessageCodeFixProvider.cs b/src/tools/illink/src/ILLink.CodeFix/UnconditionalSuppressMessageCodeFixProvider.cs index 2fd1b81a604c47..1dc66ae89aad80 100644 --- a/src/tools/illink/src/ILLink.CodeFix/UnconditionalSuppressMessageCodeFixProvider.cs +++ b/src/tools/illink/src/ILLink.CodeFix/UnconditionalSuppressMessageCodeFixProvider.cs @@ -56,7 +56,7 @@ protected override SyntaxNode[] GetAttributeArguments (ISymbol? attributableSymb syntaxGenerator.LiteralExpression ("")); // [UnconditionalSuppressWarning (category, id, Justification = "")] - return new[] { ruleCategory, ruleId, suppressionJustification }; + return [ruleCategory, ruleId, suppressionJustification]; } } } diff --git a/src/tools/illink/src/ILLink.RoslynAnalyzer/NullableAttributes.cs b/src/tools/illink/src/ILLink.RoslynAnalyzer/NullableAttributes.cs index 7cf10912ea38b2..c07621e244d500 100644 --- a/src/tools/illink/src/ILLink.RoslynAnalyzer/NullableAttributes.cs +++ b/src/tools/illink/src/ILLink.RoslynAnalyzer/NullableAttributes.cs @@ -96,7 +96,7 @@ internal sealed class MemberNotNullAttribute : Attribute /// /// The field or property member that is promised to be not-null. /// - public MemberNotNullAttribute (string member) => Members = new[] { member }; + public MemberNotNullAttribute (string member) => Members = [member]; /// Initializes the attribute with the list of field and property members. /// @@ -122,7 +122,7 @@ internal sealed class MemberNotNullWhenAttribute : Attribute public MemberNotNullWhenAttribute (bool returnValue, string member) { ReturnValue = returnValue; - Members = new[] { member }; + Members = [member]; } /// Initializes the attribute with the specified return value condition and list of field and property members. diff --git a/src/tools/illink/src/linker/Linker/AssemblyResolver.cs b/src/tools/illink/src/linker/Linker/AssemblyResolver.cs index 98a593aabdb311..964f8c8a4dca62 100644 --- a/src/tools/illink/src/linker/Linker/AssemblyResolver.cs +++ b/src/tools/illink/src/linker/Linker/AssemblyResolver.cs @@ -187,7 +187,7 @@ AssemblyDefinition IAssemblyResolver.Resolve (AssemblyNameReference name, Reader throw new NotSupportedException (); } - static readonly string[] Extensions = new[] { ".dll", ".exe", ".winmd" }; + static readonly string[] Extensions = [".dll", ".exe", ".winmd"]; AssemblyDefinition? SearchDirectory (AssemblyNameReference name) { diff --git a/src/tools/illink/src/tlens/TLens/LensesCollection.cs b/src/tools/illink/src/tlens/TLens/LensesCollection.cs index 94bded70816136..632cc454f82f89 100644 --- a/src/tools/illink/src/tlens/TLens/LensesCollection.cs +++ b/src/tools/illink/src/tlens/TLens/LensesCollection.cs @@ -37,7 +37,8 @@ public Analyzer CreateAnalyzer () // Most used/unused attributes // Constants passed as arguments // - static readonly LensAnalyzerDetails[] all = new[] { + static readonly LensAnalyzerDetails[] all = + [ new LensAnalyzerDetails ("duplicated-code", "Methods which are possible duplicates", typeof (DuplicatedCodeAnalyzer)), new LensAnalyzerDetails ("fields-init", @@ -64,7 +65,7 @@ public Analyzer CreateAnalyzer () "Types with limited number of constructions", typeof (TypeInstatiationAnalyzer)) { DefaultSet = true }, new LensAnalyzerDetails ("unused-param", "Methods with unused parameters", typeof (UnusedParametersAnalyzer)), - }; + ]; public static IEnumerable All => all; From 688ce018d01c1164f78483ab730dc8046ee946af Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Mon, 3 Feb 2025 22:40:44 +0100 Subject: [PATCH 20/30] [daccess] Do not use USE_DAC_TABLE_RVA on Apple platforms (#112076) --- src/coreclr/debug/daccess/CMakeLists.txt | 4 ++-- src/coreclr/debug/dbgutil/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/coreclr/debug/daccess/CMakeLists.txt b/src/coreclr/debug/daccess/CMakeLists.txt index fa26f55cc37fa2..6c02154de2e4de 100644 --- a/src/coreclr/debug/daccess/CMakeLists.txt +++ b/src/coreclr/debug/daccess/CMakeLists.txt @@ -47,7 +47,7 @@ target_link_libraries(daccess PRIVATE cdacreader_api) add_dependencies(daccess eventing_headers) -if(CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS OR CLR_CMAKE_HOST_APPLE) +if(CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) add_definitions(-DUSE_DAC_TABLE_RVA) set(args $<$>:--dynamic> $ ${GENERATED_INCLUDE_DIR}/dactablerva.h) @@ -72,4 +72,4 @@ if(CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS OR CL ) add_dependencies(daccess dactablerva_header) -endif(CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS OR CLR_CMAKE_HOST_APPLE) +endif(CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) diff --git a/src/coreclr/debug/dbgutil/CMakeLists.txt b/src/coreclr/debug/dbgutil/CMakeLists.txt index 0ad223630a5839..802f56eb6061cc 100644 --- a/src/coreclr/debug/dbgutil/CMakeLists.txt +++ b/src/coreclr/debug/dbgutil/CMakeLists.txt @@ -23,10 +23,10 @@ if(CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_HAIKU) ) endif(CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_HAIKU) -if(CLR_CMAKE_TARGET_OSX) +if(CLR_CMAKE_TARGET_APPLE) list(APPEND DBGUTIL_SOURCES machoreader.cpp ) -endif(CLR_CMAKE_TARGET_OSX) +endif(CLR_CMAKE_TARGET_APPLE) add_library_clr(dbgutil STATIC ${DBGUTIL_SOURCES}) From 72f4147c5261890e10b8f9615d3d4ae33dc4d5ec Mon Sep 17 00:00:00 2001 From: Aaron Robinson Date: Mon, 3 Feb 2025 13:41:38 -0800 Subject: [PATCH 21/30] Update breaking change rules regarding byref/objref fields. (#112087) New rule based on https://github.com/dotnet/runtime/pull/111584 --------- Co-authored-by: Stephen Toub --- docs/coding-guidelines/breaking-change-rules.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/coding-guidelines/breaking-change-rules.md b/docs/coding-guidelines/breaking-change-rules.md index e8a5e5b7d0afda..21fc3103106f35 100644 --- a/docs/coding-guidelines/breaking-change-rules.md +++ b/docs/coding-guidelines/breaking-change-rules.md @@ -236,6 +236,8 @@ successfully bind to that overload, if simply passing an `int` value. However, i Definite assignment rules allow use of uninitialized variables so long as the variable type is a stateless struct. If the struct is made stateful, code could now end up with uninitialized data. This is both potentially a source breaking and binary breaking change. +* Adding a reference type field, a `ref` field, or a field involving a generic type parameter without the `unmanaged` constraint, to a value type that formerly had none of those field kinds. If the value type already contains at least one such field, adding another is non-breaking. This rule applies recursively to new fields that contain value types that may also introduce a new field kind. + ### Signatures ✓ **Allowed** * Adding `params` to a parameter From 4cfdb7d31e47073cda6b00f46ccd0e1289f8f2ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Mon, 3 Feb 2025 22:42:31 +0100 Subject: [PATCH 22/30] Use hardlinks in helixpublishwitharcade (#112091) We're running out of disk space in native AOT runs e.g. in #111178. --- src/tests/Common/helixpublishwitharcade.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/Common/helixpublishwitharcade.proj b/src/tests/Common/helixpublishwitharcade.proj index 66365473a397ce..21238d37183a89 100644 --- a/src/tests/Common/helixpublishwitharcade.proj +++ b/src/tests/Common/helixpublishwitharcade.proj @@ -449,7 +449,7 @@ - + From d38bb6eee033d3e500f7b2996b978098e867f384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Mon, 3 Feb 2025 22:43:51 +0100 Subject: [PATCH 23/30] Remove `RequiresProcessIsolation` on InterfaceFolding tests (#112098) Was looking at these and saw there's no need for isolation here. --- src/tests/Loader/classloader/InterfaceFolding/Ambiguous.ilproj | 2 -- src/tests/Loader/classloader/InterfaceFolding/TestCase0.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase0_Nested_I.ilproj | 2 -- .../InterfaceFolding/TestCase0_Nested_I_Nested_J.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase0_Nested_J.ilproj | 2 -- .../InterfaceFolding/TestCase0_Nested_J_Nested_I.ilproj | 2 -- src/tests/Loader/classloader/InterfaceFolding/TestCase1.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase1_Nested_I.ilproj | 2 -- .../InterfaceFolding/TestCase1_Nested_I_Nested_J.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase1_Nested_J.ilproj | 2 -- .../InterfaceFolding/TestCase1_Nested_J_Nested_I.ilproj | 2 -- src/tests/Loader/classloader/InterfaceFolding/TestCase2.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase2_Nested_I.ilproj | 2 -- .../InterfaceFolding/TestCase2_Nested_I_Nested_J.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase2_Nested_J.ilproj | 2 -- .../InterfaceFolding/TestCase2_Nested_J_Nested_I.ilproj | 2 -- src/tests/Loader/classloader/InterfaceFolding/TestCase3.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase3_Nested_I.ilproj | 2 -- .../InterfaceFolding/TestCase3_Nested_I_Nested_J.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase3_Nested_J.ilproj | 2 -- .../InterfaceFolding/TestCase3_Nested_J_Nested_I.ilproj | 2 -- src/tests/Loader/classloader/InterfaceFolding/TestCase4.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase4_Nested_I.ilproj | 2 -- .../InterfaceFolding/TestCase4_Nested_I_Nested_J.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase4_Nested_J.ilproj | 2 -- .../InterfaceFolding/TestCase4_Nested_J_Nested_I.ilproj | 2 -- src/tests/Loader/classloader/InterfaceFolding/TestCase5.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase5_Nested_I.ilproj | 2 -- .../InterfaceFolding/TestCase5_Nested_I_Nested_J.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase5_Nested_J.ilproj | 2 -- .../InterfaceFolding/TestCase5_Nested_J_Nested_I.ilproj | 2 -- src/tests/Loader/classloader/InterfaceFolding/TestCase6.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase6_Nested_I.ilproj | 2 -- .../InterfaceFolding/TestCase6_Nested_I_Nested_J.ilproj | 2 -- .../classloader/InterfaceFolding/TestCase6_Nested_J.ilproj | 2 -- .../InterfaceFolding/TestCase6_Nested_J_Nested_I.ilproj | 2 -- src/tests/Loader/classloader/InterfaceFolding/TestCase7.ilproj | 2 -- 37 files changed, 74 deletions(-) diff --git a/src/tests/Loader/classloader/InterfaceFolding/Ambiguous.ilproj b/src/tests/Loader/classloader/InterfaceFolding/Ambiguous.ilproj index 82b82978e01989..adf90f77e15efd 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/Ambiguous.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/Ambiguous.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase0.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase0.ilproj index 9792c17863cf2f..31ed277887212c 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase0.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase0.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_I.ilproj index 867cca06c9e666..a5711085cfbf63 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_I_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_I_Nested_J.ilproj index 9ef40fa908c3ec..02d3d6539a180e 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_I_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_I_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_J.ilproj index aec1a12b20040c..03e9af52cc20b4 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_J_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_J_Nested_I.ilproj index f07d5da2402cb0..3705d25b998500 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_J_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase0_Nested_J_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase1.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase1.ilproj index 4923543d8b47b8..50002710464aae 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase1.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase1.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_I.ilproj index 1375c0227faf5b..5fcf469a4d5dd8 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_I_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_I_Nested_J.ilproj index 4f841a389fb3ff..9a6dffb4406086 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_I_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_I_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_J.ilproj index 48d1a5af515d60..a7885a27357558 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_J_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_J_Nested_I.ilproj index 75dd45e2ae20ee..d826a1db4cf787 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_J_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase1_Nested_J_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase2.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase2.ilproj index 2138a70640736d..e53f1e4027693f 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase2.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase2.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_I.ilproj index c4c611927e12e6..1ad77dc7138f9b 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_I_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_I_Nested_J.ilproj index 90756460dc718a..486a4132cedeec 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_I_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_I_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_J.ilproj index 22369c07e7fa84..ec58e1979679de 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_J_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_J_Nested_I.ilproj index 35039f2fc123e1..cbd0e7020bcf87 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_J_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase2_Nested_J_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase3.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase3.ilproj index c171d5117cf988..82e42bfa18c594 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase3.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase3.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_I.ilproj index 08c8f0a04abeb2..f2864863ad6c10 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_I_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_I_Nested_J.ilproj index dae77763f96d3c..35636b0774d444 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_I_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_I_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_J.ilproj index 08a25a606cb1b2..bc75f77696795f 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_J_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_J_Nested_I.ilproj index ed5696c2213027..cdf6f638eb0f04 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_J_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase3_Nested_J_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase4.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase4.ilproj index ff033d90f4c65a..52b4932347ce4b 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase4.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase4.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_I.ilproj index 8a2220c960a0ac..2f17747c4b9f18 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_I_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_I_Nested_J.ilproj index 3e73742f812064..3cf495157dc52d 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_I_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_I_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_J.ilproj index fdc5de70f7b93f..609437fb7dffba 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_J_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_J_Nested_I.ilproj index 5d65badc490c3a..d5ec3afadcc229 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_J_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase4_Nested_J_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase5.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase5.ilproj index 6af4af52870e99..4c4ddae4ac3c4f 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase5.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase5.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_I.ilproj index 93fc05bac34050..3fcaf149bf4806 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_I_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_I_Nested_J.ilproj index 05b131d1b27886..a7f5b56ba4035a 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_I_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_I_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_J.ilproj index 79c86a767b2e32..e26e73f375fda9 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_J_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_J_Nested_I.ilproj index 08cc3257e23f2f..4780c6c5de9e8f 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_J_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase5_Nested_J_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase6.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase6.ilproj index aada4b81bb7802..b608b26936fbe6 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase6.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase6.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_I.ilproj index b7643c07f69ff4..3fd25b15ea0b39 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_I_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_I_Nested_J.ilproj index 1d83f5971cafaf..8f49d67dd729cd 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_I_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_I_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_J.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_J.ilproj index 099f27bb476f1d..fa84b36ad4e2d5 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_J.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_J.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_J_Nested_I.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_J_Nested_I.ilproj index 0e72a2ad769140..1559185f90f07b 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_J_Nested_I.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase6_Nested_J_Nested_I.ilproj @@ -1,7 +1,5 @@ - - true 1 diff --git a/src/tests/Loader/classloader/InterfaceFolding/TestCase7.ilproj b/src/tests/Loader/classloader/InterfaceFolding/TestCase7.ilproj index 5e1e8a020384d6..e900d50f04d4b2 100644 --- a/src/tests/Loader/classloader/InterfaceFolding/TestCase7.ilproj +++ b/src/tests/Loader/classloader/InterfaceFolding/TestCase7.ilproj @@ -1,7 +1,5 @@ - - true 1 From 05d94d94028b5622b19734e0e1b60d7aca4667b3 Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Mon, 3 Feb 2025 21:54:14 +0000 Subject: [PATCH 24/30] Bump `StyleCop.Analyzers` to `1.2.0-beta.556` (#111278) Co-authored-by: Viktor Hofer --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index ccf12d4891af61..a2d4fc5c5c2006 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -114,7 +114,7 @@ 6.0.0 6.0.0 5.0.0 - 1.2.0-beta.507 + 1.2.0-beta.556 4.6.0 5.0.0 4.9.0 From 6f7c6fb8d73889ef1189add4ef7ae4b809785840 Mon Sep 17 00:00:00 2001 From: Andy Ayers Date: Mon, 3 Feb 2025 15:33:15 -0800 Subject: [PATCH 25/30] JIT: Fix cross crossgen comparison failures (#112078) Fix a couple of issues that were causing cross-crossgen tests to fail * address mode formation was sensitive to the size of a constant handle * value histogram processing was always using 64 bit value sizes * transformation for down-counted loops was using host-sized -1. Fixes the jit-related issues in #111972 --- src/coreclr/jit/codegencommon.cpp | 10 ++------- src/coreclr/jit/likelyclass.cpp | 35 ++++++++++++++++++++++++------- src/coreclr/jit/scev.cpp | 13 ++++++++++++ src/coreclr/jit/scev.h | 6 +----- 4 files changed, 43 insertions(+), 21 deletions(-) diff --git a/src/coreclr/jit/codegencommon.cpp b/src/coreclr/jit/codegencommon.cpp index d535dfb1454570..d4477e3ef7b53e 100644 --- a/src/coreclr/jit/codegencommon.cpp +++ b/src/coreclr/jit/codegencommon.cpp @@ -1195,15 +1195,9 @@ bool CodeGen::genCreateAddrMode(GenTree* addr, /* Check for an addition of a constant */ - if (op2->IsIntCnsFitsInI32() && (op2->gtType != TYP_REF) && FitsIn(cns + op2->AsIntConCommon()->IconValue())) + if (op2->IsIntCnsFitsInI32() && op2->AsIntConCommon()->ImmedValCanBeFolded(compiler, addr->OperGet()) && + (op2->gtType != TYP_REF) && FitsIn(cns + op2->AsIntConCommon()->IconValue())) { - // We should not be building address modes out of non-foldable constants - if (!op2->AsIntConCommon()->ImmedValCanBeFolded(compiler, addr->OperGet())) - { - assert(compiler->opts.compReloc); - return false; - } - /* We're adding a constant */ cns += op2->AsIntConCommon()->IconValue(); diff --git a/src/coreclr/jit/likelyclass.cpp b/src/coreclr/jit/likelyclass.cpp index e181a2e9a135ab..b3b86804f55093 100644 --- a/src/coreclr/jit/likelyclass.cpp +++ b/src/coreclr/jit/likelyclass.cpp @@ -38,7 +38,10 @@ struct LikelyClassMethodHistogramEntry // struct LikelyClassMethodHistogram { - LikelyClassMethodHistogram(INT_PTR* histogramEntries, unsigned entryCount); + LikelyClassMethodHistogram(INT_PTR* histogramEntries, unsigned entryCount, bool int32Data = false); + + template + void LikelyClassMethodHistogramInner(ElemType* histogramEntries, unsigned entryCount); // Sum of counts from all entries in the histogram. This includes "unknown" entries which are not captured in // m_histogram @@ -61,8 +64,22 @@ struct LikelyClassMethodHistogram // Arguments: // histogramEntries - pointer to the table portion of a ClassProfile* object (see corjit.h) // entryCount - number of entries in the table to examine +// int32Data - true if table entries are 32 bits // -LikelyClassMethodHistogram::LikelyClassMethodHistogram(INT_PTR* histogramEntries, unsigned entryCount) +LikelyClassMethodHistogram::LikelyClassMethodHistogram(INT_PTR* histogramEntries, unsigned entryCount, bool int32Data) +{ + if (int32Data) + { + LikelyClassMethodHistogramInner((int*)histogramEntries, entryCount); + } + else + { + LikelyClassMethodHistogramInner(histogramEntries, entryCount); + } +} + +template +void LikelyClassMethodHistogram::LikelyClassMethodHistogramInner(ElemType* histogramEntries, unsigned entryCount) { m_unknownHandles = 0; m_totalCount = 0; @@ -76,8 +93,7 @@ LikelyClassMethodHistogram::LikelyClassMethodHistogram(INT_PTR* histogramEntries } m_totalCount++; - - INT_PTR currentEntry = histogramEntries[k]; + INT_PTR currentEntry = (INT_PTR)histogramEntries[k]; bool found = false; unsigned h = 0; @@ -385,15 +401,18 @@ extern "C" DLLEXPORT UINT32 WINAPI getLikelyValues(LikelyValueRecord* continue; // We currently re-use existing infrastructure for type handles for simplicity. - - const bool isHistogramCount = - (schema[i].InstrumentationKind == ICorJitInfo::PgoInstrumentationKind::ValueHistogramIntCount) || + // + const bool isIntHistogramCount = + (schema[i].InstrumentationKind == ICorJitInfo::PgoInstrumentationKind::ValueHistogramIntCount); + const bool isLongHistogramCount = (schema[i].InstrumentationKind == ICorJitInfo::PgoInstrumentationKind::ValueHistogramLongCount); + const bool isHistogramCount = isIntHistogramCount || isLongHistogramCount; if (isHistogramCount && (schema[i].Count == 1) && ((i + 1) < countSchemaItems) && (schema[i + 1].InstrumentationKind == ICorJitInfo::PgoInstrumentationKind::ValueHistogram)) { - LikelyClassMethodHistogram h((INT_PTR*)(pInstrumentationData + schema[i + 1].Offset), schema[i + 1].Count); + LikelyClassMethodHistogram h((INT_PTR*)(pInstrumentationData + schema[i + 1].Offset), schema[i + 1].Count, + isIntHistogramCount); LikelyClassMethodHistogramEntry sortedEntries[HISTOGRAM_MAX_SIZE_COUNT]; if (h.countHistogramElements == 0) diff --git a/src/coreclr/jit/scev.cpp b/src/coreclr/jit/scev.cpp index 94e75dc22a35af..e1140e48660cd5 100644 --- a/src/coreclr/jit/scev.cpp +++ b/src/coreclr/jit/scev.cpp @@ -60,6 +60,19 @@ #include "jitpch.h" +ScevConstant::ScevConstant(var_types type, int64_t value) + : Scev(ScevOper::Constant, type) +{ + if (genTypeSize(type) == 4) + { + Value = (int32_t)value; + } + else + { + Value = value; + } +} + //------------------------------------------------------------------------ // GetConstantValue: If this SSA use refers to a constant, then fetch that // constant. diff --git a/src/coreclr/jit/scev.h b/src/coreclr/jit/scev.h index 6d55ccc80227ca..46036daaf25cf0 100644 --- a/src/coreclr/jit/scev.h +++ b/src/coreclr/jit/scev.h @@ -82,11 +82,7 @@ struct Scev struct ScevConstant : Scev { - ScevConstant(var_types type, int64_t value) - : Scev(ScevOper::Constant, type) - , Value(value) - { - } + ScevConstant(var_types type, int64_t value); int64_t Value; }; From 3a99c64fe2f5814639537b9d8c798b09c4d42050 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Mon, 3 Feb 2025 23:59:22 +0000 Subject: [PATCH 26/30] arm64: Add support for Bitwise OR NOT & XOR NOT (#111893) * arm64: Add support for Bitwise XOR NOT * contributes towards #68028 * arm64: Add support for Bitwise OR NOT * Update comments & add a tests that takes ints * Add swap tests that take a int & uint --- src/coreclr/jit/codegenarm64.cpp | 11 +- src/coreclr/jit/codegenarmarch.cpp | 2 + src/coreclr/jit/gentree.cpp | 5 +- src/coreclr/jit/gtlist.h | 6 + src/coreclr/jit/lowerarmarch.cpp | 33 ++++- src/coreclr/jit/lsraarm64.cpp | 2 + src/coreclr/jit/morph.cpp | 4 +- src/coreclr/jit/simd.h | 15 ++- src/coreclr/jit/valuenum.cpp | 8 +- src/tests/JIT/opt/InstructionCombining/Eon.cs | 121 ++++++++++++++++++ .../JIT/opt/InstructionCombining/Eon.csproj | 17 +++ src/tests/JIT/opt/InstructionCombining/Orn.cs | 121 ++++++++++++++++++ .../JIT/opt/InstructionCombining/Orn.csproj | 17 +++ 13 files changed, 350 insertions(+), 12 deletions(-) create mode 100644 src/tests/JIT/opt/InstructionCombining/Eon.cs create mode 100644 src/tests/JIT/opt/InstructionCombining/Eon.csproj create mode 100644 src/tests/JIT/opt/InstructionCombining/Orn.cs create mode 100644 src/tests/JIT/opt/InstructionCombining/Orn.csproj diff --git a/src/coreclr/jit/codegenarm64.cpp b/src/coreclr/jit/codegenarm64.cpp index 8811349b8cdbb3..20ae1c67817d08 100644 --- a/src/coreclr/jit/codegenarm64.cpp +++ b/src/coreclr/jit/codegenarm64.cpp @@ -2580,7 +2580,7 @@ void CodeGen::genCodeForMulHi(GenTreeOp* treeNode) genProduceReg(treeNode); } -// Generate code for ADD, SUB, MUL, DIV, UDIV, AND, AND_NOT, OR and XOR +// Generate code for ADD, SUB, MUL, DIV, UDIV, AND, AND_NOT, OR, OR_NOT, XOR and XOR_NOT // This method is expected to have called genConsumeOperands() before calling it. void CodeGen::genCodeForBinary(GenTreeOp* tree) { @@ -2589,7 +2589,8 @@ void CodeGen::genCodeForBinary(GenTreeOp* tree) var_types targetType = tree->TypeGet(); emitter* emit = GetEmitter(); - assert(tree->OperIs(GT_ADD, GT_SUB, GT_MUL, GT_DIV, GT_UDIV, GT_AND, GT_AND_NOT, GT_OR, GT_XOR)); + assert(tree->OperIs(GT_ADD, GT_SUB, GT_MUL, GT_DIV, GT_UDIV, GT_AND, GT_AND_NOT, GT_OR, GT_OR_NOT, GT_XOR, + GT_XOR_NOT)); GenTree* op1 = tree->gtGetOp1(); GenTree* op2 = tree->gtGetOp2(); @@ -4276,6 +4277,9 @@ instruction CodeGen::genGetInsForOper(genTreeOps oper, var_types type) case GT_OR: ins = INS_orr; break; + case GT_OR_NOT: + ins = INS_orn; + break; case GT_ROR: ins = INS_ror; break; @@ -4291,6 +4295,9 @@ instruction CodeGen::genGetInsForOper(genTreeOps oper, var_types type) case GT_XOR: ins = INS_eor; break; + case GT_XOR_NOT: + ins = INS_eon; + break; default: NYI("Unhandled oper in genGetInsForOper() - integer"); diff --git a/src/coreclr/jit/codegenarmarch.cpp b/src/coreclr/jit/codegenarmarch.cpp index fb1e738f81451e..6060dab3ae66d0 100644 --- a/src/coreclr/jit/codegenarmarch.cpp +++ b/src/coreclr/jit/codegenarmarch.cpp @@ -216,7 +216,9 @@ void CodeGen::genCodeForTreeNode(GenTree* treeNode) break; case GT_OR: + case GT_OR_NOT: case GT_XOR: + case GT_XOR_NOT: case GT_AND: case GT_AND_NOT: assert(varTypeIsIntegralOrI(treeNode)); diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 7f72b807301ac0..e6df481d571441 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -27760,7 +27760,8 @@ bool GenTreeHWIntrinsic::OperIsCreateScalarUnsafe() const // bool GenTreeHWIntrinsic::OperIsBitwiseHWIntrinsic(genTreeOps oper) { - return (oper == GT_AND) || (oper == GT_AND_NOT) || (oper == GT_NOT) || (oper == GT_OR) || (oper == GT_XOR); + return (oper == GT_AND) || (oper == GT_AND_NOT) || (oper == GT_NOT) || (oper == GT_OR) || (oper == GT_OR_NOT) || + (oper == GT_XOR) || (oper == GT_XOR_NOT); } //------------------------------------------------------------------------ @@ -31046,7 +31047,9 @@ bool GenTree::IsVectorPerElementMask(var_types simdBaseType, unsigned simdSize) case GT_AND: case GT_AND_NOT: case GT_OR: + case GT_OR_NOT: case GT_XOR: + case GT_XOR_NOT: { // We are a binary bitwise operation where both inputs are per-element masks return intrinsic->Op(1)->IsVectorPerElementMask(simdBaseType, simdSize) && diff --git a/src/coreclr/jit/gtlist.h b/src/coreclr/jit/gtlist.h index 8c6c67fd6a3273..75726fc2ef713f 100644 --- a/src/coreclr/jit/gtlist.h +++ b/src/coreclr/jit/gtlist.h @@ -212,6 +212,12 @@ GTNODE(MUL_LONG , GenTreeOp ,1,0,GTK_BINOP|DBK_NOTHIR) // AndNot - emitted on ARM/ARM64 as the BIC instruction. Also used for creating AndNot HWINTRINSIC vector nodes in a cross-ISA manner. GTNODE(AND_NOT , GenTreeOp ,0,0,GTK_BINOP|DBK_NOTHIR) +// OrNot - emitted on ARM64 as the ORN instruction. +GTNODE(OR_NOT , GenTreeOp ,0,0,GTK_BINOP|DBK_NOTHIR) + +// XorNot - emitted on ARM64 as the EON instruction. +GTNODE(XOR_NOT , GenTreeOp ,0,0,GTK_BINOP|DBK_NOTHIR) + #ifdef TARGET_ARM64 GTNODE(BFIZ , GenTreeOp ,0,0,GTK_BINOP|DBK_NOTHIR) // Bitfield Insert in Zero. #endif diff --git a/src/coreclr/jit/lowerarmarch.cpp b/src/coreclr/jit/lowerarmarch.cpp index 852d912a133e78..d06bfaa892abce 100644 --- a/src/coreclr/jit/lowerarmarch.cpp +++ b/src/coreclr/jit/lowerarmarch.cpp @@ -304,7 +304,7 @@ bool Lowering::IsContainableUnaryOrBinaryOp(GenTree* parentNode, GenTree* childN } } - if (childNode->OperIs(GT_LSH, GT_RSH, GT_RSZ) && parentNode->OperIs(GT_NOT, GT_AND_NOT)) + if (childNode->OperIs(GT_LSH, GT_RSH, GT_RSZ) && parentNode->OperIs(GT_NOT, GT_AND_NOT, GT_OR_NOT, GT_XOR_NOT)) { return true; } @@ -652,6 +652,37 @@ GenTree* Lowering::LowerBinaryArithmetic(GenTreeOp* binOp) return next; } } + + if (binOp->OperIs(GT_OR, GT_XOR)) + { + GenTree* opNode = nullptr; + GenTree* notNode = nullptr; + if (binOp->gtGetOp1()->OperIs(GT_NOT)) + { + notNode = binOp->gtGetOp1(); + opNode = binOp->gtGetOp2(); + } + else if (binOp->gtGetOp2()->OperIs(GT_NOT)) + { + notNode = binOp->gtGetOp2(); + opNode = binOp->gtGetOp1(); + } + + if (notNode != nullptr) + { + binOp->gtOp1 = opNode; + binOp->gtOp2 = notNode->AsUnOp()->gtGetOp1(); + if (binOp->OperIs(GT_OR)) + { + binOp->ChangeOper(GT_OR_NOT); + } + else + { + binOp->ChangeOper(GT_XOR_NOT); + } + BlockRange().Remove(notNode); + } + } #endif } diff --git a/src/coreclr/jit/lsraarm64.cpp b/src/coreclr/jit/lsraarm64.cpp index fdde96ef3acdef..9af6bef2f17f19 100644 --- a/src/coreclr/jit/lsraarm64.cpp +++ b/src/coreclr/jit/lsraarm64.cpp @@ -859,7 +859,9 @@ int LinearScan::BuildNode(GenTree* tree) case GT_AND: case GT_AND_NOT: case GT_OR: + case GT_OR_NOT: case GT_XOR: + case GT_XOR_NOT: case GT_LSH: case GT_RSH: case GT_RSZ: diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index ee20a20bd20211..4c0fc233196482 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -9915,8 +9915,8 @@ GenTree* Compiler::fgOptimizeHWIntrinsic(GenTreeHWIntrinsic* node) genTreeOps actualOper = node->GetOperForHWIntrinsicId(&isScalar); genTreeOps oper = actualOper; - // We shouldn't find AND_NOT nodes since it should only be produced in lowering - assert(oper != GT_AND_NOT); + // We shouldn't find AND_NOT, OR_NOT or XOR_NOT nodes since it should only be produced in lowering + assert((oper != GT_AND_NOT) && (oper != GT_OR_NOT) && (oper != GT_XOR_NOT)); if (GenTreeHWIntrinsic::OperIsBitwiseHWIntrinsic(oper)) { diff --git a/src/coreclr/jit/simd.h b/src/coreclr/jit/simd.h index 1a0748667b3a58..2f7610b7e6147c 100644 --- a/src/coreclr/jit/simd.h +++ b/src/coreclr/jit/simd.h @@ -704,8 +704,9 @@ void EvaluateUnarySimd(genTreeOps oper, bool scalar, var_types baseType, TSimd* inline bool IsBinaryBitwiseOperation(genTreeOps oper) { - return (oper == GT_AND) || (oper == GT_AND_NOT) || (oper == GT_LSH) || (oper == GT_OR) || (oper == GT_ROL) || - (oper == GT_ROR) || (oper == GT_RSH) || (oper == GT_RSZ) || (oper == GT_XOR); + return (oper == GT_AND) || (oper == GT_AND_NOT) || (oper == GT_LSH) || (oper == GT_OR) || (oper == GT_OR_NOT) || + (oper == GT_ROL) || (oper == GT_ROR) || (oper == GT_RSH) || (oper == GT_RSZ) || (oper == GT_XOR) || + (oper == GT_XOR_NOT); } template @@ -842,6 +843,11 @@ TBase EvaluateBinaryScalarSpecialized(genTreeOps oper, TBase arg0, TBase arg1) return arg0 | arg1; } + case GT_OR_NOT: + { + return arg0 | ~arg1; + } + case GT_ROL: { // Normalize the "rotate by" value @@ -901,6 +907,11 @@ TBase EvaluateBinaryScalarSpecialized(genTreeOps oper, TBase arg0, TBase arg1) return arg0 ^ arg1; } + case GT_XOR_NOT: + { + return arg0 ^ ~arg1; + } + default: { unreached(); diff --git a/src/coreclr/jit/valuenum.cpp b/src/coreclr/jit/valuenum.cpp index fd13668c405e8d..ecd7f4fbdf475c 100644 --- a/src/coreclr/jit/valuenum.cpp +++ b/src/coreclr/jit/valuenum.cpp @@ -8271,8 +8271,8 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary( if (oper != GT_NONE) { - // We shouldn't find AND_NOT nodes since it should only be produced in lowering - assert(oper != GT_AND_NOT); + // We shouldn't find AND_NOT, OR_NOT or XOR_NOT nodes since it should only be produced in lowering + assert((oper != GT_AND_NOT) && (oper != GT_OR_NOT) && (oper != GT_XOR_NOT)); if (varTypeIsMask(type)) { @@ -8415,7 +8415,7 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary( genTreeOps oper = tree->GetOperForHWIntrinsicId(&isScalar); // We shouldn't find AND_NOT nodes since it should only be produced in lowering - assert(oper != GT_AND_NOT); + assert((oper != GT_AND_NOT) && (oper != GT_OR_NOT) && (oper != GT_XOR_NOT)); if (isScalar) { @@ -8903,7 +8903,7 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary( genTreeOps oper = tree->GetOperForHWIntrinsicId(&isScalar); // We shouldn't find AND_NOT nodes since it should only be produced in lowering - assert(oper != GT_AND_NOT); + assert((oper != GT_AND_NOT) && (oper != GT_OR_NOT) && (oper != GT_XOR_NOT)); if (isScalar) { diff --git a/src/tests/JIT/opt/InstructionCombining/Eon.cs b/src/tests/JIT/opt/InstructionCombining/Eon.cs new file mode 100644 index 00000000000000..f7e6cd30158e11 --- /dev/null +++ b/src/tests/JIT/opt/InstructionCombining/Eon.cs @@ -0,0 +1,121 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Runtime.CompilerServices; +using Xunit; + +namespace TestEon +{ + public class Program + { + [MethodImpl(MethodImplOptions.NoInlining)] + [Fact] + public static int CheckEon() + { + bool fail = false; + + if (Eon(5, 1) != 0xFFFFFFFB) + { + fail = true; + } + + if (EonLSL(0x12345678, 0xA) != 0xEDC92987) + { + fail = true; + } + + if (EonLSLSwapInt(0x12345678, 0xA) != -0x1236d679) + { + fail = true; + } + + if (EonLSLSwapUint(0xFDFDFDFD, 0xB) != 0x200C202) + { + fail = true; + } + + if (EonLSR(0x87654321, 0xFEDCBA) != 0x789D4A3B) + { + fail = true; + } + + if (EonASR(0x2468, 0xFEDCBA) != -0x246C) + { + fail = true; + } + + if (EonLargeShift(0x87654321, 0x12345678) != 0xB89ABCDE) + { + fail = true; + } + + if (EonLargeShift64Bit(0x1357135713571357, 0x123456789ABCDEF0) != 0xECA8ECA8ECE03DF1) + { + fail = true; + } + + if (fail) + { + return 101; + } + return 100; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static uint Eon(uint a, uint b) + { + //ARM64-FULL-LINE: eon {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}} + return a ^ ~b; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static uint EonLSL(uint a, uint b) + { + //ARM64-FULL-LINE: eon {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}}, LSL #14 + return a ^ ~(b<<14); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static int EonLSLSwapInt(int a, int b) + { + //ARM64-FULL-LINE: eon {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}}, LSL #14 + return ~(b<<14) ^ a; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static uint EonLSLSwapUint(uint a, uint b) + { + //ARM64-FULL-LINE: eon {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}}, LSL #14 + return ~(b<<14) ^ a; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static uint EonLSR(uint a, uint b) + { + //ARM64-FULL-LINE: eon {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}}, LSR #5 + return a ^ ~(b>>5); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static int EonASR(int a, int b) + { + //ARM64-FULL-LINE: eon {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}}, ASR #22 + return a ^ ~(b>>22); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static uint EonLargeShift(uint a, uint b) + { + //ARM64-FULL-LINE: eon {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}}, LSL #27 + return a ^ ~(b<<123); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static ulong EonLargeShift64Bit(ulong a, ulong b) + { + //ARM64-FULL-LINE: eon {{x[0-9]+}}, {{x[0-9]+}}, {{x[0-9]+}}, LSR #38 + return a ^ ~(b>>166); + } + } +} diff --git a/src/tests/JIT/opt/InstructionCombining/Eon.csproj b/src/tests/JIT/opt/InstructionCombining/Eon.csproj new file mode 100644 index 00000000000000..5bb8b91def67fb --- /dev/null +++ b/src/tests/JIT/opt/InstructionCombining/Eon.csproj @@ -0,0 +1,17 @@ + + + + true + + + None + True + + + + true + + + + + diff --git a/src/tests/JIT/opt/InstructionCombining/Orn.cs b/src/tests/JIT/opt/InstructionCombining/Orn.cs new file mode 100644 index 00000000000000..79b05f9112662c --- /dev/null +++ b/src/tests/JIT/opt/InstructionCombining/Orn.cs @@ -0,0 +1,121 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Runtime.CompilerServices; +using Xunit; + +namespace TestOrn +{ + public class Program + { + [MethodImpl(MethodImplOptions.NoInlining)] + [Fact] + public static int CheckOrn() + { + bool fail = false; + + if (Orn(0xAB, 0xCD) != 0xFFFFFFBB) + { + fail = true; + } + + if (OrnLSL(0xAB, 0xCDE) != 0xCC87FFFF) + { + fail = true; + } + + if (OrnLSLSwapInt(0xAB, -0xCDE) != 0x3377FFFF) + { + fail = true; + } + + if (OrnLSLSwapUint(0xAB, 0xCDE) != 0xCC87FFFF) + { + fail = true; + } + + if (OrnLSR(0x123456, 0xA9876543) != 0xFFFFFD5F) + { + fail = true; + } + + if (OrnASR(0x141414, 0x13579) != -0x9AC) + { + fail = true; + } + + if (OrnLargeShift(0x63636363, 0xE) != 0xFFFFFF7F) + { + fail = true; + } + + if (OrnLargeShift64Bit(0xACEACEACEACEACE0, 0xFEDCFEDCFEDCFEDC) != 0xFFFFFFFFEACEECE8) + { + fail = true; + } + + if (fail) + { + return 101; + } + return 100; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static uint Orn(uint a, uint b) + { + //ARM64-FULL-LINE: orn {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}} + return a | ~b; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static uint OrnLSL(uint a, uint b) + { + //ARM64-FULL-LINE: orn {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}}, LSL #18 + return a | ~(b<<18); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static int OrnLSLSwapInt(int a, int b) + { + //ARM64-FULL-LINE: orn {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}}, LSL #18 + return ~(b<<18) | a; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static uint OrnLSLSwapUint(uint a, uint b) + { + //ARM64-FULL-LINE: orn {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}}, LSL #18 + return ~(b<<18) | a; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static uint OrnLSR(uint a, uint b) + { + //ARM64-FULL-LINE: orn {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}}, LSR #22 + return a | ~(b>>22); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static int OrnASR(int a, int b) + { + //ARM64-FULL-LINE: orn {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}}, ASR #5 + return a | ~(b>>5); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static uint OrnLargeShift(uint a, uint b) + { + //ARM64-FULL-LINE: orn {{w[0-9]+}}, {{w[0-9]+}}, {{w[0-9]+}}, LSL #6 + return a | ~(b<<102); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static ulong OrnLargeShift64Bit(ulong a, ulong b) + { + //ARM64-FULL-LINE: orn {{x[0-9]+}}, {{x[0-9]+}}, {{x[0-9]+}}, LSR #34 + return a | ~(b>>162); + } + } +} diff --git a/src/tests/JIT/opt/InstructionCombining/Orn.csproj b/src/tests/JIT/opt/InstructionCombining/Orn.csproj new file mode 100644 index 00000000000000..d7ca4a6ad9f1e3 --- /dev/null +++ b/src/tests/JIT/opt/InstructionCombining/Orn.csproj @@ -0,0 +1,17 @@ + + + + true + + + None + True + + + + true + + + + + From 219622a23cef3dde6a08378ac9829cb2b242cead Mon Sep 17 00:00:00 2001 From: Cameron Aavik <99771732+caaavik-msft@users.noreply.github.com> Date: Tue, 4 Feb 2025 10:21:12 +1000 Subject: [PATCH 27/30] [PERF] Move performance testing YAML from dotnet/runtime to dotnet/performance (#111454) * Move runtime yaml to performance * Fix yaml path * Fix extends template parameters * Try to fix invalid stages * Try defining resource in root template * Change default branch during testing * Use additionalJobIdentifier * Use correct checkout paths * Ensure isScenario is passed in for ios_scenarios * Remove perfBranch now that we can set branch in Run pipeline dialog * Set default ref during testing * Move all job listings to performance repository * Fix template conditions * Fix perf_slow pipeline * Use new paths for yamls in performance repo * Move all remaining perf templates to performance directory * Fix missing parameters * Update all remaining references from old paths to new paths. Add comments to pipelines which will be deleted in next PR. * Remove clr subsets from mono build jobs * Fix capitalization of true * Change public CI job to point to fork during testing * Revert removing clr subsets from mono builds. Reset repository resources to correct values. --- .../common/evaluate-default-paths.yml | 7 +- eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 465 ------------------ eng/pipelines/coreclr/perf-wasm-jobs.yml | 173 ------- eng/pipelines/coreclr/perf.yml | 39 +- eng/pipelines/coreclr/perf_slow.yml | 339 +------------ .../build-and-run-perf-ios-scenarios.yml | 166 ------- eng/pipelines/coreclr/templates/perf-job.yml | 325 ------------ .../coreclr/templates/perf-send-to-helix.yml | 18 - .../coreclr/templates/run-performance-job.yml | 91 ---- .../coreclr/templates/run-scenarios-job.yml | 102 ---- .../runtime-extra-platforms-wasm.yml | 12 - eng/pipelines/performance/perf-slow.yml | 65 +++ eng/pipelines/performance/perf.yml | 76 +++ .../performance/runtime-wasm-perf.yml | 43 ++ .../templates/build-perf-bdn-app.yml | 0 .../templates/build-perf-maui-apps-net6.yml | 0 .../templates/build-perf-maui-apps-net7.yml | 0 .../templates/build-perf-sample-apps.yml | 0 .../templates/perf-arm64-build-jobs.yml | 77 +++ .../performance/templates/perf-build-jobs.yml | 143 ++++++ .../perf-ios-scenarios-build-jobs.yml | 51 ++ .../templates/perf-wasm-build-jobs.yml | 16 + .../perf-wasm-prepare-artifacts-steps.yml | 0 eng/pipelines/runtime-linker-tests.yml | 5 +- eng/pipelines/runtime-wasm-perf.yml | 30 +- eng/pipelines/runtime.yml | 5 +- 26 files changed, 537 insertions(+), 1711 deletions(-) delete mode 100644 eng/pipelines/coreclr/perf-non-wasm-jobs.yml delete mode 100644 eng/pipelines/coreclr/perf-wasm-jobs.yml delete mode 100644 eng/pipelines/coreclr/templates/build-and-run-perf-ios-scenarios.yml delete mode 100644 eng/pipelines/coreclr/templates/perf-job.yml delete mode 100644 eng/pipelines/coreclr/templates/perf-send-to-helix.yml delete mode 100644 eng/pipelines/coreclr/templates/run-performance-job.yml delete mode 100644 eng/pipelines/coreclr/templates/run-scenarios-job.yml create mode 100644 eng/pipelines/performance/perf-slow.yml create mode 100644 eng/pipelines/performance/perf.yml create mode 100644 eng/pipelines/performance/runtime-wasm-perf.yml rename eng/pipelines/{coreclr => performance}/templates/build-perf-bdn-app.yml (100%) rename eng/pipelines/{coreclr => performance}/templates/build-perf-maui-apps-net6.yml (100%) rename eng/pipelines/{coreclr => performance}/templates/build-perf-maui-apps-net7.yml (100%) rename eng/pipelines/{coreclr => performance}/templates/build-perf-sample-apps.yml (100%) create mode 100644 eng/pipelines/performance/templates/perf-arm64-build-jobs.yml create mode 100644 eng/pipelines/performance/templates/perf-build-jobs.yml create mode 100644 eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml create mode 100644 eng/pipelines/performance/templates/perf-wasm-build-jobs.yml rename eng/pipelines/{coreclr => performance/templates}/perf-wasm-prepare-artifacts-steps.yml (100%) diff --git a/eng/pipelines/common/evaluate-default-paths.yml b/eng/pipelines/common/evaluate-default-paths.yml index de849f75cd156a..b2adcfd16ef014 100644 --- a/eng/pipelines/common/evaluate-default-paths.yml +++ b/eng/pipelines/common/evaluate-default-paths.yml @@ -61,12 +61,7 @@ parameters: eng/testing/BrowserVersions.props ] _perf_pipeline_specific_only: [ - eng/pipelines/runtime-wasm-perf.yml - eng/pipelines/coreclr/perf*.yml - eng/pipelines/coreclr/templates/perf-job.yml - eng/pipelines/coreclr/templates/*-perf-* - eng/pipelines/coreclr/templates/run-perf* - eng/pipelines/coreclr/templates/run-scenarios-job.yml + eng/pipelines/performance/* eng/testing/performance/* ] diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml deleted file mode 100644 index 9418fb0a517b88..00000000000000 --- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml +++ /dev/null @@ -1,465 +0,0 @@ -parameters: - - name: perfBranch - type: string - default: main - - name: crossgen - type: object - default: - enabled: true - configs: - - windows_x64 - - windows_x86 - - name: viperJitOptRepeat - type: object - default: - enabled: true - configs: - - windows_x64 - - linux_x64 - - name: viperMicro - type: object - default: - enabled: true - configs: - - windows_x64 - - linux_x64 - - name: owlMicro - type: object - default: - enabled: true - configs: - - windows_x64 - - linux_x64 - - name: tigerNoR2R - type: object - default: - enabled: true - configs: - - windows_x64 - - linux_x64 - - name: tigerNoPGO - type: object - default: - enabled: true - configs: - - windows_x64 - - linux_x64 - - name: tigerMicro - type: object - default: - enabled: true - configs: - - windows_x64 - - linux_x64 - - windown_x86 - - linux_musl_x64 - - name: tigerMonoAOT - type: object - default: - enabled: true - configs: - - linux_x64 - - name: tigerMonoInterpreter - type: object - default: - enabled: true - configs: - - linux_x64 - - name: tigerMono - type: object - default: - enabled: true - configs: - - linux_x64 - - name: androidMono - type: object - default: - enabled: true - configs: - - android_arm64 - -jobs: - -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}: - - # build coreclr and libraries - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - linux_x64 - - windows_x64 - - windows_x86 - - linux_musl_x64 - jobParameters: - nameSuffix: coreclr - buildArgs: -s clr+libs+host+packs -c $(_BuildConfig) - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/bin - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_coreclr - displayName: Build Assets - - # build mono for AOT - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - linux_x64 - jobParameters: - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoAOTEnableLLVM=true /p:MonoEnableLLVM=true /p:BuildMonoAOTCrossCompiler=true /p:AotHostArchitecture=x64 /p:AotHostOS=linux - nameSuffix: AOT - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: '$(Build.SourcesDirectory)/artifacts/' - includeRootFolder: true - displayName: AOT Mono Artifacts - artifactName: LinuxMonoAOTx64 - archiveExtension: '.tar.gz' - archiveType: tar - tarCompression: gz - - # build mono Android scenarios - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - android_arm64 - jobParameters: - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - nameSuffix: AndroidMono - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml - parameters: - rootFolder: '$(Build.SourcesDirectory)/artifacts/' - includeRootFolder: true - displayName: Android Mono Artifacts - artifactName: AndroidMonoarm64 - archiveExtension: '.tar.gz' - archiveType: tar - tarCompression: gz - - # build mono - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - linux_x64 - jobParameters: - nameSuffix: mono - buildArgs: -s mono+clr.iltools+clr.hosts+libs+host+packs -c $(_BuildConfig) - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/bin - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_mono - displayName: Build Assets - - # Build and run iOS Mono and NativeAOT scenarios - - template: /eng/pipelines/coreclr/templates/build-and-run-perf-ios-scenarios.yml - parameters: - hybridGlobalization: True - perfBranch: ${{ parameters.perfBranch }} - - # run android scenarios - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - windows_x64 - jobParameters: - testGroup: perf - runtimeType: AndroidMono - projectFile: $(Build.SourcesDirectory)/eng/testing/performance/android_scenarios.proj - runKind: android_scenarios - runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml - logicalmachine: 'perfpixel4a' - perfBranch: ${{ parameters.perfBranch }} - - # run mono microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - linux_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - runtimeType: mono - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro_mono - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perftiger' - perfBranch: ${{ parameters.perfBranch }} - - # run mono interpreter perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - linux_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - runtimeType: mono - codeGenType: 'Interpreter' - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro_mono - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perftiger' - perfBranch: ${{ parameters.perfBranch }} - - # run mono aot microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs? - buildConfig: release - runtimeFlavor: aot - platforms: - - linux_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - runtimeType: mono - codeGenType: 'AOT' - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro_mono - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perftiger' - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr perftiger microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - linux_x64 - - windows_x64 - - windows_x86 - - linux_musl_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perftiger' - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr perftiger microbenchmarks no dynamic pgo perf jobs - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - windows_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perftiger' - pgoRunType: nodynamicpgo - perfBranch: ${{ parameters.perfBranch }} - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - linux_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perftiger' - pgoRunType: nodynamicpgo - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr perftiger microbenchmarks no R2R perf jobs - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - windows_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perftiger' - r2rRunType: nor2r - perfBranch: ${{ parameters.perfBranch }} - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - linux_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perftiger' - r2rRunType: nor2r - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr perfowl microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - linux_x64 - - windows_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfowl' - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr perfviper microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - linux_x64 - - windows_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfviper' - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr perfviper microbenchmarks perf jitoptrepeat jobs - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - linux_x64 - - windows_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfviper' - experimentName: 'jitoptrepeat' - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr crossgen perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - windows_x64 - - windows_x86 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Build.SourcesDirectory)/eng/testing/performance/crossgen_perf.proj - runKind: crossgen_scenarios - runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml - logicalmachine: 'perftiger_crossgen' - perfBranch: ${{ parameters.perfBranch }} - - # build mono runtime packs - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - android_arm64 - jobParameters: - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - nameSuffix: Mono_Packs - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: MonoRuntimePacks - isOfficialBuild: false - - # build PerfBDN app - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - ios_arm64 - jobParameters: - dependsOn: - - Build_android_arm64_release_Mono_Packs - buildArgs: -s mono -c $(_BuildConfig) - nameSuffix: PerfBDNApp - isOfficialBuild: false - pool: - vmImage: 'macos-13' - postBuildSteps: - - template: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml - parameters: - rootFolder: '$(Build.SourcesDirectory)/artifacts/' - includeRootFolder: true - displayName: Android BDN App Artifacts - artifactName: PerfBDNAppArm - archiveExtension: '.tar.gz' - archiveType: tar - tarCompression: gz - perfBranch: ${{ parameters.perfBranch }} diff --git a/eng/pipelines/coreclr/perf-wasm-jobs.yml b/eng/pipelines/coreclr/perf-wasm-jobs.yml deleted file mode 100644 index 8323bbc448e464..00000000000000 --- a/eng/pipelines/coreclr/perf-wasm-jobs.yml +++ /dev/null @@ -1,173 +0,0 @@ -# This contains all the wasm related perf jobs -# - -parameters: - runProfile: 'non-v8' - compare: false - onlySanityCheck: false - downloadSpecificBuild: null # { buildId, pipeline, branchName, project } - collectHelixLogsScript: '' - perfBranch: 'main' - -jobs: - -- ${{ if eq(parameters.runProfile, 'non-v8') }}: - - ${{ if eq(parameters.downloadSpecificBuild.buildId, '') }}: - # build mono on wasm - if not using an existing build - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - browser_wasm - jobParameters: - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - nameSuffix: wasm - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml - parameters: - configForBuild: Release - - #run mono wasm microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs? - buildConfig: Release - runtimeFlavor: wasm - platforms: - - linux_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - runtimeType: wasm - codeGenType: 'wasm' - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perftiger' - javascriptEngine: 'javascriptcore' - collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }} - downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }} - perfBranch: ${{ parameters.perfBranch }} - #downloadSpecificBuild: - #buildId: '1693181' - #pipeline: 'perf-wasm' - #branchName: 'refs/pull/67312/head' - - #run mono wasm aot microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobtemplate: /eng/pipelines/coreclr/templates/perf-job.yml # note: should we move this file out of coreclr tempelates because it contains mono jobs? - buildconfig: Release - runtimeflavor: wasm - platforms: - - linux_x64 - jobparameters: - testgroup: perf - livelibrariesbuildconfig: Release - runtimetype: wasm - codegentype: 'aot' - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runkind: micro - runjobtemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perftiger' - javascriptengine: 'javascriptcore' - collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }} - downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }} - perfBranch: ${{ parameters.perfBranch }} - -- ${{ if eq(parameters.runProfile, 'v8') }}: - - ${{ if eq(parameters.downloadSpecificBuild.buildId, '') }}: - # build mono on wasm - if not using an existing build - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - browser_wasm - jobParameters: - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - nameSuffix: wasm - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml - parameters: - configForBuild: Release - - # run mono wasm interpreter (default) microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs? - buildConfig: release - runtimeFlavor: wasm - platforms: - - linux_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - runtimeType: wasm - codeGenType: 'wasm' - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perftiger' - javascriptEngine: 'v8' - # For working with a newer sdk, and previous tfm (eg. 9.0 sdk, and net8.0 tfm) - #additionalSetupParameters: '--dotnet-versions 8.0.0' - collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }} - compare: ${{ parameters.compare }} - onlySanityCheck: ${{ parameters.onlySanityCheck }} - downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }} - perfBranch: ${{ parameters.perfBranch }} - - #run mono wasm aot microbenchmarks perf job - # Disabled for runtime-wasm-perf on PRs due to https://github.com/dotnet/runtime/issues/95101 - - ${{if not(in(variables['Build.DefinitionName'], 'runtime-wasm-perf')) }}: - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobtemplate: /eng/pipelines/coreclr/templates/perf-job.yml # note: should we move this file out of coreclr tempelates because it contains mono jobs? - buildconfig: release - runtimeflavor: wasm - platforms: - - linux_x64 - jobparameters: - testgroup: perf - livelibrariesbuildconfig: Release - runtimetype: wasm - codegentype: 'aot' - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runkind: micro - runjobtemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perftiger' - javascriptEngine: 'v8' - # For working with a newer sdk, and previous tfm (eg. 9.0 sdk, and net8.0 tfm) - #additionalSetupParameters: '--dotnet-versions 8.0.0' # passed to ci_setup.py - collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }} - compare: ${{ parameters.compare }} - onlySanityCheck: ${{ parameters.onlySanityCheck }} - downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }} - perfBranch: ${{ parameters.perfBranch }} - - # run mono wasm blazor perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: wasm - platforms: - - linux_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - runtimeType: wasm - projectFile: $(Build.SourcesDirectory)/eng/testing/performance/blazor_perf.proj - runKind: blazor_scenarios - runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml - # For working with a newer sdk, and previous tfm (eg. 9.0 sdk, and net8.0 tfm) - #additionalSetupParameters: '--dotnetversions 8.0.0' # passed to run-performance-job.py - logicalmachine: 'perftiger' - downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }} - perfBranch: ${{ parameters.perfBranch }} diff --git a/eng/pipelines/coreclr/perf.yml b/eng/pipelines/coreclr/perf.yml index 9b595f3dd8c1e7..e6ac356a1bca78 100644 --- a/eng/pipelines/coreclr/perf.yml +++ b/eng/pipelines/coreclr/perf.yml @@ -1,8 +1,9 @@ +# This file will be deleted in a follow-up PR once we have changed the pipeline in Azure Pipelines to point to /eng/pipelines/performance/perf.yml + parameters: -- name: perfBranch - displayName: Performance Repo Branch - type: string - default: 'main' + - name: onlySanityCheck + type: boolean + default: false trigger: batch: true @@ -24,6 +25,12 @@ trigger: - PATENTS.TXT - THIRD-PARTY-NOTICES.TXT +resources: + repositories: + - repository: performance + type: git + name: internal/dotnet-performance + variables: - template: /eng/pipelines/common/variables.yml @@ -43,21 +50,29 @@ schedules: always: true extends: - template: /eng/pipelines/common/templates/pipeline-with-resources.yml + template: /eng/pipelines/common/templates/pipeline-with-resources.yml parameters: stages: - stage: Build jobs: - - template: /eng/pipelines/coreclr/perf-wasm-jobs.yml + - template: /eng/pipelines/runtime-wasm-perf-jobs.yml@performance parameters: - collectHelixLogsScript: ${{ variables._wasmCollectHelixLogsScript }} - perfBranch: ${{ parameters.perfBranch }} #${{ and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}: # runProfile: 'non-v8' - ${{ if ne(variables['System.TeamProject'], 'public') }}: + ${{ if eq(variables['System.TeamProject'], 'internal') }}: runProfile: 'v8' + runtimeRepoAlias: self + performanceRepoAlias: performance + jobParameters: + ${{ if parameters.onlySanityCheck }}: + onlySanityCheck: true - - template: /eng/pipelines/coreclr/perf-non-wasm-jobs.yml - parameters: - perfBranch: ${{ parameters.perfBranch }} + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}: + - template: /eng/pipelines/runtime-perf-jobs.yml@performance + parameters: + runtimeRepoAlias: self + performanceRepoAlias: performance + jobParameters: + ${{ if parameters.onlySanityCheck }}: + onlySanityCheck: true diff --git a/eng/pipelines/coreclr/perf_slow.yml b/eng/pipelines/coreclr/perf_slow.yml index 468b5459f7c8ec..36ad098d328639 100644 --- a/eng/pipelines/coreclr/perf_slow.yml +++ b/eng/pipelines/coreclr/perf_slow.yml @@ -1,3 +1,5 @@ +# This file will be deleted in a follow-up PR once we have changed the pipeline in Azure Pipelines to point to /eng/pipelines/performance/perf-slow.yml + parameters: - name: runPrivateJobs type: boolean @@ -5,10 +7,9 @@ parameters: - name: runScheduledJobs type: boolean default: false -- name: perfBranch - displayName: Performance Repo Branch - type: string - default: 'main' +- name: onlySanityCheck + type: boolean + default: false trigger: batch: true @@ -29,6 +30,12 @@ trigger: - PATENTS.TXT - THIRD-PARTY-NOTICES.TXT +resources: + repositories: + - repository: performance + type: git + name: internal/dotnet-performance + variables: - template: /eng/pipelines/common/variables.yml @@ -46,319 +53,15 @@ extends: stages: - stage: Build jobs: - - - ${{ if and(ne(variables['System.TeamProject'], 'public'), or(in(variables['Build.Reason'], 'Schedule'), parameters.runScheduledJobs)) }}: - # build mono - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - linux_arm64 - jobParameters: - nameSuffix: mono - buildArgs: -s mono+clr.iltools+clr.hosts+libs+host+packs -c $(_BuildConfig) - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/bin - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_mono - displayName: Build Assets - - # run arm64 interpreter jobs for mono - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - linux_arm64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - runtimeType: mono - codeGenType: 'Interpreter' - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro_mono - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfampere' - timeoutInMinutes: 720 - perfBranch: ${{ parameters.perfBranch }} - - # run arm64 jit jobs for mono - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - linux_arm64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - runtimeType: mono - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro_mono - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfampere' - timeoutInMinutes: 720 - perfBranch: ${{ parameters.perfBranch }} - - - ${{ if and(ne(variables['System.TeamProject'], 'public'), or(notin(variables['Build.Reason'], 'Schedule', 'Manual'), parameters.runPrivateJobs)) }}: - - # build coreclr and libraries - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - linux_x64 - - windows_x64 - - linux_arm64 - - windows_arm64 - jobParameters: - nameSuffix: coreclr - buildArgs: -s clr+libs+host+packs -c $(_BuildConfig) - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/bin - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_coreclr - displayName: Build Assets - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: mono - runtimeVariant: 'llvmaot' - platforms: - - linux_arm64 - jobParameters: - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoAOTEnableLLVM=true /p:MonoEnableLLVM=true /p:BuildMonoAOTCrossCompiler=true /p:AotHostArchitecture=arm64 /p:AotHostOS=linux - nameSuffix: AOT - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: '$(Build.SourcesDirectory)/artifacts/' - includeRootFolder: true - displayName: AOT Mono Artifacts - artifactName: LinuxMonoAOTarm64 - archiveExtension: '.tar.gz' - archiveType: tar - tarCompression: gz - - # run mono aot microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs? - buildConfig: release - runtimeFlavor: aot - platforms: - - linux_arm64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - runtimeType: mono - codeGenType: 'AOT' - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro_mono - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfampere' - timeoutInMinutes: 780 - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr Linux arm64 ampere microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/pipelines/runtime-slow-perf-jobs.yml@performance parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - linux_arm64 + ${{ if or(in(variables['Build.Reason'], 'Schedule'), parameters.runScheduledJobs) }}: + runScheduledJobs: true + ${{ if or(notin(variables['Build.Reason'], 'Schedule', 'Manual'), parameters.runPrivateJobs) }}: + runPrivateJobs: true + runtimeRepoAlias: self + performanceRepoAlias: performance jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfampere' - timeoutInMinutes: 780 - perfBranch: ${{ parameters.perfBranch }} - - #run coreclr Linux arm64 ampere no dynamic pgo microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - linux_arm64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfampere' - timeoutInMinutes: 780 - pgoRunType: nodynamicpgo - perfBranch: ${{ parameters.perfBranch }} - - #run coreclr Linux arm64 ampere no R2R microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - linux_arm64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfampere' - timeoutInMinutes: 780 - r2rRunType: nor2r - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr Windows arm64 microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - windows_arm64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfsurf' - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr Windows arm64 ampere microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - windows_arm64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfampere' - timeoutInMinutes: 780 - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr Windows arm64 ampere no dynamic pgo microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - windows_arm64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfampere' - pgoRunType: nodynamicpgo - timeoutInMinutes: 780 - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr Windows arm64 ampere no R2R microbenchmarks perf job - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - windows_arm64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'perfampere' - r2rRunType: nor2r - timeoutInMinutes: 780 - perfBranch: ${{ parameters.perfBranch }} - - # run coreclr cloudvm microbenchmarks perf job - # this run is added temporarily for measuring AVX-512 performance - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - linux_x64 - - windows_x64 - jobParameters: - testGroup: perf - liveLibrariesBuildConfig: Release - projectFile: $(Agent.BuildDirectory)/performance/eng/performance/helix.proj - runKind: micro - runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml - logicalmachine: 'cloudvm' - perfBranch: ${{ parameters.perfBranch }} - - # Uncomment once we fix https://github.com/dotnet/performance/issues/1950 - # # run coreclr linux crossgen perf job - # - template: /eng/pipelines/common/platform-matrix.yml - # parameters: - # jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - # buildConfig: release - # runtimeFlavor: coreclr - # platforms: - # - linux_arm64 - # jobParameters: - # testGroup: perf - # liveLibrariesBuildConfig: Release - # projectFile: $(Build.SourcesDirectory)/eng/testing/performance/crossgen_perf.proj - # runKind: crossgen_scenarios - # runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml - # logicalmachine: 'perfa64' - # perfBranch: ${{ parameters.perfBranch }} - - # # run coreclr windows crossgen perf job - # - template: /eng/pipelines/common/platform-matrix.yml - # parameters: - # jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - # buildConfig: release - # runtimeFlavor: coreclr - # platforms: - # - windows_arm64 - # jobParameters: - # testGroup: perf - # liveLibrariesBuildConfig: Release - # projectFile: $(Build.SourcesDirectory)/eng/testing/performance/crossgen_perf.proj - # runKind: crossgen_scenarios - # runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml - # logicalmachine: 'perfsurf' - # perfBranch: ${{ parameters.perfBranch }} + ${{ if parameters.onlySanityCheck }}: + onlySanityCheck: true \ No newline at end of file diff --git a/eng/pipelines/coreclr/templates/build-and-run-perf-ios-scenarios.yml b/eng/pipelines/coreclr/templates/build-and-run-perf-ios-scenarios.yml deleted file mode 100644 index f9513e556f87e0..00000000000000 --- a/eng/pipelines/coreclr/templates/build-and-run-perf-ios-scenarios.yml +++ /dev/null @@ -1,166 +0,0 @@ -parameters: - hybridGlobalization: True - perfBranch: 'main' - -jobs: - # build mono iOS scenarios HybridGlobalization - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - ios_arm64 - jobParameters: - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - nameSuffix: iOSMono - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml - parameters: - rootFolder: '$(Build.SourcesDirectory)/artifacts/' - includeRootFolder: true - displayName: iOS Mono Artifacts - artifactName: iOSMonoarm64 - archiveExtension: '.tar.gz' - archiveType: tar - tarCompression: gz - hybridGlobalization: ${{ parameters.hybridGlobalization }} - - # build NativeAOT iOS scenarios HybridGlobalization - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - ios_arm64 - jobParameters: - buildArgs: --cross -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig) - nameSuffix: iOSNativeAOT - isOfficialBuild: false - postBuildSteps: - - template: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml - parameters: - rootFolder: '$(Build.SourcesDirectory)/artifacts/' - includeRootFolder: true - displayName: iOS NativeAOT Artifacts - artifactName: iOSNativeAOTarm64 - archiveExtension: '.tar.gz' - archiveType: tar - tarCompression: gz - hybridGlobalization: ${{ parameters.hybridGlobalization }} - - # run mono iOS scenarios scenarios HybridGlobalization - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - osx_x64 - jobParameters: - testGroup: perf - runtimeType: iOSMono - projectFile: $(Build.SourcesDirectory)/eng/testing/performance/ios_scenarios.proj - runKind: ios_scenarios - runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml - logicalmachine: 'perfiphone12mini' - iOSLlvmBuild: False - iOSStripSymbols: False - hybridGlobalization: ${{ parameters.hybridGlobalization }} - perfBranch: ${{ parameters.perfBranch }} - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - osx_x64 - jobParameters: - testGroup: perf - runtimeType: iOSMono - projectFile: $(Build.SourcesDirectory)/eng/testing/performance/ios_scenarios.proj - runKind: ios_scenarios - runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml - logicalmachine: 'perfiphone12mini' - iOSLlvmBuild: False - iOSStripSymbols: True - hybridGlobalization: ${{ parameters.hybridGlobalization }} - perfBranch: ${{ parameters.perfBranch }} - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - osx_x64 - jobParameters: - testGroup: perf - runtimeType: iOSMono - projectFile: $(Build.SourcesDirectory)/eng/testing/performance/ios_scenarios.proj - runKind: ios_scenarios - runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml - logicalmachine: 'perfiphone12mini' - iOSLlvmBuild: True - iOSStripSymbols: False - hybridGlobalization: ${{ parameters.hybridGlobalization }} - perfBranch: ${{ parameters.perfBranch }} - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - osx_x64 - jobParameters: - testGroup: perf - runtimeType: iOSMono - projectFile: $(Build.SourcesDirectory)/eng/testing/performance/ios_scenarios.proj - runKind: ios_scenarios - runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml - logicalmachine: 'perfiphone12mini' - iOSLlvmBuild: True - iOSStripSymbols: True - hybridGlobalization: ${{ parameters.hybridGlobalization }} - perfBranch: ${{ parameters.perfBranch }} - - # run NativeAOT iOS scenarios HybridGlobalization - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - osx_x64 - jobParameters: - testGroup: perf - runtimeType: iOSNativeAOT - projectFile: $(Build.SourcesDirectory)/eng/testing/performance/ios_scenarios.proj - runKind: ios_scenarios - runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml - logicalmachine: 'perfiphone12mini' - iOSStripSymbols: False - hybridGlobalization: ${{ parameters.hybridGlobalization }} - perfBranch: ${{ parameters.perfBranch }} - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml - buildConfig: release - runtimeFlavor: coreclr - platforms: - - osx_x64 - jobParameters: - testGroup: perf - runtimeType: iOSNativeAOT - projectFile: $(Build.SourcesDirectory)/eng/testing/performance/ios_scenarios.proj - runKind: ios_scenarios - runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml - logicalmachine: 'perfiphone12mini' - iOSStripSymbols: True - hybridGlobalization: ${{ parameters.hybridGlobalization }} - perfBranch: ${{ parameters.perfBranch }} diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml deleted file mode 100644 index 757b35aa5e4b71..00000000000000 --- a/eng/pipelines/coreclr/templates/perf-job.yml +++ /dev/null @@ -1,325 +0,0 @@ -parameters: - buildConfig: '' - archType: '' - osGroup: '' - osSubgroup: '' - container: '' - runtimeVariant: '' - framework: net10.0 # Specify the appropriate framework when running release branches (ie net6.0 for release/6.0) - liveLibrariesBuildConfig: '' - variables: {} - runtimeType: 'coreclr' - pool: '' - codeGenType: 'JIT' - projectFile: '' - runKind: '' - runJobTemplate: '/eng/pipelines/coreclr/templates/run-performance-job.yml' - additionalSetupParameters: '' - logicalMachine: '' - pgoRunType: '' - physicalPromotionRunType: '' - r2rRunType: '' - experimentName: '' - javascriptEngine: 'NoJS' - iOSLlvmBuild: 'False' - iOSStripSymbols: 'False' - hybridGlobalization: 'False' - collectHelixLogsScript: '' - timeoutInMinutes: 320 - compare: false - onlySanityCheck: false - downloadSpecificBuild: null # buildId, pipeline, branchName, project - crossBuild: false - perfBranch: 'main' - -### Perf job - -### Each perf job depends on a corresponding build job with the same -### buildConfig and archType. - -jobs: -- template: ${{ parameters.runJobTemplate }} - parameters: - # Compute job name from template parameters - jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}_{11}_{12}_{13}_{14}_{15}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.physicalPromotionRunType, parameters.r2rRunType, parameters.experimentName, parameters.iosLlvmBuild, parameters.iosStripSymbols, parameters.hybridGlobalization) }} - displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.physicalPromotionRunType, parameters.r2rRunType, parameters.experimentName, parameters.iosLlvmBuild, parameters.iosStripSymbols, parameters.hybridGlobalization) }} - pool: ${{ parameters.pool }} - buildConfig: ${{ parameters.buildConfig }} - archType: ${{ parameters.archType }} - osGroup: ${{ parameters.osGroup }} - osSubgroup: ${{ parameters.osSubgroup }} - runtimeVariant: ${{ parameters.runtimeVariant }} - liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} - runtimeType: ${{ parameters.runtimeType }} - codeGenType: ${{ parameters.codeGenType }} - projectFile: ${{ parameters.projectFile }} - runKind: ${{ parameters.runKind }} - additionalSetupParameters: ${{ parameters.additionalSetupParameters }} - container: ${{ parameters.container }} - logicalmachine: ${{ parameters.logicalmachine }} - pgoRunType: ${{ parameters.pgoRunType }} - physicalPromotionRunType: ${{ parameters.physicalPromotionRunType }} - r2rRunType: ${{ parameters.r2rRunType }} - experimentName: ${{ parameters.experimentName }} - javascriptEngine: ${{ parameters.javascriptEngine }} - iosLlvmBuild: ${{ parameters.iosLlvmBuild }} - iosStripSymbols: ${{ parameters.iosStripSymbols }} - hybridGlobalization: ${{ parameters.hybridGlobalization }} - timeoutInMinutes: ${{ parameters.timeoutInMinutes }} - extraSetupParameters: $(extraSetupParameters) - - ${{ if and(eq(parameters.runtimeType, 'wasm'), eq(parameters.codeGenType, 'aot')) }}: - helixTypeSuffix: '/wasm/aot' - ${{ if and(eq(parameters.runtimeType, 'wasm'), ne(parameters.codeGenType, 'aot')) }}: - helixTypeSuffix: '/wasm' - - collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }} - - # Test job depends on the corresponding build job - ${{ if eq(parameters.downloadSpecificBuild.buildId, '') }}: - dependsOn: - - ${{ if not(or(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'iOSNativeAOT', 'wasm'), and(eq(parameters.runtimeType, 'mono'), ne(parameters.codeGenType, 'AOT')))) }}: - - ${{ format('build_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, 'coreclr') }} - - ${{ if and(eq(parameters.runtimeType, 'mono'), ne(parameters.codeGenType, 'AOT')) }}: - - ${{ format('build_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, 'mono') }} - - ${{ if eq(parameters.runtimeType, 'wasm')}}: - - ${{ format('build_{0}{1}_{2}_{3}_{4}_{5}', 'browser', '', 'wasm', 'linux', parameters.buildConfig, parameters.runtimeType) }} - - ${{ if and(eq(parameters.codeGenType, 'AOT'), ne(parameters.runtimeType, 'wasm'))}}: - - ${{ format('build_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.codeGenType) }} - - ${{ if eq(parameters.runtimeType, 'AndroidMono')}}: - - ${{ 'build_android_arm64_release_AndroidMono' }} - - ${{ 'Build_ios_arm64_release_PerfBDNApp' }} - - ${{ if eq(parameters.runtimeType, 'iOSMono')}}: - - ${{ 'build_ios_arm64_release_iOSMono' }} - - ${{ if eq(parameters.runtimeType, 'iOSNativeAOT')}}: - - ${{ 'build_ios_arm64_release_iOSNativeAOT' }} - - variables: - - ${{ each variable in parameters.variables }}: - - ${{insert}}: ${{ variable }} - - _crossBuildPropertyArg: '' - - - name: _subGroupArg - ${{ if ne(parameters.osSubgroup, '') }}: - value: '--os-sub-group ${{ parameters.osSubgroup }}' - - name: _compareArg - ${{ if eq(parameters.compare, 'true') }}: - value: '--compare' - - name: _onlySanityCheckArg - ${{ if eq(parameters.onlySanityCheck, 'true') }}: - value: '--only-sanity' - - name: _hybridGlobalizationArg - ${{ if eq(parameters.hybridGlobalization, 'True') }}: - value: '--hybrid-globalization' - - name: _pgoRunTypeArg - ${{ if ne(parameters.pgoRunType, '') }}: - value: '--pgo-run-type ${{ parameters.pgoRunType }}' - - name: _physicalPromotionRunTypeArg - ${{ if ne(parameters.physicalPromotionRunType, '') }}: - value: '--physical-promotion-run-type ${{ parameters.physicalPromotionRunType }}' - - name: _r2rRunTypeArg - ${{ if ne(parameters.r2rRunType, '') }}: - value: '--r2r-run-type ${{ parameters.r2rRunType }}' - - name: _experimentArg - ${{ if ne(parameters.experimentName, '') }}: - value: '--experiment-name ${{ parameters.experimentName }}' - - name: _jsEngineArg - ${{ if eq(parameters.runtimeType, 'wasm') }}: - value: '--javascript-engine ${{ parameters.javascriptEngine }}' - - name: _iOSLlvmBuildArg - ${{ if eq(parameters.iOSLlvmBuild, 'True') }}: - value: '--ios-llvm-build' - - name: _iOSStripSymbolsArg - ${{ if eq(parameters.iOSStripSymbols, 'True') }}: - value: '--ios-strip-symbols' - - name: _iosArgs - ${{ if in(parameters.runtimeType, 'iOSMono', 'iOSNativeAOT') }}: - value: '$(_iOSLlvmBuildArg) $(_iOSStripSymbolsArg)' - - name: _projectFileArg - ${{ if ne(parameters.projectFile, '') }}: - value: '--project-file ${{ parameters.projectFile }}' - - - name: extraSetupParameters - value: "--run-kind ${{ parameters.runKind }} --architecture ${{ parameters.archType }} --os-group ${{ parameters.osGroup }} $(_subGroupArg) --logical-machine ${{ parameters.logicalMachine }} --performance-repo-dir $(Agent.BuildDirectory)/performance --runtime-repo-dir $(Build.SourcesDirectory) --codegen-type ${{ parameters.codeGenType }} --runtime-type ${{ parameters.runtimeType }} --use-local-commit-time $(_compareArg) $(_onlySanityCheckArg) $(_hybridGlobalizationArg) $(_pgoRunTypeArg) $(_physicalPromotionRunTypeArg) $(_r2rRunTypeArg) $(_experimentArg) $(_jsEngineArg) $(_iosArgs) $(_projectFileArg)" - - - ${{ if eq(parameters.crossBuild, true) }}: - - _crossBuildPropertyArg: '-cross' - - - ${{ if eq(parameters.osGroup, 'windows') }}: - - name: Python - value: 'py -3' - - ${{ if ne(parameters.osGroup, 'windows') }}: - - name: Python - value: 'python3' - - - name: librariesDownloadDir - value: '$(Build.SourcesDirectory)/artifacts' - - - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml - parameters: - runtimeFlavor: coreclr - testGroup: ${{ parameters.testGroup }} - liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} - - frameworks: - - ${{ parameters.framework }} - steps: - - ${{ if eq(variables['System.TeamProject'], 'public') }}: - - script: | - set -x - pwd - git clone https://github.com/dotnet/performance.git --depth 1 -b ${{ parameters.perfBranch }} --single-branch - displayName: Clone performance - workingDirectory: $(Agent.BuildDirectory) - - ${{ if ne(variables['System.TeamProject'], 'public') }}: - # Copy dotnet-runtime directory to Build.SourcesDirectory (TODO: Update yaml to just use the dotnet-runtime directory) - - task: CopyFiles@2 - inputs: - SourceFolder: $(Build.SourcesDirectory)/dotnet-runtime - TargetFolder: $(Build.SourcesDirectory) - # And remove the original - - task: DeleteFiles@1 - inputs: - SourceFolder: $(Build.SourcesDirectory)/dotnet-runtime - - checkout: git://internal/dotnet-performance@${{ parameters.perfBranch }} - path: performance - # Extra steps that will be passed to the performance template and run before sending the job to helix (all of which is done in the template) - - script: | - $(Build.SourcesDirectory)/eng/common/msbuild.sh $(Build.SourcesDirectory)/eng/testing/performance/add_properties_to_pipeline.proj /t:SetVariables - displayName: Add Properties To Pipeline Env - - # Download wasm - - ${{ if eq(parameters.runtimeType, 'wasm') }}: - - ${{ if eq(parameters.downloadSpecificBuild.buildId, '') }}: - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - unpackFolder: $(librariesDownloadDir)/BrowserWasm - artifactFileName: BrowserWasm.tar.gz - artifactName: BrowserWasm - displayName: BrowserWasm - - ${{ if ne(parameters.downloadSpecificBuild.buildId, '') }}: - - template: /eng/pipelines/common/download-specific-artifact-step.yml - parameters: - unpackFolder: $(librariesDownloadDir)/BrowserWasm - artifactFileName: BrowserWasm.tar.gz - artifactName: BrowserWasm - displayName: BrowserWasm - ${{ insert }}: ${{ parameters.downloadSpecificBuild }} - - - script: >- - mkdir -p $(librariesDownloadDir)/bin/wasm/wasm-data && - mkdir -p $(librariesDownloadDir)/bin/wasm/dotnet && - cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-latest/* $(librariesDownloadDir)/bin/wasm/dotnet && - cp -r $(librariesDownloadDir)/BrowserWasm/staging/built-nugets $(librariesDownloadDir)/bin/wasm && - cp src/mono/browser/test-main.js $(librariesDownloadDir)/bin/wasm/wasm-data/test-main.js && - find $(librariesDownloadDir)/bin/wasm -type d && - find $(librariesDownloadDir)/bin/wasm -type f -exec chmod 664 {} \; - displayName: "Create wasm directory (Linux)" - - ${{ elseif eq(parameters.codeGenType, 'AOT') }}: - # Download mono AOT - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - unpackFolder: $(Build.SourcesDirectory)/artifacts/bin - artifactFileName: 'BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_coreclr$(archiveExtension)' - artifactName: 'BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_coreclr' - displayName: 'Runtime artifacts' - - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - unpackFolder: $(librariesDownloadDir)/LinuxMonoAOT - artifactFileName: LinuxMonoAOT${{ parameters.archType }}.tar.gz - artifactName: LinuxMonoAOT${{ parameters.archType }} - displayName: AOT Mono Artifacts - - - script: "mkdir -p $(librariesDownloadDir)/bin/aot;mkdir -p $(librariesDownloadDir)/bin/aot/pack;cp -r $(librariesDownloadDir)/LinuxMonoAOT/artifacts/bin/mono/linux.${{ parameters.archType }}.Release/cross/linux-${{ parameters.archType }}/* $(librariesDownloadDir)/bin/aot;cp -r $(librariesDownloadDir)/LinuxMonoAOT/artifacts/bin/microsoft.netcore.app.runtime.linux-${{ parameters.archType }}/Release/* $(librariesDownloadDir)/bin/aot/pack" - displayName: "Create aot directory (Linux)" - - ${{ elseif in(parameters.runtimeType, 'coreclr', 'mono') }}: - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - unpackFolder: $(Build.SourcesDirectory)/artifacts/bin - artifactFileName: 'BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_${{ parameters.runtimeType }}$(archiveExtension)' - artifactName: 'BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_${{ parameters.runtimeType }}' - displayName: 'Runtime artifacts' - - - ${{ elseif eq(parameters.runtimeType, 'AndroidMono')}}: - # Download artifacts for Android Testing - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - unpackFolder: $(Build.SourcesDirectory)/androidHelloWorld - cleanUnpackFolder: false - artifactFileName: 'AndroidMonoarm64.tar.gz' - artifactName: 'AndroidMonoarm64' - displayName: 'Mono Android HelloWorld' - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - unpackFolder: $(Build.SourcesDirectory) - cleanUnpackFolder: false - artifactFileName: 'AndroidBDNApk.tar.gz' - artifactName: 'AndroidBDNApk' - displayName: 'Mono Android BDN Apk' - - # Download iOSMono and Native AOT tests - - ${{ elseif or(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.runtimeType, 'iOSNativeAOT')) }}: - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld - cleanUnpackFolder: false - ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'False'), eq(parameters.iOSStripSymbols, 'False')) }}: - artifactName: 'iOSSampleAppNoLLVMSymbolsHybridGlobalization${{parameters.hybridGlobalization}}' - artifactFileName: 'iOSSampleAppNoLLVMSymbolsHybridGlobalization${{parameters.hybridGlobalization}}.zip' - ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'False'), eq(parameters.iOSStripSymbols, 'True')) }}: - artifactName: 'iOSSampleAppNoLLVMNoSymbolsHybridGlobalization${{parameters.hybridGlobalization}}' - artifactFileName: 'iOSSampleAppNoLLVMNoSymbolsHybridGlobalization${{parameters.hybridGlobalization}}.zip' - ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'True'), eq(parameters.iOSStripSymbols, 'False')) }}: - artifactName: 'iOSSampleAppLLVMSymbolsHybridGlobalization${{parameters.hybridGlobalization}}' - artifactFileName: 'iOSSampleAppLLVMSymbolsHybridGlobalization${{parameters.hybridGlobalization}}.zip' - ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'True'), eq(parameters.iOSStripSymbols, 'True')) }}: - artifactName: 'iOSSampleAppLLVMNoSymbolsHybridGlobalization${{parameters.hybridGlobalization}}' - artifactFileName: 'iOSSampleAppLLVMNoSymbolsHybridGlobalization${{parameters.hybridGlobalization}}.zip' - ${{ if and(eq(parameters.runtimeType, 'iOSNativeAOT'), eq(parameters.iOSStripSymbols, 'False')) }}: - artifactName: 'iOSSampleAppSymbolsHybridGlobalization${{parameters.hybridGlobalization}}' - artifactFileName: 'iOSSampleAppSymbolsHybridGlobalization${{parameters.hybridGlobalization}}.zip' - ${{ if and(eq(parameters.runtimeType, 'iOSNativeAOT'), eq(parameters.iOSStripSymbols, 'True')) }}: - artifactName: 'iOSSampleAppNoSymbolsHybridGlobalization${{parameters.hybridGlobalization}}' - artifactFileName: 'iOSSampleAppNoSymbolsHybridGlobalization${{parameters.hybridGlobalization}}.zip' - displayName: 'iOS Sample App' - # same artifact as above but don't extract .zip - - task: DownloadBuildArtifacts@0 - displayName: 'Download iOS Sample App' - inputs: - buildType: current - downloadType: single - downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip' - ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'False'), eq(parameters.iOSStripSymbols, 'False')) }}: - artifactName: 'iOSSampleAppNoLLVMSymbolsHybridGlobalization${{parameters.hybridGlobalization}}' - ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'False'), eq(parameters.iOSStripSymbols, 'True')) }}: - artifactName: 'iOSSampleAppNoLLVMNoSymbolsHybridGlobalization${{parameters.hybridGlobalization}}' - ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'True'), eq(parameters.iOSStripSymbols, 'False')) }}: - artifactName: 'iOSSampleAppLLVMSymbolsHybridGlobalization${{parameters.hybridGlobalization}}' - ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'True'), eq(parameters.iOSStripSymbols, 'True')) }}: - artifactName: 'iOSSampleAppLLVMNoSymbolsHybridGlobalization${{parameters.hybridGlobalization}}' - ${{ if and(eq(parameters.runtimeType, 'iOSNativeAOT'), eq(parameters.iOSStripSymbols, 'False')) }}: - artifactName: 'iOSSampleAppSymbolsHybridGlobalization${{parameters.hybridGlobalization}}' - ${{ if and(eq(parameters.runtimeType, 'iOSNativeAOT'), eq(parameters.iOSStripSymbols, 'True')) }}: - artifactName: 'iOSSampleAppNoSymbolsHybridGlobalization${{parameters.hybridGlobalization}}' - checkDownloadedFiles: true - - # Create Core_Root - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(buildConfig) $(archType) generatelayoutonly $(librariesOverrideArg) $(_crossBuildPropertyArg) - displayName: Create Core_Root - condition: and(succeeded(), ne(variables.runtimeFlavorName, 'Mono'), not(in('${{ parameters.runtimeType }}', 'wasm', 'AndroidMono', 'iOSMono', 'iOSNativeAOT'))) - - - task: CopyFiles@2 - displayName: Create .dotnet-mono folder - inputs: - SourceFolder: $(Build.SourcesDirectory)/artifacts/bin/testhost/${{ parameters.framework }}-$(osGroup)-$(buildConfigUpper)-$(archType) - TargetFolder: $(Build.SourcesDirectory)/.dotnet-mono - condition: and(succeeded(), eq(variables.runtimeFlavorName, 'Mono'), ne(variables.osGroup, 'windows'), notIn('${{ parameters.runtimeType }}', 'wasm', 'AndroidMono', 'iOSMono', 'iOSNativeAOT')) - - - task: CopyFiles@2 - displayName: Copy corerun to .dotnet-mono - inputs: - SourceFolder: $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper) - Contents: 'corerun*' - TargetFolder: $(Build.SourcesDirectory)/.dotnet-mono/shared/Microsoft.NETCore.App/$(productVersion) - condition: and(succeeded(), eq(variables.runtimeFlavorName, 'Mono'), ne(variables.osGroup, 'windows'), notIn('${{ parameters.runtimeType }}', 'wasm', 'AndroidMono', 'iOSMono', 'iOSNativeAOT')) diff --git a/eng/pipelines/coreclr/templates/perf-send-to-helix.yml b/eng/pipelines/coreclr/templates/perf-send-to-helix.yml deleted file mode 100644 index f021d666292a87..00000000000000 --- a/eng/pipelines/coreclr/templates/perf-send-to-helix.yml +++ /dev/null @@ -1,18 +0,0 @@ -parameters: - ProjectFile: '' # required -- project file that specifies the helix workitems - osGroup: '' # required -- operating system for the job - DisplayNamePrefix: 'Send job to Helix' # optional -- rename the beginning of the displayName of the steps in AzDO - condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() - continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false - -steps: -- template: /eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml - parameters: - osGroup: ${{ parameters.osGroup }} - sendParams: ${{ parameters.ProjectFile }} /restore /t:Test /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog - displayName: ${{ parameters.DisplayNamePrefix }} - condition: ${{ parameters.condition }} - shouldContinueOnError: ${{ parameters.continueOnError }} - environment: - BuildConfig: $(_BuildConfig) - SYSTEM_ACCESSTOKEN: $(System.AccessToken) diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml deleted file mode 100644 index d824377b275256..00000000000000 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ /dev/null @@ -1,91 +0,0 @@ -parameters: - steps: [] # optional -- any additional steps that need to happen before pulling down the performance repo and sending the performance benchmarks to helix (ie building your repo) - variables: [] # optional -- list of additional variables to send to the template - jobName: '' # required -- job name - displayName: '' # optional -- display name for the job. Will use jobName if not passed - pool: '' # required -- name of the Build pool - container: '' # required -- name of the container - buildConfig: '' # required -- build configuration - archType: '' # required -- targeting CPU architecture - osGroup: '' # required -- operating system for the job - osSubgroup: '' # optional -- operating system subgroup - extraSetupParameters: '' # optional -- extra arguments to pass to the setup script - frameworks: ['netcoreapp3.0'] # optional -- list of frameworks to run against - continueOnError: 'false' # optional -- determines whether to continue the build if the step errors - dependsOn: '' # optional -- dependencies of the job - timeoutInMinutes: 320 # optional -- timeout for the job - enableTelemetry: false # optional -- enable for telemetry - liveLibrariesBuildConfig: '' # optional -- live-live libraries configuration to use for the run - pgoRunType: '' # optional -- different PGO configurations - physicalPromotionRunType: '' # optional -- different physical promotion configurations - r2rRunType: '' # optional -- different R2R configurations - experimentName: '' # optional -- name of the experiment - runtimeType: 'coreclr' # optional -- Sets the runtime as coreclr or mono - codeGenType: 'JIT' # optional -- Decides on the codegen technology if running on mono - projectFile: '$(Agent.BuildDirectory)/performance/eng/performance/helix.proj' # optional -- project file to build helix workitems - runKind: '' # required -- test category - logicalMachine: '' # required -- Used to specify a which pool of machines the test should run against - javascriptEngine: 'NoJS' - helixTypeSuffix: '' # optional -- appends to HelixType - additionalSetupParameters: '' # optional -- additional setup parameters that are job-specific - -jobs: -- template: /eng/pipelines/common/templates/runtimes/xplat-job.yml - parameters: - dependsOn: ${{ parameters.dependsOn }} - buildConfig: ${{ parameters.buildConfig }} - archType: ${{ parameters.archType }} - osGroup: ${{ parameters.osGroup }} - osSubgroup: ${{ parameters.osSubgroup }} - liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} - enableTelemetry: ${{ parameters.enableTelemetry }} - enablePublishBuildArtifacts: true - continueOnError: ${{ parameters.continueOnError }} - - ${{ if ne(parameters.displayName, '') }}: - displayName: '${{ parameters.displayName }}' - ${{ if eq(parameters.displayName, '') }}: - displayName: '${{ parameters.jobName }}' - name: ${{ replace(replace(parameters.jobName, ' ', '_'), '-', '_') }} - - timeoutInMinutes: ${{ parameters.timeoutInMinutes }} - - logsName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_${{ parameters.logicalMachine }}_${{ parameters.javascriptEngine }}_${{ parameters.pgoRunType }}_${{ parameters.physicalPromotionRunType }}_${{ parameters.r2rRunType }}_${{ parameters.experimentName }}' - - variables: - - ${{ each variable in parameters.variables }}: - - ${{insert}}: ${{ variable }} - - - name: internalParam - value: '' - - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - name: internalParam - value: --internal - - group: DotNet-HelixApi-Access - - group: dotnet-benchview - - workspace: - clean: all - pool: - ${{ parameters.pool }} - ${{ if ne(parameters.runtimeType, 'wasm') }}: - container: ${{ parameters.container }} - strategy: - matrix: - ${{ each framework in parameters.frameworks }}: - ${{ framework }}: - _Framework: ${{ framework }} - steps: - - ${{ parameters.steps }} - - script: $(Python) $(Agent.BuildDirectory)/performance/scripts/run_performance_job.py --framework $(_Framework) $(internalParam) ${{ parameters.extraSetupParameters }} ${{ parameters.additionalSetupParameters }} - displayName: Run performance job script - env: - HelixAccessToken: '$(HelixApiAccessToken)' - PerfCommandUploadToken: '$(PerfCommandUploadToken)' - PerfCommandUploadTokenLinux: '$(PerfCommandUploadTokenLinux)' - # Run perf testing in helix - - template: /eng/pipelines/coreclr/templates/perf-send-to-helix.yml - parameters: - ProjectFile: ${{ parameters.projectFile }} - osGroup: ${{ parameters.osGroup }} diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml deleted file mode 100644 index 2bb05f14835773..00000000000000 --- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml +++ /dev/null @@ -1,102 +0,0 @@ -parameters: - steps: [] # optional -- any additional steps that need to happen before pulling down the performance repo and sending the performance benchmarks to helix (ie building your repo) - variables: [] # optional -- list of additional variables to send to the template - jobName: '' # required -- job name - displayName: '' # optional -- display name for the job. Will use jobName if not passed - pool: '' # required -- name of the Build pool - container: '' # required -- name of the container - buildConfig: '' # required -- build configuration - archType: '' # required -- targeting CPU architecture - osGroup: '' # required -- operating system for the job - osSubgroup: '' # optional -- operating system subgroup - extraSetupParameters: '' # optional -- extra arguments to pass to the setup script - frameworks: ['netcoreapp3.0'] # optional -- list of frameworks to run against - continueOnError: 'false' # optional -- determines whether to continue the build if the step errors - dependsOn: '' # optional -- dependencies of the job - timeoutInMinutes: 320 # optional -- timeout for the job - enableTelemetry: false # optional -- enable for telemetry - liveLibrariesBuildConfig: '' # optional -- live-live libraries configuration to use for the run - runtimeType: 'coreclr' # optional -- Sets the runtime as coreclr or mono - codeGenType: 'JIT' # optional -- Decides on the codegen technology if running on mono - projectFile: '' # required -- project file to build helix workitems - runKind: '' # required -- test category - additionalSetupParameters: '' # optional -- additional setup parameters that are job-specific - -jobs: -- template: /eng/pipelines/common/templates/runtimes/xplat-job.yml - parameters: - dependsOn: ${{ parameters.dependsOn }} - buildConfig: ${{ parameters.buildConfig }} - archType: ${{ parameters.archType }} - osGroup: ${{ parameters.osGroup }} - osSubgroup: ${{ parameters.osSubgroup }} - liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} - enableTelemetry: ${{ parameters.enableTelemetry }} - enablePublishBuildArtifacts: true - continueOnError: ${{ parameters.continueOnError }} - logsName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_$(iOSLlvmBuild)_$(iOSStripSymbols)_$(hybridGlobalization)' - - ${{ if ne(parameters.displayName, '') }}: - displayName: '${{ parameters.displayName }}' - ${{ if eq(parameters.displayName, '') }}: - displayName: '${{ parameters.jobName }}' - name: ${{ replace(replace(parameters.jobName, ' ', '_'), '-', '_') }} - - timeoutInMinutes: ${{ parameters.timeoutInMinutes }} - - variables: - - ${{ each variable in parameters.variables }}: - - ${{insert}}: ${{ variable }} - - - name: internalParam - value: '' - - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - name: internalParam - value: --internal - - group: DotNet-HelixApi-Access - - group: dotnet-benchview - - - ExtraSetupArguments: '' - - name: ExtraSetupArguments - ${{ if ne(parameters.runtimeType, 'wasm') }}: - value: --install-dir $(PayloadDirectory)/dotnet - - - name: librariesDownloadDir - value: '$(Build.SourcesDirectory)/artifacts' - - workspace: - clean: all - pool: - ${{ parameters.pool }} - ${{ if ne(parameters.runtimeType, 'wasm') }}: - container: ${{ parameters.container }} - strategy: - matrix: - ${{ each framework in parameters.frameworks }}: - ${{ framework }}: - _Framework: ${{ framework }} - steps: - - ${{ parameters.steps }} - # copy wasm packs if running on wasm (TODO: move to run-performance-job.py) - - script: >- - mkdir -p $(librariesDownloadDir)/bin/wasm/data && - cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-latest $(librariesDownloadDir)/bin/wasm && - cp -r $(librariesDownloadDir)/BrowserWasm/staging/built-nugets $(librariesDownloadDir)/bin/wasm && - cp src/mono/browser/test-main.js $(librariesDownloadDir)/bin/wasm/data/test-main.js && - find $(librariesDownloadDir)/bin/wasm -type f -exec chmod 664 {} \; - displayName: "Create wasm directory (Linux)" - condition: and(succeeded(), eq('${{ parameters.runtimeType }}', 'wasm')) - # run run-performance-job.py - - script: $(Python) $(Agent.BuildDirectory)/performance/scripts/run_performance_job.py --is-scenario --framework $(_Framework) $(internalParam) ${{ parameters.extraSetupParameters }} ${{ parameters.additionalSetupParameters }} - displayName: Run performance job script - env: - HelixAccessToken: '$(HelixApiAccessToken)' - PerfCommandUploadToken: '$(PerfCommandUploadToken)' - PerfCommandUploadTokenLinux: '$(PerfCommandUploadTokenLinux)' - - # run perf testing in helix - - template: /eng/pipelines/coreclr/templates/perf-send-to-helix.yml - parameters: - ProjectFile: ${{ parameters.projectFile }} - osGroup: ${{ parameters.osGroup }} diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml index 06b65b209ba500..f0b197b68db9ac 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml @@ -55,12 +55,6 @@ jobs: runAOT: true alwaysRun: true - # Disabled for now - #- template: /eng/pipelines/coreclr/perf-wasm-jobs.yml - #parameters: - #runProfile: 'v8' - #onlySanityCheck: true - # # ********** For !rolling builds, IOW - PR builds ************* # - run everything, if relevant paths changed @@ -197,12 +191,6 @@ jobs: isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }} isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }} - # Disable for now - #- template: /eng/pipelines/coreclr/perf-wasm-jobs.yml - #parameters: - #runProfile: 'v8' - #onlySanityCheck: true - - ${{ if and(ne(parameters.isRollingBuild, true), ne(parameters.excludeOptional, true)) }}: - template: /eng/pipelines/common/templates/wasm-library-tests.yml parameters: diff --git a/eng/pipelines/performance/perf-slow.yml b/eng/pipelines/performance/perf-slow.yml new file mode 100644 index 00000000000000..d30ecea46d79a5 --- /dev/null +++ b/eng/pipelines/performance/perf-slow.yml @@ -0,0 +1,65 @@ +parameters: +- name: runPrivateJobs + type: boolean + default: false +- name: runScheduledJobs + type: boolean + default: false +- name: onlySanityCheck + type: boolean + default: false + +trigger: + batch: true + branches: + include: + - main + - release/9.0 + paths: + include: + - '*' + - src/libraries/System.Private.CoreLib/* + exclude: + - '**.md' + - .devcontainer/* + - .github/* + - docs/* + - LICENSE.TXT + - PATENTS.TXT + - THIRD-PARTY-NOTICES.TXT + +resources: + repositories: + - repository: performance + type: git + name: internal/dotnet-performance + +variables: + - template: /eng/pipelines/common/variables.yml + +schedules: +- cron: "30 2 * * *" + displayName: Every night at 2:30AM + branches: + include: + - main + always: true + +extends: + template: /eng/pipelines/common/templates/pipeline-with-resources.yml + parameters: + stages: + - stage: Build + jobs: + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/pipelines/runtime-slow-perf-jobs.yml@performance + parameters: + ${{ if or(in(variables['Build.Reason'], 'Schedule'), parameters.runScheduledJobs) }}: + runScheduledJobs: true + ${{ if or(notin(variables['Build.Reason'], 'Schedule', 'Manual'), parameters.runPrivateJobs) }}: + runPrivateJobs: true + runtimeRepoAlias: self + performanceRepoAlias: performance + jobParameters: + ${{ if parameters.onlySanityCheck }}: + onlySanityCheck: true \ No newline at end of file diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml new file mode 100644 index 00000000000000..e717fbe4915927 --- /dev/null +++ b/eng/pipelines/performance/perf.yml @@ -0,0 +1,76 @@ +parameters: + - name: onlySanityCheck + type: boolean + default: false + +trigger: + batch: true + branches: + include: + - main + - release/9.0 + - release/8.0 + paths: + include: + - '*' + - src/libraries/System.Private.CoreLib/* + exclude: + - '**.md' + - .devcontainer/* + - .github/* + - docs/* + - LICENSE.TXT + - PATENTS.TXT + - THIRD-PARTY-NOTICES.TXT + +resources: + repositories: + - repository: performance + type: git + name: internal/dotnet-performance + +variables: +- template: /eng/pipelines/common/variables.yml + +# +# For the 'schedule' case, only wasm/jsc perf jobs are run. +# And the rest are build jobs - wasm, mono, coreclr, and libraries. +# +# Since, we are not running *any* perf jobs, none of these builds are needed, +# thus the whole scheduled run can be disabled. +# +schedules: +- cron: "0 0 * * 1" + displayName: Weekly Monday 12am UTC Build + branches: + include: + - main + always: true + +extends: + template: /eng/pipelines/common/templates/pipeline-with-resources.yml + parameters: + stages: + - stage: Build + jobs: + + - template: /eng/pipelines/runtime-wasm-perf-jobs.yml@performance + parameters: + #${{ and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}: + # runProfile: 'non-v8' + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + runProfile: 'v8' + runtimeRepoAlias: self + performanceRepoAlias: performance + jobParameters: + ${{ if parameters.onlySanityCheck }}: + onlySanityCheck: true + + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}: + - template: /eng/pipelines/runtime-perf-jobs.yml@performance + parameters: + runtimeRepoAlias: self + performanceRepoAlias: performance + jobParameters: + ${{ if parameters.onlySanityCheck }}: + onlySanityCheck: true diff --git a/eng/pipelines/performance/runtime-wasm-perf.yml b/eng/pipelines/performance/runtime-wasm-perf.yml new file mode 100644 index 00000000000000..bb99c421344af8 --- /dev/null +++ b/eng/pipelines/performance/runtime-wasm-perf.yml @@ -0,0 +1,43 @@ +# This is a wrapper yml for `perf-wasm-jobs`, which has all the perf related +# wasm jobs. This file is essentially so we can point the pipeline in azdo +# UI to this, and thus avoid any scheduled triggers + +trigger: none + +pr: + branches: + include: + - main + paths: + include: + - eng/pipelines/performance/* + - eng/testing/performance/* + - eng/testing/BrowserVersions.props + +resources: + repositories: + - repository: performance + type: github + name: dotnet/performance + endpoint: public + +variables: + - template: /eng/pipelines/common/variables.yml + +extends: + template: /eng/pipelines/common/templates/pipeline-with-resources.yml + parameters: + stages: + - stage: Build + jobs: + - template: /eng/pipelines/runtime-wasm-perf-jobs.yml@performance + parameters: + runtimeRepoAlias: self + performanceRepoAlias: performance + runProfile: 'v8' + jobParameters: + onlySanityCheck: true + #downloadSpecificBuild: + #buildId: '1878694' + #pipeline: 'perf-wasm' + #branchName: 'refs/pull/72119/head' diff --git a/eng/pipelines/coreclr/templates/build-perf-bdn-app.yml b/eng/pipelines/performance/templates/build-perf-bdn-app.yml similarity index 100% rename from eng/pipelines/coreclr/templates/build-perf-bdn-app.yml rename to eng/pipelines/performance/templates/build-perf-bdn-app.yml diff --git a/eng/pipelines/coreclr/templates/build-perf-maui-apps-net6.yml b/eng/pipelines/performance/templates/build-perf-maui-apps-net6.yml similarity index 100% rename from eng/pipelines/coreclr/templates/build-perf-maui-apps-net6.yml rename to eng/pipelines/performance/templates/build-perf-maui-apps-net6.yml diff --git a/eng/pipelines/coreclr/templates/build-perf-maui-apps-net7.yml b/eng/pipelines/performance/templates/build-perf-maui-apps-net7.yml similarity index 100% rename from eng/pipelines/coreclr/templates/build-perf-maui-apps-net7.yml rename to eng/pipelines/performance/templates/build-perf-maui-apps-net7.yml diff --git a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml b/eng/pipelines/performance/templates/build-perf-sample-apps.yml similarity index 100% rename from eng/pipelines/coreclr/templates/build-perf-sample-apps.yml rename to eng/pipelines/performance/templates/build-perf-sample-apps.yml diff --git a/eng/pipelines/performance/templates/perf-arm64-build-jobs.yml b/eng/pipelines/performance/templates/perf-arm64-build-jobs.yml new file mode 100644 index 00000000000000..f15b89c09ace81 --- /dev/null +++ b/eng/pipelines/performance/templates/perf-arm64-build-jobs.yml @@ -0,0 +1,77 @@ +parameters: + mono: false + coreclr: false + monoAot: false + +jobs: + - ${{ if eq(parameters.mono, true) }}: + # build mono + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + runtimeFlavor: mono + platforms: + - linux_arm64 + jobParameters: + nameSuffix: mono + buildArgs: -s mono+clr.iltools+clr.hosts+libs+host+packs -c $(_BuildConfig) + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/bin + includeRootFolder: false + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_mono + displayName: Build Assets + + - ${{ if eq(parameters.coreclr, true) }}: + # build coreclr and libraries + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - linux_arm64 + - windows_arm64 + jobParameters: + nameSuffix: coreclr + buildArgs: -s clr+libs+host+packs -c $(_BuildConfig) + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/bin + includeRootFolder: false + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_coreclr + displayName: Build Assets + + - ${{ if eq(parameters.monoAot, true) }}: + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + runtimeFlavor: mono + runtimeVariant: 'llvmaot' + platforms: + - linux_arm64 + jobParameters: + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoAOTEnableLLVM=true /p:MonoEnableLLVM=true /p:BuildMonoAOTCrossCompiler=true /p:AotHostArchitecture=arm64 /p:AotHostOS=linux + nameSuffix: AOT + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: '$(Build.SourcesDirectory)/artifacts/' + includeRootFolder: true + displayName: AOT Mono Artifacts + artifactName: LinuxMonoAOTarm64 + archiveExtension: '.tar.gz' + archiveType: tar + tarCompression: gz \ No newline at end of file diff --git a/eng/pipelines/performance/templates/perf-build-jobs.yml b/eng/pipelines/performance/templates/perf-build-jobs.yml new file mode 100644 index 00000000000000..a69f35ce11a3e6 --- /dev/null +++ b/eng/pipelines/performance/templates/perf-build-jobs.yml @@ -0,0 +1,143 @@ +parameters: + perfBranch: 'main' # Currently only used for building the BDN App + +jobs: + # build coreclr and libraries + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - linux_x64 + - windows_x64 + - windows_x86 + - linux_musl_x64 + jobParameters: + nameSuffix: coreclr + buildArgs: -s clr+libs+host+packs -c $(_BuildConfig) + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/bin + includeRootFolder: false + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_coreclr + displayName: Build Assets + + # build mono for AOT + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + runtimeFlavor: mono + platforms: + - linux_x64 + jobParameters: + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoAOTEnableLLVM=true /p:MonoEnableLLVM=true /p:BuildMonoAOTCrossCompiler=true /p:AotHostArchitecture=x64 /p:AotHostOS=linux + nameSuffix: AOT + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: '$(Build.SourcesDirectory)/artifacts/' + includeRootFolder: true + displayName: AOT Mono Artifacts + artifactName: LinuxMonoAOTx64 + archiveExtension: '.tar.gz' + archiveType: tar + tarCompression: gz + + # build mono Android scenarios + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + runtimeFlavor: mono + platforms: + - android_arm64 + jobParameters: + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + nameSuffix: AndroidMono + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/performance/templates/build-perf-sample-apps.yml + parameters: + rootFolder: '$(Build.SourcesDirectory)/artifacts/' + includeRootFolder: true + displayName: Android Mono Artifacts + artifactName: AndroidMonoarm64 + archiveExtension: '.tar.gz' + archiveType: tar + tarCompression: gz + + # build mono + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + runtimeFlavor: mono + platforms: + - linux_x64 + jobParameters: + nameSuffix: mono + buildArgs: -s mono+clr.iltools+clr.hosts+libs+host+packs -c $(_BuildConfig) + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/bin + includeRootFolder: false + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)_mono + displayName: Build Assets + + # build mono runtime packs + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + runtimeFlavor: mono + platforms: + - android_arm64 + jobParameters: + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + nameSuffix: Mono_Packs + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml + parameters: + name: MonoRuntimePacks + isOfficialBuild: false + + # build PerfBDN app + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + runtimeFlavor: mono + platforms: + - ios_arm64 + jobParameters: + dependsOn: + - Build_android_arm64_release_Mono_Packs + buildArgs: -s mono -c $(_BuildConfig) + nameSuffix: PerfBDNApp + isOfficialBuild: false + pool: + vmImage: 'macos-13' + postBuildSteps: + - template: /eng/pipelines/performance/templates/build-perf-bdn-app.yml + parameters: + rootFolder: '$(Build.SourcesDirectory)/artifacts/' + includeRootFolder: true + displayName: Android BDN App Artifacts + artifactName: PerfBDNAppArm + archiveExtension: '.tar.gz' + archiveType: tar + tarCompression: gz + perfBranch: ${{ parameters.perfBranch }} diff --git a/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml b/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml new file mode 100644 index 00000000000000..d281ef6044ce77 --- /dev/null +++ b/eng/pipelines/performance/templates/perf-ios-scenarios-build-jobs.yml @@ -0,0 +1,51 @@ +parameters: + hybridGlobalization: true + +jobs: + # build mono iOS scenarios HybridGlobalization + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + runtimeFlavor: mono + platforms: + - ios_arm64 + jobParameters: + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + nameSuffix: iOSMono + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/performance/templates/build-perf-sample-apps.yml + parameters: + rootFolder: '$(Build.SourcesDirectory)/artifacts/' + includeRootFolder: true + displayName: iOS Mono Artifacts + artifactName: iOSMonoarm64 + archiveExtension: '.tar.gz' + archiveType: tar + tarCompression: gz + hybridGlobalization: ${{ parameters.hybridGlobalization }} + + # build NativeAOT iOS scenarios HybridGlobalization + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - ios_arm64 + jobParameters: + buildArgs: --cross -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig) + nameSuffix: iOSNativeAOT + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/performance/templates/build-perf-sample-apps.yml + parameters: + rootFolder: '$(Build.SourcesDirectory)/artifacts/' + includeRootFolder: true + displayName: iOS NativeAOT Artifacts + artifactName: iOSNativeAOTarm64 + archiveExtension: '.tar.gz' + archiveType: tar + tarCompression: gz + hybridGlobalization: ${{ parameters.hybridGlobalization }} diff --git a/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml b/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml new file mode 100644 index 00000000000000..a31a3727b423a4 --- /dev/null +++ b/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml @@ -0,0 +1,16 @@ +jobs: +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - browser_wasm + jobParameters: + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + nameSuffix: wasm + isOfficialBuild: false + postBuildSteps: + - template: /eng/pipelines/performance/templates/perf-wasm-prepare-artifacts-steps.yml + parameters: + configForBuild: Release \ No newline at end of file diff --git a/eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml b/eng/pipelines/performance/templates/perf-wasm-prepare-artifacts-steps.yml similarity index 100% rename from eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml rename to eng/pipelines/performance/templates/perf-wasm-prepare-artifacts-steps.yml diff --git a/eng/pipelines/runtime-linker-tests.yml b/eng/pipelines/runtime-linker-tests.yml index 2b001b769f50f9..712890ffe1cfb0 100644 --- a/eng/pipelines/runtime-linker-tests.yml +++ b/eng/pipelines/runtime-linker-tests.yml @@ -18,10 +18,7 @@ trigger: - LICENSE.TXT - PATENTS.TXT - THIRD-PARTY-NOTICES.TXT - - eng/pipelines/coreclr/perf*yml - - eng/pipelines/coreclr/templates/build-perf* - - eng/pipelines/coreclr/templates/perf-job.yml - - eng/pipelines/coreclr/templates/run-perf* + - eng/pipelines/performance/* - eng/testing/performance/* schedules: diff --git a/eng/pipelines/runtime-wasm-perf.yml b/eng/pipelines/runtime-wasm-perf.yml index b07b619773398c..168ab93576ba56 100644 --- a/eng/pipelines/runtime-wasm-perf.yml +++ b/eng/pipelines/runtime-wasm-perf.yml @@ -1,13 +1,9 @@ +# This file will be deleted in a follow-up PR once we have changed the pipeline in Azure Pipelines to point to /eng/pipelines/performance/runtime-wasm-perf.yml + # This is a wrapper yml for `perf-wasm-jobs`, which has all the perf related # wasm jobs. This file is essentially so we can point the pipeline in azdo # UI to this, and thus avoid any scheduled triggers -parameters: -- name: perfBranch - displayName: Performance Repo Branch - type: string - default: 'main' - trigger: none pr: @@ -16,14 +12,17 @@ pr: - main paths: include: - - eng/pipelines/runtime-wasm-perf.yml - - eng/pipelines/coreclr/perf*.yml - - eng/pipelines/coreclr/templates/perf-job.yml - - eng/pipelines/coreclr/templates/run-perf* - - eng/pipelines/coreclr/templates/run-scenarios-job.yml + - eng/pipelines/performance/* - eng/testing/performance/* - eng/testing/BrowserVersions.props +resources: + repositories: + - repository: performance + type: github + name: dotnet/performance + endpoint: public + variables: - template: /eng/pipelines/common/variables.yml @@ -33,12 +32,13 @@ extends: stages: - stage: Build jobs: - - template: /eng/pipelines/coreclr/perf-wasm-jobs.yml + - template: /eng/pipelines/runtime-wasm-perf-jobs.yml@performance parameters: + runtimeRepoAlias: self + performanceRepoAlias: performance runProfile: 'v8' - collectHelixLogsScript: ${{ variables._wasmCollectHelixLogsScript }} - onlySanityCheck: true - perfBranch: ${{ parameters.perfBranch }} + jobParameters: + onlySanityCheck: true #downloadSpecificBuild: #buildId: '1878694' #pipeline: 'perf-wasm' diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 40b8d9fbba4aec..f39bb89d3294fb 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -19,10 +19,7 @@ trigger: - LICENSE.TXT - PATENTS.TXT - THIRD-PARTY-NOTICES.TXT - - eng/pipelines/coreclr/perf*yml - - eng/pipelines/coreclr/templates/build-perf* - - eng/pipelines/coreclr/templates/perf-job.yml - - eng/pipelines/coreclr/templates/run-perf* + - eng/pipelines/performance/* - eng/testing/performance/* schedules: From 2c7753540b961ef15ec36fc25715bd4469e91aa8 Mon Sep 17 00:00:00 2001 From: Art Leonard Date: Mon, 3 Feb 2025 20:38:10 -0800 Subject: [PATCH 28/30] Add Windows Server 2025 to test configurations (#111938) * (WIP) Add Windows Server 2025 test runs * Fixup names to match helix * Remove missing image * fix NegotiateStream_StreamToStream_Authentication_EmptyCredentials test * Update eng/pipelines/libraries/helix-queues-setup.yml Simplify selecting server. Co-authored-by: Eric StJohn * Add back docker image. * Remove excess matrix on InnerLoop --------- Co-authored-by: wfurt Co-authored-by: Eric StJohn --- eng/pipelines/libraries/helix-queues-setup.yml | 8 +++++--- .../TestUtilities/System/PlatformDetection.Windows.cs | 1 + .../FunctionalTests/NegotiateStreamStreamToStreamTest.cs | 8 +++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index bf01c06ae4d66a..46f897e80b259e 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -119,14 +119,17 @@ jobs: # libraries on mono outerloop - ${{ if and(eq(parameters.jobParameters.testScope, 'outerloop'), eq(parameters.jobParameters.runtimeFlavor, 'mono')) }}: - Windows.Amd64.Server2022.Open + - Windows.Server2025.Amd64.Open # libraries on coreclr (outerloop and innerloop), or libraries on mono innerloop - ${{ if or(ne(parameters.jobParameters.testScope, 'outerloop'), ne(parameters.jobParameters.runtimeFlavor, 'mono')) }}: - ${{ if or(eq(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - Windows.Amd64.Server2022.Open + - Windows.Server2025.Amd64.Open - ${{ if ne(parameters.jobParameters.testScope, 'outerloop') }}: - (Windows.10.Amd64.ServerRS5.Open)windows.10.amd64.serverrs5.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2019-helix-amd64 - ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - Windows.Amd64.Server2022.Open + - Windows.Server2025.Amd64.Open - Windows.11.Amd64.Client.Open - ${{ if eq(parameters.jobParameters.testScope, 'outerloop') }}: - (Windows.10.Amd64.ServerRS5.Open)windows.10.amd64.serverrs5.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2019-helix-amd64 @@ -147,11 +150,9 @@ jobs: - Windows.11.Amd64.Client.Open # libraries on coreclr (outerloop and innerloop), or libraries on mono innerloop - ${{ if or(ne(parameters.jobParameters.testScope, 'outerloop'), ne(parameters.jobParameters.runtimeFlavor, 'mono')) }}: + - Windows.Server2025.Amd64.Open - ${{ if or(eq(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - Windows.11.Amd64.Client.Open - - Windows.Amd64.Server2022.Open - - ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - Windows.Amd64.Server2022.Open # .NETFramework - ${{ if eq(parameters.jobParameters.framework, 'net48') }}: @@ -176,5 +177,6 @@ jobs: # Browser WebAssembly windows - ${{ if in(parameters.platform, 'browser_wasm_win', 'wasi_wasm_win') }}: - (Windows.Amd64.Server2022.Open)windows.amd64.server2022.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2022-helix-webassembly + - (Windows.Server2025.Amd64.Open)windows.server2025.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2025-helix-webassembly-amd64 ${{ insert }}: ${{ parameters.jobParameters }} diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs index 6a166b298cd517..1cd57d147a77ed 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs @@ -26,6 +26,7 @@ public static partial class PlatformDetection public static bool IsWindows10OrLater => IsWindowsVersionOrLater(10, 0); public static bool IsWindowsServer2019 => IsWindows && IsNotWindowsNanoServer && GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildVersion() == 17763; public static bool IsWindowsServer2022 => IsWindows && IsNotWindowsNanoServer && GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildVersion() == 20348; + public static bool IsWindowsServer2025 => IsWindows && IsNotWindowsNanoServer && GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildVersion() == 26100; public static bool IsWindowsNanoServer => IsWindows && (IsNotWindowsIoTCore && GetWindowsInstallationType().Equals("Nano Server", StringComparison.OrdinalIgnoreCase)); public static bool IsWindowsServerCore => IsWindows && GetWindowsInstallationType().Equals("Server Core", StringComparison.OrdinalIgnoreCase); public static int WindowsVersion => IsWindows ? (int)GetWindowsVersion() : -1; diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/NegotiateStreamStreamToStreamTest.cs b/src/libraries/System.Net.Security/tests/FunctionalTests/NegotiateStreamStreamToStreamTest.cs index 7b8cc18c40f3b7..662f7d1fa48e93 100644 --- a/src/libraries/System.Net.Security/tests/FunctionalTests/NegotiateStreamStreamToStreamTest.cs +++ b/src/libraries/System.Net.Security/tests/FunctionalTests/NegotiateStreamStreamToStreamTest.cs @@ -9,8 +9,9 @@ using System.Text; using System.Threading; using System.Threading.Tasks; - +using Microsoft.DotNet.XUnitExtensions; using Xunit; +using Xunit.Abstractions; namespace System.Net.Security.Tests { @@ -192,6 +193,11 @@ public async Task NegotiateStream_StreamToStream_Authentication_EmptyCredentials { string targetName = "testTargetName"; + if (PlatformDetection.IsWindowsServer2025) + { + throw new SkipTestException("Empty credentials not supported on Server 2025"); + } + // Ensure there is no confusion between DefaultCredentials / DefaultNetworkCredentials and a // NetworkCredential object with empty user, password and domain. NetworkCredential emptyNetworkCredential = new NetworkCredential("", "", ""); From dea928c98e6355c8dc6cd6e94ef5686000edca8d Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 4 Feb 2025 00:07:23 -0800 Subject: [PATCH 29/30] Change how we build the cross-OS DAC to support building in the VMR (#111927) * Don't build the linuxdac by default. Cross-os DAC build failures are quite rare nowadays and we have CI protection against build failures. Remove the linux dac from the default build subsets to speed up the default build experience. * Rewrite cross-os DAC packaging in terms of runtime packs instead of using a separate artifact * Build the cross-os DACs when crossdacpack is built. * Forward the ESRP tool path down from DotNetBuild.props and set up the cross-dac invocation from the join jobs. * Pass down the buildpass to the inner build and decide what to build in Subsets.props * Allow passing a script root (needed for VMR reusage of this template) * Adjust DAC signing script to fix failures in internal testing * Force the value of SignRequestFiles to always be an array * Build the cross-os DACs via their subset names --- eng/DotNetBuild.props | 2 + eng/Subsets.props | 9 ++- eng/extract-for-crossdac.ps1 | 25 +++++++ eng/native/sign-with-dac-certificate.ps1 | 12 ++- .../coreclr/templates/crossdac-hostarch.yml | 9 --- .../templates/install-diagnostic-certs.yml | 18 ++--- .../templates/remove-diagnostic-certs.yml | 6 +- eng/pipelines/runtime-official.yml | 57 ++++---------- ...rosoft.CrossOsDiag.Private.CoreCLR.pkgproj | 7 +- ...Microsoft.CrossOsDiag.Private.CoreCLR.proj | 74 ++++++++++++++++--- 10 files changed, 132 insertions(+), 87 deletions(-) create mode 100644 eng/extract-for-crossdac.ps1 delete mode 100644 eng/pipelines/coreclr/templates/crossdac-hostarch.yml diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props index 72842bbc36f7b7..75cfd1acb039f5 100644 --- a/eng/DotNetBuild.props +++ b/eng/DotNetBuild.props @@ -72,6 +72,7 @@ $(InnerBuildArgs) /p:MonoAOTEnableLLVM=$(DotNetBuildMonoAOTEnableLLVM) $(InnerBuildArgs) /p:MonoBundleLLVMOptimizer=$(DotNetBuildMonoBundleLLVMOptimizer) $(InnerBuildArgs) /p:DotNetBuildAllRuntimePacks=$(DotNetBuildAllRuntimePacks) + $(InnerBuildArgs) /p:DotNetBuildPass=$(DotNetBuildPass) $(InnerBuildArgs) $(FlagParameterPrefix)pgoinstrument @@ -83,6 +84,7 @@ $(InnerBuildArgs) /p:RestoreConfigFile=$(RestoreConfigFile) $(InnerBuildArgs) /p:ForceDryRunSigning=$(ForceDryRunSigning) $(InnerBuildArgs) /p:DefaultArtifactVisibility=$(DefaultArtifactVisibility) + $(InnerBuildArgs) /p:DotNetEsrpToolPath=$(DotNetEsrpToolPath) $(InnerBuildArgs) /p:SourceBuiltAssetsDir=$(SourceBuiltAssetsDir) diff --git a/eng/Subsets.props b/eng/Subsets.props index 50f75b082ea808..efb52377533bf2 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -67,6 +67,9 @@ clr+libs+tools+host+packs mono+packs + + + crossdacpack @@ -95,8 +98,8 @@ - clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools+host.native - clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools + clr.native+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools+host.native + clr.native+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools clr.iltools+clr.packages @@ -194,7 +197,7 @@ - + diff --git a/eng/extract-for-crossdac.ps1 b/eng/extract-for-crossdac.ps1 new file mode 100644 index 00000000000000..24ce91d1043fd3 --- /dev/null +++ b/eng/extract-for-crossdac.ps1 @@ -0,0 +1,25 @@ +[CmdletBinding()] +param ( + [Parameter(Mandatory)] + [string] + $DownloadDirectory, + [Parameter(Mandatory)] + [string] + $ExtractDirectory +) + +Add-Type -Assembly 'System.IO.Compression.FileSystem' + +Write-Host "Looking for packages under $DownloadDirectory" + +foreach ($file in Get-ChildItem $DownloadDirectory -Recurse -Filter '*.nupkg') { + Write-Host "Found Package: $($file.FullName)" + if ($file.Name -match '^(?Microsoft.NETCore.App.Runtime.linux(-musl)?-((arm(64)?)|x64)).(?.+).nupkg$') { + $id = $matches['id'] + $ver = $matches['ver'] + Write-Host "Extracting Package: $id $ver to $ExtractDirectory/$($id.ToLowerInvariant())/$ver" + [System.IO.Compression.ZipFile]::ExtractToDirectory($file.FullName, "$ExtractDirectory/$($id.ToLowerInvariant())/$ver") + } else { + throw "Unexpected file name: $($file.Name)" + } +} diff --git a/eng/native/sign-with-dac-certificate.ps1 b/eng/native/sign-with-dac-certificate.ps1 index 97d5c5d6763aad..11c14acb6e51da 100644 --- a/eng/native/sign-with-dac-certificate.ps1 +++ b/eng/native/sign-with-dac-certificate.ps1 @@ -6,19 +6,25 @@ param( [Parameter(ValueFromRemainingArguments=$true)][string[]]$filesToSign ) -$inputFile = Get-Content -Raw $PSScriptRoot/signing/input.template.json | ConvertFrom-Json -$inputFile.SignBatches.SignRequestFiles = $filesToSign | ForEach-Object { +[array]$signEntries = $filesToSign | ForEach-Object { @{ SourceLocation = $_ } } +$inputFile = Get-Content -Raw $PSScriptRoot/signing/input.template.json | ConvertFrom-Json +$inputFile.SignBatches[0].SignRequestFiles = $signEntries + $inputJson = [System.IO.Path]::GetTempFileName() # Our JSON goes up to 6 levels deep, so we need to set the depth to 6 # to successfully round-trip our JSON through ConvertTo-Json $inputFile | ConvertTo-Json -Depth 6 | Out-File -FilePath $inputJson -Encoding utf8 -$outputJson = Resolve-Path "$PSScriptRoot/../../artifacts/log/Release/signing-$(New-Guid).json.log" +$outputJson = "$PSScriptRoot/../../artifacts/log/Release/signing-$(New-Guid).json.log" + +New-Item $outputJson -ItemType File + +$outputJson = Resolve-Path $outputJson Write-Host "Signing files with DAC certificate" Write-Host "Logging output to $outputJson" diff --git a/eng/pipelines/coreclr/templates/crossdac-hostarch.yml b/eng/pipelines/coreclr/templates/crossdac-hostarch.yml deleted file mode 100644 index e100217a48151a..00000000000000 --- a/eng/pipelines/coreclr/templates/crossdac-hostarch.yml +++ /dev/null @@ -1,9 +0,0 @@ -parameters: - archType: '' - -variables: - - name: crossDacHostArch - value: x64 - - ${{ if eq(parameters.archType, 'arm') }}: - - name: crossDacHostArch - value: x86 \ No newline at end of file diff --git a/eng/pipelines/coreclr/templates/install-diagnostic-certs.yml b/eng/pipelines/coreclr/templates/install-diagnostic-certs.yml index 92584746b424d0..5eed6b2b5fb76f 100644 --- a/eng/pipelines/coreclr/templates/install-diagnostic-certs.yml +++ b/eng/pipelines/coreclr/templates/install-diagnostic-certs.yml @@ -1,16 +1,9 @@ parameters: - isOfficialBuild: - type: boolean - displayName: 'Is Official Build' - certNames: - type: array - displayName: 'Certificate Name' - vaultName: - type: string - displayName: 'Key Vault Name' - azureSubscription: - type: string - displayName: 'Azure Subscription' + isOfficialBuild: false + certNames: [] + vaultName: '' + azureSubscription: '' + scriptRoot: '$(Build.SourcesDirectory)' steps: - ${{ if and(eq(parameters.isOfficialBuild, true), ne(variables['Build.Reason'], 'PullRequest'), or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/reltest/')), not(endsWith(variables['Build.SourceBranch'], '-staging'))) }}: @@ -29,6 +22,7 @@ steps: $signArgs = '/p:DotNetEsrpToolPath=$(esrpclient.toolpath)\$(esrpclient.toolname)' echo "##vso[task.setvariable variable=_SignDiagnosticFilesArgs;]$signArgs" displayName: 'Install diagnostic certificates' + workingDirectory: ${{ parameters.scriptRoot }} env: ${{ each cert in parameters.certNames }}: ${{ cert }}: $(${{ cert }}) diff --git a/eng/pipelines/coreclr/templates/remove-diagnostic-certs.yml b/eng/pipelines/coreclr/templates/remove-diagnostic-certs.yml index e2ee7c8d224d7f..c510ea8f177cf7 100644 --- a/eng/pipelines/coreclr/templates/remove-diagnostic-certs.yml +++ b/eng/pipelines/coreclr/templates/remove-diagnostic-certs.yml @@ -1,11 +1,11 @@ parameters: - isOfficialBuild: - type: boolean - displayName: 'Is Official Build' + isOfficialBuild: false + scriptRoot: '$(Build.SourcesDirectory)' steps: - ${{ if and(eq(parameters.isOfficialBuild, true), ne(variables['Build.Reason'], 'PullRequest'), or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/reltest/')), not(endsWith(variables['Build.SourceBranch'], '-staging'))) }}: - powershell: | eng/pipelines/remove-diagnostic-certs.ps1 "$(DacCertificateThumbprints)" + workingDirectory: ${{ parameters.scriptRoot }} displayName: 'Remove Diagnostic Certificates' condition: always() diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index d167fa18712556..03c4308e13aebf 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -151,7 +151,6 @@ extends: # # Build all runtime packs for Linux and Linux musl - # Upload CoreCLR runtime for CrossDac packaging # - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -171,26 +170,10 @@ extends: isOfficialBuild: ${{ variables.isOfficialBuild }} timeoutInMinutes: 120 postBuildSteps: - # Upload libcoreclr.so for CrossDac packaging - - task: CopyFiles@2 - displayName: Gather runtime for CrossDac - inputs: - SourceFolder: $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(_BuildConfig) - Contents: libcoreclr.so - TargetFolder: $(Build.SourcesDirectory)/artifacts/CoreCLRCrossDacArtifacts/$(osGroup)$(osSubgroup).$(archType).$(_BuildConfig)/$(crossDacHostArch) - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish runtime for CrossDac - inputs: - PathtoPublish: $(Build.SourcesDirectory)/artifacts/CoreCLRCrossDacArtifacts - PublishLocation: Container - ArtifactName: CoreCLRCrossDacArtifacts - # Upload the results. - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml parameters: name: $(osGroup)$(osSubgroup)_$(archType) - extraVariablesTemplates: - - template: /eng/pipelines/coreclr/templates/crossdac-hostarch.yml # # Build and Pack CrossDac @@ -203,17 +186,21 @@ extends: - windows_x64 jobParameters: templatePath: 'templates-official' - buildArgs: -s crossdacpack -c $(_BuildConfig) /p:CrossDacArtifactsDir=$(crossDacArtifactsPath) + buildArgs: -s crossdacpack -c $(_BuildConfig) /p:CrossRuntimeExtractionRoot=$(CrossRuntimeExtractionRoot) $(_SignDiagnosticFilesArgs) nameSuffix: CrossDac isOfficialBuild: ${{ variables.isOfficialBuild }} timeoutInMinutes: 120 preBuildSteps: - - task: DownloadBuildArtifacts@0 - displayName: Download Runtimes for CrossDac packaging + - task: DownloadPipelineArtifact@2 + displayName: Download runtime packs for CrossDac inputs: - artifactName: $(crossDacArtifactsContainer) - downloadPath: $(crossDacArtifactsBasePath) - checkDownloadedFiles: true + artifact: 'IntermediateArtifacts' + path: $(Build.SourcesDirectory)/artifacts/RuntimeDownload + patterns: | + IntermediateArtifacts/linux_*/Shipping/Microsoft.NETCore.App.Runtime.linux-*.nupkg + !IntermediateArtifacts/linux_*/Shipping/Microsoft.NETCore.App.Runtime.linux-*.symbols.nupkg + - powershell: $(Build.SourcesDirectory)/eng/extract-for-crossdac.ps1 -DownloadDirectory $(Build.SourcesDirectory)/artifacts/RuntimeDownload -ExtractDirectory $(CrossRuntimeExtractionRoot) + displayName: Extract runtime packs - template: /eng/pipelines/coreclr/templates/install-diagnostic-certs.yml parameters: isOfficialBuild: ${{ variables.isOfficialBuild }} @@ -222,22 +209,10 @@ extends: - 'dotnet-diagnostics-esrp-pki-onecert' vaultName: 'clrdiag-esrp-id' azureSubscription: 'diagnostics-esrp-kvcertuser' - - template: /eng/pipelines/common/templates/global-build-step.yml - parameters: - buildArgs: -s linuxdac+alpinedac -c $(_BuildConfig) $(_SignDiagnosticFilesArgs) - archParameter: -arch x64,x86,arm,arm64 + postBuildSteps: - template: /eng/pipelines/coreclr/templates/remove-diagnostic-certs.yml parameters: isOfficialBuild: ${{ variables.isOfficialBuild }} - - task: CopyFiles@2 - displayName: Gather CrossDacs - inputs: - SourceFolder: $(Build.SourcesDirectory)/artifacts/bin/coreclr - Contents: | - ** - !**\sharedFramework\** - TargetFolder: $(crossDacArtifactsPath) - postBuildSteps: # Save packages using the prepare-signed-artifacts format. # CrossDac packages are expected to be in the windows_x64 folder. - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml @@ -251,12 +226,10 @@ extends: - build_linux_musl_arm_release_AllRuntimes - build_linux_musl_arm64_release_AllRuntimes variables: - - name: crossDacArtifactsContainer - value: CoreCLRCrossDacArtifacts - - name: crossDacArtifactsBasePath - value: $(Build.StagingDirectory)/CrossDac - - name: crossDacArtifactsPath - value: $(crossDacArtifactsBasePath)/$(crossDacArtifactsContainer) + - name: CrossRuntimeExtractionRoot + value: $(Build.SourcesDirectory)/artifacts/CrossDac + - name: _SignDiagnosticFilesArgs + value: '' # # Build All runtime packs for mobile platforms diff --git a/src/coreclr/.nuget/Microsoft.CrossOsDiag.Private.CoreCLR/Microsoft.CrossOsDiag.Private.CoreCLR.pkgproj b/src/coreclr/.nuget/Microsoft.CrossOsDiag.Private.CoreCLR/Microsoft.CrossOsDiag.Private.CoreCLR.pkgproj index 85c1562e2a3514..b7b0a6b3a02acb 100644 --- a/src/coreclr/.nuget/Microsoft.CrossOsDiag.Private.CoreCLR/Microsoft.CrossOsDiag.Private.CoreCLR.pkgproj +++ b/src/coreclr/.nuget/Microsoft.CrossOsDiag.Private.CoreCLR/Microsoft.CrossOsDiag.Private.CoreCLR.pkgproj @@ -4,18 +4,19 @@ false false Private transport package for .NET Core cross OS diagnostic tooling. + $(ArtifactsBinDir)/coreclr/$(CrossDacOutputDir) - - + + runtimes/$(PackageTargetRuntime)/native - + diff --git a/src/coreclr/.nuget/Microsoft.CrossOsDiag.Private.CoreCLR/Microsoft.CrossOsDiag.Private.CoreCLR.proj b/src/coreclr/.nuget/Microsoft.CrossOsDiag.Private.CoreCLR/Microsoft.CrossOsDiag.Private.CoreCLR.proj index 993908a8e6ea4f..4fbe217f42068c 100644 --- a/src/coreclr/.nuget/Microsoft.CrossOsDiag.Private.CoreCLR/Microsoft.CrossOsDiag.Private.CoreCLR.proj +++ b/src/coreclr/.nuget/Microsoft.CrossOsDiag.Private.CoreCLR/Microsoft.CrossOsDiag.Private.CoreCLR.proj @@ -4,21 +4,71 @@ linux-x64;linux-musl-x64;linux-arm64;linux-musl-arm64;linux-arm;linux-musl-arm - - + + + $(NuGetPackageRoot) + + + + + + + + + + + + + + + + + + + + <_CrossOSDacProject Include="@(SupportedRid->'$(RepoRoot)Build.proj')" + AdditionalProperties="TargetOS=%(TargetOS); + TargetArchitecture=%(TargetArchitecture); + Subset=linuxdac+alpinedac" /> + <_RuntimePrereqsProject Include="$(CoreClrProjectRoot)runtime-prereqs.proj" /> + + + + + + + + + - + + + + + + - <_projectsToBuild Include="@(Project)" Condition="$(SupportedRids.Contains('%(Project.PackageTargetRuntime)'))"> - %(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/linux.x64.$(Configuration)/x64 - %(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/linux_musl.x64.$(Configuration)/x64 - %(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/linux.arm64.$(Configuration)/x64 - %(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/linux_musl.arm64.$(Configuration)/x64 - %(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/linux.arm.$(Configuration)/x86 - %(AdditionalProperties);CrossDacBinRoot=$(CrossDacArtifactsDir)/linux_musl.arm.$(Configuration)/x86 - + <_projectsToBuild CoreCLRRuntimePath="$(CrossRuntimeExtractionRoot)/microsoft.netcore.app.runtime.%(Rid)/$(Version)/runtimes/%(Rid)/native" /> + + <_projectsToBuild AdditionalProperties="%(_projectsToBuild.AdditionalProperties);CrossDacOutputDir=%(CrossDacOutputDir);CoreCLRRuntimePath=%(CoreCLRRuntimePath)" /> From cf89ec4171a58d783850fec0d77a673b9e784551 Mon Sep 17 00:00:00 2001 From: varelen <141656781+varelen@users.noreply.github.com> Date: Tue, 4 Feb 2025 10:11:38 +0100 Subject: [PATCH 30/30] JIT: Optimize bit-wise AND with a constant mask in combination with a left shift in a compare (#111979) This optmizes the generated code when having a pattern like '(SomeConstant & (1 << value)) != 0' which was previously only optimized for '(variable & (1 << value)) != 0'. Fix #111554 --- src/coreclr/jit/lower.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/coreclr/jit/lower.cpp b/src/coreclr/jit/lower.cpp index ad6df947eafd35..eee9a5859ecb43 100644 --- a/src/coreclr/jit/lower.cpp +++ b/src/coreclr/jit/lower.cpp @@ -4352,24 +4352,32 @@ GenTree* Lowering::OptimizeConstCompare(GenTree* cmp) if (cmp->OperIs(GT_TEST_EQ, GT_TEST_NE)) { // - // Transform TEST_EQ|NE(x, LSH(1, y)) into BT(x, y) when possible. Using BT + // Transform TEST_EQ|NE(x, LSH(1, y)) or TEST_EQ|NE(LSH(1, y), x) into BT(x, y) when possible. Using BT // results in smaller and faster code. It also doesn't have special register // requirements, unlike LSH that requires the shift count to be in ECX. // Note that BT has the same behavior as LSH when the bit index exceeds the // operand bit size - it uses (bit_index MOD bit_size). // - GenTree* lsh = cmp->gtGetOp2(); + GenTree* lsh = cmp->AsOp()->gtOp1; + GenTree* op = cmp->AsOp()->gtOp2; - if (lsh->OperIs(GT_LSH) && varTypeIsIntOrI(lsh->TypeGet()) && lsh->gtGetOp1()->IsIntegralConst(1)) + if (!lsh->OperIs(GT_LSH)) + { + std::swap(lsh, op); + } + + if (lsh->OperIs(GT_LSH) && varTypeIsIntOrI(lsh) && lsh->gtGetOp1()->IsIntegralConst(1)) { cmp->SetOper(cmp->OperIs(GT_TEST_EQ) ? GT_BITTEST_EQ : GT_BITTEST_NE); - cmp->AsOp()->gtOp2 = lsh->gtGetOp2(); - cmp->gtGetOp2()->ClearContained(); BlockRange().Remove(lsh->gtGetOp1()); BlockRange().Remove(lsh); + cmp->AsOp()->gtOp1 = op; + cmp->AsOp()->gtOp2 = lsh->gtGetOp2(); + cmp->gtGetOp2()->ClearContained(); + return cmp->gtNext; } }