diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index d706d96a00e0..05c59ac350c7 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "1.0.0-prerelease.20530.4", + "version": "1.0.0-prerelease.20555.2", "commands": [ "xharness" ] diff --git a/.gitattributes b/.gitattributes index 7ead819fab55..04518684225a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -69,12 +69,9 @@ # CLR specific src/coreclr/src/pal/tests/palsuite/paltestlist.txt text eol=lf src/coreclr/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt text eol=lf -src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/regexdna/regexdna-input25.txt text eol=lf -src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/regexdna/regexdna-input25000.txt text eol=lf -src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/regex-redux/regexdna-input25.txt text eol=lf -src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/regex-redux/regexdna-input25000.txt text eol=lf -src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/reverse-complement/revcomp-input25.txt text eol=lf -src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/reverse-complement/revcomp-input25000.txt text eol=lf -src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/knucleotide-input.txt text eol=lf -src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/knucleotide-input-big.txt text eol=lf -src/coreclr/tests/src/performance/Scenario/JitBench/Resources/word2vecnet.patch text eol=lf +src/tests/JIT/Performance/CodeQuality/BenchmarksGame/regex-redux/regexdna-input25.txt text eol=lf +src/tests/JIT/Performance/CodeQuality/BenchmarksGame/regex-redux/regexdna-input25000.txt text eol=lf +src/tests/JIT/Performance/CodeQuality/BenchmarksGame/reverse-complement/revcomp-input25.txt text eol=lf +src/tests/JIT/Performance/CodeQuality/BenchmarksGame/reverse-complement/revcomp-input25000.txt text eol=lf +src/tests/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/knucleotide-input.txt text eol=lf +src/tests/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/knucleotide-input-big.txt text eol=lf diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 769b0081686d..515707b1e073 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -59,4 +59,4 @@ /src/mono/msvc @lateralusX @kg @akoeplinger /src/mono/msvc/scripts @akoeplinger @kg -/src/mono/netcore @marek-safar @akoeplinger @egorbo @vargaz @steveisok \ No newline at end of file +/src/mono/netcore @marek-safar @akoeplinger @egorbo @vargaz @steveisok diff --git a/docs/coding-guidelines/interop-guidelines.md b/docs/coding-guidelines/interop-guidelines.md index 7dff0711a8d3..5ce81404073f 100644 --- a/docs/coding-guidelines/interop-guidelines.md +++ b/docs/coding-guidelines/interop-guidelines.md @@ -120,7 +120,7 @@ internal static partial class Interop // contents of Common\src\Interop\Windows\ ``` ### Build System -When building dotnet/runtime, we use the "TargetOS" property to control what target platform we are building for. The valid values for this property are Windows_NT (which is the default value from MSBuild when running on Windows), Linux and OSX. +When building dotnet/runtime, we use the "TargetOS" property to control what target platform we are building for. The valid values for this property are windows (which is the default value from MSBuild when running on Windows), Linux and OSX. #### Project Files Whenever possible, a single .csproj should be used per assembly, spanning all target platforms, e.g. System.Console.csproj includes conditional entries for when targeting Windows vs when targeting Linux. A property can be passed to dotnet build to control which flavor is built, e.g. `dotnet build /p:TargetOS=OSX System.Console.csproj`. diff --git a/docs/coding-guidelines/project-guidelines.md b/docs/coding-guidelines/project-guidelines.md index afc05f4037b2..69ba1fd53014 100644 --- a/docs/coding-guidelines/project-guidelines.md +++ b/docs/coding-guidelines/project-guidelines.md @@ -16,7 +16,7 @@ Below is a list of all the various options we pivot the project builds on: - **Target Frameworks:** .NETFramework, .NETStandard, .NETCoreApp - **Platform Runtimes:** .NETFramework (aka CLR/Desktop), CoreCLR, Mono -- **OS:** Windows_NT, Linux, OSX, FreeBSD, AnyOS +- **OS:** windows, Linux, OSX, FreeBSD, AnyOS - **Flavor:** Debug, Release ## Individual build properties @@ -52,7 +52,7 @@ Pure netstandard configuration: All supported targets with unique windows/unix build for netcoreapp: ``` - $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;net461-Windows_NT + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;net461-windows ``` @@ -73,7 +73,7 @@ When building an individual project the `BuildTargetFramework` and `TargetOS` wi ## Supported full build settings - .NET Core latest on current OS (default) -> `$(NetCoreAppCurrent)-[RunningOS]` -- .NET Framework latest -> `net48-Windows_NT` +- .NET Framework latest -> `net48-windows` # Library project guidelines @@ -100,7 +100,7 @@ Example: Example: ``` - netstandard2.0-Windows_NT;netstandard2.0-Unix + netstandard2.0-windows;netstandard2.0-Unix $(Platform) $(Configuration) skiptests $(BuildArguments) -nopgooptimize - $(BuildArguments) msbuildonunsupportedplatform + $(BuildArguments) msbuildonunsupportedplatform + $(BuildArguments) -clang6.0 $(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE $(BuildArguments) skipnuget cross -skiprestore cmakeargs -DFEATURE_GDBJIT=TRUE diff --git a/docs/workflow/debugging/coreclr/debugging.md b/docs/workflow/debugging/coreclr/debugging.md index 580032545d29..d8db911b2dc4 100644 --- a/docs/workflow/debugging/coreclr/debugging.md +++ b/docs/workflow/debugging/coreclr/debugging.md @@ -9,17 +9,17 @@ Debugging CoreCLR on Windows ============================ 1. Perform a build of the repo. -2. Open solution \\artifacts\obj\coreclr\Windows_NT.\.\\CoreCLR.sln in Visual Studio. \ and \ are based +2. Open solution \\artifacts\obj\coreclr\windows.\.\\CoreCLR.sln in Visual Studio. \ and \ are based on type of build you did. By default they are 'x64' and 'Debug'. 3. Right-click the INSTALL project and choose ‘Set as StartUp Project’ 4. Bring up the properties page for the INSTALL project 5. Select Configuration Properties->Debugging from the left side tree control -6. Set Command=`$(SolutionDir)\..\..\..\bin\coreclr\Windows_NT.$(Platform).$(Configuration)\corerun.exe` +6. Set Command=`$(SolutionDir)\..\..\..\bin\coreclr\windows.$(Platform).$(Configuration)\corerun.exe` 1. This points to the folder where the built runtime binaries are present. 7. Set Command Arguments=`` (e.g. HelloWorld.dll) -8. Set Working Directory=`$(SolutionDir)\..\..\..\bin\coreclr\Windows_NT.$(Platform).$(Configuration)` +8. Set Working Directory=`$(SolutionDir)\..\..\..\bin\coreclr\windows.$(Platform).$(Configuration)` 1. This points to the folder containing CoreCLR binaries. -9. Set Environment=`CORE_LIBRARIES=$(SolutionDir)\..\..\..\bin\runtime\-Windows_NT-$(Configuration)-$(Platform)`, +9. Set Environment=`CORE_LIBRARIES=$(SolutionDir)\..\..\..\bin\runtime\-windows-$(Configuration)-$(Platform)`, where '\' is the target framework of current branch, for example `netcoreapp3.1` `net5.0`. 1. This points to the folder containing core libraries except `System.Private.CoreLib`. 2. This step can be skipped if you are debugging CLR tests that references only `System.Private.CoreLib`. diff --git a/docs/workflow/debugging/libraries/debugging-packages.md b/docs/workflow/debugging/libraries/debugging-packages.md index f72887149b7f..7a57a2219cea 100644 --- a/docs/workflow/debugging/libraries/debugging-packages.md +++ b/docs/workflow/debugging/libraries/debugging-packages.md @@ -101,5 +101,5 @@ dotnet build System.Net.ServicePoint.Tests.csproj -f netcoreapp2.0 /t:test /p:Ou Will run the test using the following pivot values: * Architecture: AnyCPU * Flavor: Debug -* OS: Windows_NT +* OS: windows * Target: netstandard2.0 diff --git a/docs/workflow/debugging/libraries/windows-instructions.md b/docs/workflow/debugging/libraries/windows-instructions.md index 46d916e74da8..5a1bedd45d91 100644 --- a/docs/workflow/debugging/libraries/windows-instructions.md +++ b/docs/workflow/debugging/libraries/windows-instructions.md @@ -33,15 +33,15 @@ To run a single test from command line: * Locate the test binary folder based on the CSPROJ name. -For example: `src\System.Net.Sockets\tests\Functional\System.Net.Sockets.Tests.csproj` will build and output binaries at `bin\tests\Windows_NT.AnyCPU.Debug\System.Net.Sockets.Tests\netcoreapp1.0`. +For example: `src\System.Net.Sockets\tests\Functional\System.Net.Sockets.Tests.csproj` will build and output binaries at `bin\tests\windows.AnyCPU.Debug\System.Net.Sockets.Tests\netcoreapp1.0`. * Execute the test Assuming that your repo is at `C:\corefx`: ``` -cd C:\corefx\bin\tests\Windows_NT.AnyCPU.Debug\System.Net.Sockets.Tests\netcoreapp1.0 -C:\corefx\bin\tests\Windows_NT.AnyCPU.Debug\System.Net.Sockets.Tests\netcoreapp1.0\CoreRun.exe xunit.console.dll System.Net.Sockets.Tests.dll -xml testResults.xml -notrait category=nonwindowstests -notrait category=OuterLoop -notrait category=failing +cd C:\corefx\bin\tests\windows.AnyCPU.Debug\System.Net.Sockets.Tests\netcoreapp1.0 +C:\corefx\bin\tests\windows.AnyCPU.Debug\System.Net.Sockets.Tests\netcoreapp1.0\CoreRun.exe xunit.console.dll System.Net.Sockets.Tests.dll -xml testResults.xml -notrait category=nonwindowstests -notrait category=OuterLoop -notrait category=failing ``` * If the test crashes or encounters a `Debugger.Launch()` method call, WinDBG will automatically start and attach to the `CoreRun.exe` process diff --git a/docs/workflow/editing-and-debugging.md b/docs/workflow/editing-and-debugging.md index 5143ca82b240..8297b10d2873 100644 --- a/docs/workflow/editing-and-debugging.md +++ b/docs/workflow/editing-and-debugging.md @@ -20,7 +20,7 @@ what are in the repository. In particular * `src\coreclr\src\System.Private.CoreLib\System.Private.CorLib.sln` - This solution is for all managed (C#) code that is defined in the runtime itself. This is all class library support of one form or another. - * `artifacts\obj\coreclr\Windows_NT..\CoreCLR.sln` - this solution contains most native (C++) projects + * `artifacts\obj\coreclr\windows..\CoreCLR.sln` - this solution contains most native (C++) projects associated with the repository, including * `coreclr` - This is the main runtime DLL (the GC, class loader, interop are all here) * `corjit` - This is the Just In Time (JIT) compiler that compiles .NET Intermediate language to native code. diff --git a/docs/workflow/testing/coreclr/running-aspnet-benchmarks-with-crossgen2.md b/docs/workflow/testing/coreclr/running-aspnet-benchmarks-with-crossgen2.md index b68e3cebc080..5e8dd20ac8af 100644 --- a/docs/workflow/testing/coreclr/running-aspnet-benchmarks-with-crossgen2.md +++ b/docs/workflow/testing/coreclr/running-aspnet-benchmarks-with-crossgen2.md @@ -185,7 +185,7 @@ using the following command. On Windows: ```powershell -CoreRun.exe \runtime\artifacts\bin\coreclr\Windows_NT.x64.Release\crossgen2\crossgen2.dll +CoreRun.exe \runtime\artifacts\bin\coreclr\windows.x64.Release\crossgen2\crossgen2.dll --Os --composite -o \path\to\results\composite\TotalComposite.dll \path\to\results\application\*.dll ``` diff --git a/docs/workflow/testing/coreclr/windows-test-instructions.md b/docs/workflow/testing/coreclr/windows-test-instructions.md index c581c3529e96..540c0794fa89 100644 --- a/docs/workflow/testing/coreclr/windows-test-instructions.md +++ b/docs/workflow/testing/coreclr/windows-test-instructions.md @@ -61,13 +61,13 @@ In order to run all of the tests using your checked build: > src\tests\run.cmd checked ``` -This will generate a report named `TestRun__.html` (e.g. `TestRun_Windows_NT_x64_Checked.html`) in the subdirectory `\artifacts\log`. Any tests that failed will be listed in `TestRunResults_Windows_NT_x64_Checked.err`. +This will generate a report named `TestRun__.html` (e.g. `TestRun_windows_x64_Checked.html`) in the subdirectory `\artifacts\log`. Any tests that failed will be listed in `TestRunResults_windows_x64_Checked.err`. ### Investigating Test Failures Upon completing a test run, you may find one or more tests have failed. -The output of the test will be available in `Test` reports directory, but by default the directory will be something like `\artifacts\tests\coreclr\Windows_NT.x64.Checked\Reports\Exceptions\Finalization`. +The output of the test will be available in `Test` reports directory, but by default the directory will be something like `\artifacts\tests\coreclr\windows.x64.Checked\Reports\Exceptions\Finalization`. There are 2 files of interest: @@ -79,16 +79,16 @@ There are 2 files of interest: If you wish to re-run a failed test, follow the following steps: 1) Set an environment variable, `CORE_ROOT`, pointing to the path to product binaries that was passed to run.cmd. -For example using a checked build the location would be: `\artifacts\tests\coreclr\Windows_NT.x64.Checked\Tests\Core_Root` +For example using a checked build the location would be: `\artifacts\tests\coreclr\windows.x64.Checked\Tests\Core_Root` -2) Run the failed test, the command to which is also present in the test report for a failed test. It will be something like `\artifacts\tests\coreclr\Windows_NT.x64.Checked\Exceptions\Finalization\Finalizer.cmd`. +2) Run the failed test, the command to which is also present in the test report for a failed test. It will be something like `\artifacts\tests\coreclr\windows.x64.Checked\Exceptions\Finalization\Finalizer.cmd`. If you wish to run the test under a debugger (e.g. [WinDbg](http://msdn.microsoft.com/library/windows/hardware/ff551063(v=vs.85).aspx)), append `-debug ` to the test command. For example: ``` -> artifacts\tests\coreclr\Windows_NT.x64.Checked\Exceptions\Finalization\Finalizer.cmd -debug +> artifacts\tests\coreclr\windows.x64.Checked\Exceptions\Finalization\Finalizer.cmd -debug ``` ### Modifying a test -If test changes are needed, make the change, and build the test project. This will binplace the binaries in the test binaries folder (e.g. `\artifacts\tests\coreclr\Windows_NT.x64.Checked\Exceptions\Finalization`). Then re-run the test following the instructions above. +If test changes are needed, make the change, and build the test project. This will binplace the binaries in the test binaries folder (e.g. `\artifacts\tests\coreclr\windows.x64.Checked\Exceptions\Finalization`). Then re-run the test following the instructions above. diff --git a/docs/workflow/testing/libraries/filtering-tests.md b/docs/workflow/testing/libraries/filtering-tests.md index 2b1b3d9867b4..7f9b9ec8c7cd 100644 --- a/docs/workflow/testing/libraries/filtering-tests.md +++ b/docs/workflow/testing/libraries/filtering-tests.md @@ -148,7 +148,7 @@ _**A few common examples with the above attributes:**_ - Run all tests acceptable on Windows that are not failing: ```cmd -dotnet build /t:Test /p:TargetOS=Windows_NT +dotnet build /t:Test /p:TargetOS=windows ``` - Run all outer loop tests acceptable on OS X that are currently associated with active issues: ```sh diff --git a/docs/workflow/testing/using-corerun.md b/docs/workflow/testing/using-corerun.md index 01a2aedffa1b..33e4d1fdb3a3 100644 --- a/docs/workflow/testing/using-corerun.md +++ b/docs/workflow/testing/using-corerun.md @@ -31,7 +31,7 @@ Consider that you already have a .NET application DLL called HelloWorld.dll and If you execute the following ```bat - set PATH=%PATH%;%CoreCLR%\artifacts\tests\coreclr\Windows_NT.x64.Debug\Tests\Core_Root\ + set PATH=%PATH%;%CoreCLR%\artifacts\tests\coreclr\windows.x64.Debug\Tests\Core_Root\ set CORE_LIBRARIES=%ProgramFiles%\dotnet\shared\Microsoft.NETCore.App\1.0.0 @@ -73,11 +73,11 @@ variable CORE_ROOT to this directory (running src\tests\build from the repository base) and running 'src\tests\run') you can do the following ```bat - set PATH=%PATH%;%CoreCLR%\artifacts\Product\Windows_NT.x64.Debug - set CORE_ROOT=%CoreCLR%\artifacts\tests\coreclr\Windows_NT.x64.Debug\Tests\Core_Root + set PATH=%PATH%;%CoreCLR%\artifacts\Product\windows.x64.Debug + set CORE_ROOT=%CoreCLR%\artifacts\tests\coreclr\windows.x64.Debug\Tests\Core_Root ``` sets you up so that corerun can run any of the test. For example ```bat - corerun artifacts\tests\coreclr\Windows_NT.X64.Debug\GC\Features\Finalizer\finalizeio\finalizeio\finalizeio.exe + corerun artifacts\tests\coreclr\windows.X64.Debug\GC\Features\Finalizer\finalizeio\finalizeio\finalizeio.exe ``` runs the finalizerio test. diff --git a/docs/workflow/using-dotnet-cli.md b/docs/workflow/using-dotnet-cli.md index 8090f0eddc2c..ce410d738291 100644 --- a/docs/workflow/using-dotnet-cli.md +++ b/docs/workflow/using-dotnet-cli.md @@ -179,7 +179,7 @@ which should make things work (but is fragile, confirm file timestamps that you Get this by simply listing the name of the `runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR` you built. ```bat - dir artifacts\bin\coreclr\Product\Windows_NT.x64.Release\.nuget\pkg + dir artifacts\bin\coreclr\Product\windows.x64.Release\.nuget\pkg ``` and you will get name of the which looks something like this diff --git a/eng/BeforeTargetFrameworkInference.targets b/eng/BeforeTargetFrameworkInference.targets index abef4c8981a2..93609381fb4b 100644 --- a/eng/BeforeTargetFrameworkInference.targets +++ b/eng/BeforeTargetFrameworkInference.targets @@ -3,17 +3,18 @@ <_OriginalTargetFramework>$(TargetFramework) $(TargetFramework.SubString($([MSBuild]::Add($(TargetFramework.IndexOf('-')), 1)))) - $(TargetFramework.SubString(0, $(TargetFramework.IndexOf('-')))) + + $([System.Text.RegularExpressions.Regex]::Replace('$(TargetFramework)', '$(TargetFrameworkPattern)', '${1}')) - $([MSBuild]::NormalizeDirectory('$(BaseIntermediateOutputPath)', '$(TargetFramework)-$(TargetFrameworkSuffix)-$(Configuration)')) - $([MSBuild]::NormalizeDirectory('$(BaseIntermediateOutputPath)', '$(TargetFramework)-$(Configuration)')) + $([MSBuild]::NormalizeDirectory('$(BaseIntermediateOutputPath)', '$(TargetFramework)-$(Configuration)')) + $([MSBuild]::NormalizeDirectory('$(BaseIntermediateOutputPath)', '$(TargetFramework)-$(TargetFrameworkSuffix)-$(Configuration)')) - $([MSBuild]::NormalizeDirectory('$(BaseOutputPath)', '$(TargetFramework)-$(TargetFrameworkSuffix)-$(Configuration)')) - $([MSBuild]::NormalizeDirectory('$(BaseOutputPath)', '$(TargetFramework)-$(Configuration)')) + $([MSBuild]::NormalizeDirectory('$(BaseOutputPath)', '$(TargetFramework)-$(Configuration)')) + $([MSBuild]::NormalizeDirectory('$(BaseOutputPath)', '$(TargetFramework)-$(TargetFrameworkSuffix)-$(Configuration)')) diff --git a/eng/Configurations.props b/eng/Configurations.props index 352e32f6cab0..d26beec0e3e6 100644 --- a/eng/Configurations.props +++ b/eng/Configurations.props @@ -58,7 +58,7 @@ illumos Solaris Linux - Windows_NT + windows $(TargetOS) $(TargetOS) $(TargetOS) diff --git a/eng/Subsets.props b/eng/Subsets.props index e2c4d1602f5b..43843ea21393 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -149,7 +149,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a769f55ebd2b..9d0f96269f1e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -4,67 +4,67 @@ https://github.com/dotnet/standard cfe95a23647c7de1fe1a349343115bd7720d6949 - + https://github.com/dotnet/icu - ba48e6f5e60aa200a567f9dadef1046f7bf374ec + a39deb47c8f20ed5adb57cddbc83ac587413c4e4 - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be - + https://github.com/dotnet/arcade - 19e7e769f7ca2ece42221f7ff951e7ec705498ec + 72b28b7e023d4c3fffa0a0b9748a7d4e8cc799be https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -126,37 +126,37 @@ https://github.com/dotnet/runtime-assets edc9df4021be1dff54b8d8be88b4bee7626cb6a5 - + https://github.com/dotnet/llvm-project - 69cf173ab66c68e4282c1da56628b36d4ae2acc2 + d6c16bf3ec8315049ad0412a7d41e8858b5d0d13 - + https://github.com/dotnet/llvm-project - 69cf173ab66c68e4282c1da56628b36d4ae2acc2 + d6c16bf3ec8315049ad0412a7d41e8858b5d0d13 - + https://github.com/dotnet/llvm-project - 69cf173ab66c68e4282c1da56628b36d4ae2acc2 + d6c16bf3ec8315049ad0412a7d41e8858b5d0d13 - + https://github.com/dotnet/llvm-project - 69cf173ab66c68e4282c1da56628b36d4ae2acc2 + d6c16bf3ec8315049ad0412a7d41e8858b5d0d13 - + https://github.com/dotnet/llvm-project - 69cf173ab66c68e4282c1da56628b36d4ae2acc2 + d6c16bf3ec8315049ad0412a7d41e8858b5d0d13 - + https://github.com/dotnet/llvm-project - 69cf173ab66c68e4282c1da56628b36d4ae2acc2 + d6c16bf3ec8315049ad0412a7d41e8858b5d0d13 - + https://github.com/dotnet/llvm-project - 69cf173ab66c68e4282c1da56628b36d4ae2acc2 + d6c16bf3ec8315049ad0412a7d41e8858b5d0d13 - + https://github.com/dotnet/llvm-project - 69cf173ab66c68e4282c1da56628b36d4ae2acc2 + d6c16bf3ec8315049ad0412a7d41e8858b5d0d13 https://github.com/dotnet/runtime @@ -186,17 +186,17 @@ https://github.com/dotnet/runtime 38017c3935de95d0335bac04f4901ddfc2718656 - + https://github.com/mono/linker - 57974c1f5790e6fb33f5fce161707be5cd86c4d3 + ebc61551b11132ecf868ce69435dec413ccfa5e7 - + https://github.com/dotnet/xharness - bdad61dfc3d09ae826ba940d92e43a7441ec83b0 + ab2eee629494e7a17592feda257b4ede4ff2fc82 - + https://github.com/dotnet/xharness - bdad61dfc3d09ae826ba940d92e43a7441ec83b0 + ab2eee629494e7a17592feda257b4ede4ff2fc82 diff --git a/eng/Versions.props b/eng/Versions.props index 23dcbf43496e..86b457b15692 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -53,16 +53,16 @@ 6.0.0-preview1.20513.4 3.8.0-4.20503.2 - 6.0.0-beta.20529.1 - 6.0.0-beta.20529.1 - 6.0.0-beta.20529.1 - 6.0.0-beta.20529.1 - 6.0.0-beta.20529.1 - 6.0.0-beta.20529.1 - 2.5.1-beta.20529.1 - 6.0.0-beta.20529.1 - 6.0.0-beta.20529.1 - 6.0.0-beta.20529.1 + 6.0.0-beta.20552.5 + 6.0.0-beta.20552.5 + 6.0.0-beta.20552.5 + 6.0.0-beta.20552.5 + 6.0.0-beta.20552.5 + 6.0.0-beta.20552.5 + 2.5.1-beta.20552.5 + 6.0.0-beta.20552.5 + 6.0.0-beta.20552.5 + 6.0.0-beta.20552.5 5.0.0-rc.1.20451.14 6.0.0-alpha.1.20501.4 @@ -141,8 +141,8 @@ 4.9.4 16.8.0-release-20201022-02 - 1.0.0-prerelease.20530.4 - 1.0.0-prerelease.20530.4 + 1.0.0-prerelease.20555.2 + 1.0.0-prerelease.20555.2 2.4.1 2.4.2 1.3.0 @@ -153,18 +153,18 @@ 5.0.0-preview-20201009.2 - 6.0.0-alpha.1.20527.2 + 6.0.0-alpha.1.20556.1 - 6.0.0-alpha.1.20526.1 + 6.0.0-alpha.1.20552.1 - 9.0.1-alpha.1.20530.2 - 9.0.1-alpha.1.20530.2 - 9.0.1-alpha.1.20530.2 - 9.0.1-alpha.1.20530.2 - 9.0.1-alpha.1.20530.2 - 9.0.1-alpha.1.20530.2 - 9.0.1-alpha.1.20530.2 - 9.0.1-alpha.1.20530.2 + 9.0.1-alpha.1.20552.1 + 9.0.1-alpha.1.20552.1 + 9.0.1-alpha.1.20552.1 + 9.0.1-alpha.1.20552.1 + 9.0.1-alpha.1.20552.1 + 9.0.1-alpha.1.20552.1 + 9.0.1-alpha.1.20552.1 + 9.0.1-alpha.1.20552.1 diff --git a/eng/build.ps1 b/eng/build.ps1 index df1750a87103..4faea7ff30c3 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -6,7 +6,7 @@ Param( [string][Alias('f')]$framework, [string]$vs, [string][Alias('v')]$verbosity = "minimal", - [ValidateSet("Windows_NT","Linux","OSX","Browser")][string]$os, + [ValidateSet("windows","Linux","OSX","Browser")][string]$os, [switch]$allconfigurations, [switch]$coverage, [string]$testscope, @@ -34,7 +34,7 @@ function Get-Help() { Write-Host " -help (-h) Print help and exit." Write-Host " -librariesConfiguration (-lc) Libraries build configuration: Debug or Release." Write-Host " [Default: Debug]" - Write-Host " -os Target operating system: Windows_NT, Linux, OSX, or Browser." + Write-Host " -os Target operating system: windows, Linux, OSX, or Browser." Write-Host " [Default: Your machine's OS.]" Write-Host " -runtimeConfiguration (-rc) Runtime build configuration: Debug, Release or Checked." Write-Host " Checked is exclusive to the CLR runtime. It is the same as Debug, except code is" @@ -129,7 +129,7 @@ if ($vs) { if ($runtimeConfiguration) { $configToOpen = $runtimeConfiguration } - $vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "artifacts\obj\coreclr" | Join-Path -ChildPath "Windows_NT.$archToOpen.$((Get-Culture).TextInfo.ToTitleCase($configToOpen))" | Join-Path -ChildPath "CoreCLR.sln" + $vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "artifacts\obj\coreclr" | Join-Path -ChildPath "windows.$archToOpen.$((Get-Culture).TextInfo.ToTitleCase($configToOpen))" | Join-Path -ChildPath "CoreCLR.sln" if (-Not (Test-Path $vs)) { $repoRoot = Split-Path $PSScriptRoot -Parent Invoke-Expression "& `"$repoRoot/src/coreclr/build-runtime.cmd`" -configureonly -$archToOpen -$configToOpen" diff --git a/eng/build.sh b/eng/build.sh index 5904565f9143..e3d495687c95 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -28,7 +28,7 @@ usage() echo " --help (-h) Print help and exit." echo " --librariesConfiguration (-lc) Libraries build configuration: Debug or Release." echo " [Default: Debug]" - echo " --os Target operating system: Windows_NT, Linux, FreeBSD, OSX, tvOS, iOS, Android," + echo " --os Target operating system: windows, Linux, FreeBSD, OSX, tvOS, iOS, Android," echo " Browser, NetBSD, illumos or Solaris." echo " [Default: Your machine's OS.]" echo " --projects Project or solution file(s) to build." @@ -254,8 +254,8 @@ while [[ $# > 0 ]]; do fi passedOS="$(echo "$2" | awk '{print tolower($0)}')" case "$passedOS" in - windows_nt) - os="Windows_NT" ;; + windows) + os="windows" ;; linux) os="Linux" ;; freebsd) @@ -276,7 +276,7 @@ while [[ $# > 0 ]]; do os="Solaris" ;; *) echo "Unsupported target OS '$2'." - echo "The allowed values are Windows_NT, Linux, FreeBSD, OSX, tvOS, iOS, Android, Browser, illumos and Solaris." + echo "The allowed values are windows, Linux, FreeBSD, OSX, tvOS, iOS, Android, Browser, illumos and Solaris." exit 1 ;; esac diff --git a/eng/codeOptimization.targets b/eng/codeOptimization.targets index 6ed7e997487b..f0766c2c6e3a 100644 --- a/eng/codeOptimization.targets +++ b/eng/codeOptimization.targets @@ -17,7 +17,7 @@ BeforeTargets="CoreCompile"> $(IbcOptimizationDataDir)Linux\ - $(IbcOptimizationDataDir)Windows\ + $(IbcOptimizationDataDir)Windows\ <_optimizationDataAssembly Include="$(IbcOptimizationDataDir)**\$(TargetFileName)" /> diff --git a/eng/common/performance/crossgen_perf.proj b/eng/common/performance/crossgen_perf.proj index 79a5486546ea..48455e7aa804 100644 --- a/eng/common/performance/crossgen_perf.proj +++ b/eng/common/performance/crossgen_perf.proj @@ -68,9 +68,9 @@ $(WorkItemDirectory) - $(Python) pre.py crossgen --core-root $(CoreRoot) --single %(Identity) - $(Python) test.py sod --scenario-name "Crossgen %(Identity) Size" --dirs ./crossgen/ - $(Python) post.py + $(Python) $(CrossgenDirectory)pre.py crossgen --core-root $(CoreRoot) --single %(Identity) + $(Python) $(CrossgenDirectory)test.py sod --scenario-name "Crossgen %(Identity) Size" --dirs ./crossgen.out/ + $(Python) $(CrossgenDirectory)post.py @@ -78,8 +78,8 @@ $(WorkItemDirectory) $(Python) $(Crossgen2Directory)pre.py crossgen2 --core-root $(CoreRoot) --single %(Identity) - $(Python) test.py sod --scenario-name "Crossgen2 %(Identity) Size" --dirs ./crossgen/ - $(Python) post.py + $(Python) $(Crossgen2Directory)test.py sod --scenario-name "Crossgen2 %(Identity) Size" --dirs ./crossgen.out/ + $(Python) $(Crossgen2Directory)post.py diff --git a/eng/common/performance/performance-setup.ps1 b/eng/common/performance/performance-setup.ps1 index 656c0bd9022c..0edb2ae276ed 100644 --- a/eng/common/performance/performance-setup.ps1 +++ b/eng/common/performance/performance-setup.ps1 @@ -82,7 +82,9 @@ $SetupArguments = "--repository https://github.com/$Repository --branch $Branch #This grabs the LKG version number of dotnet and passes it to our scripts $VersionJSON = Get-Content global.json | ConvertFrom-Json $DotNetVersion = $VersionJSON.tools.dotnet -$SetupArguments = "--dotnet-versions $DotNetVersion $SetupArguments" +# TODO: Change this back to parsing when we have a good story for dealing with TFM changes or when the LKG in runtime gets updated to include net6.0 +# $SetupArguments = "--dotnet-versions $DotNetVersion $SetupArguments" +$SetupArguments = "--dotnet-versions 6.0.100-alpha.1.20553.6 $SetupArguments" if ($RunFromPerformanceRepo) { diff --git a/eng/common/performance/performance-setup.sh b/eng/common/performance/performance-setup.sh index 9c0f6c909145..315815a96777 100755 --- a/eng/common/performance/performance-setup.sh +++ b/eng/common/performance/performance-setup.sh @@ -223,7 +223,9 @@ if [[ "$use_latest_dotnet" = false ]]; then # Get the tools section from the global.json. # This grabs the LKG version number of dotnet and passes it to our scripts dotnet_version=`cat global.json | python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["tools"]["dotnet"])'` - setup_arguments="--dotnet-versions $dotnet_version $setup_arguments" + # TODO: Change this back to parsing when we have a good story for dealing with TFM changes or when the LKG in runtime gets updated to include net6.0 + # setup_arguments="--dotnet-versions $dotnet_version $setup_arguments" + setup_arguments="--dotnet-versions 6.0.100-alpha.1.20553.6 $setup_arguments" fi if [[ "$run_from_perf_repo" = true ]]; then diff --git a/eng/docker/libraries-sdk-aspnetcore.windows.Dockerfile b/eng/docker/libraries-sdk-aspnetcore.windows.Dockerfile index 584c1e838e66..dd306fc4ff12 100644 --- a/eng/docker/libraries-sdk-aspnetcore.windows.Dockerfile +++ b/eng/docker/libraries-sdk-aspnetcore.windows.Dockerfile @@ -5,7 +5,7 @@ FROM $SDK_BASE_IMAGE as target ARG TESTHOST_LOCATION=".\\artifacts\\bin\\testhost" ARG TFM=net6.0 -ARG OS=Windows_NT +ARG OS=windows ARG ARCH=x64 ARG CONFIGURATION=Release diff --git a/eng/docker/libraries-sdk.windows.Dockerfile b/eng/docker/libraries-sdk.windows.Dockerfile index adbf17302fef..564378f44672 100644 --- a/eng/docker/libraries-sdk.windows.Dockerfile +++ b/eng/docker/libraries-sdk.windows.Dockerfile @@ -5,7 +5,7 @@ FROM $SDK_BASE_IMAGE as target ARG TESTHOST_LOCATION=".\\artifacts\\bin\\testhost" ARG TFM=net6.0 -ARG OS=Windows_NT +ARG OS=windows ARG ARCH=x64 ARG CONFIGURATION=Release diff --git a/eng/illink.targets b/eng/illink.targets index e5814573953d..b27457517846 100644 --- a/eng/illink.targets +++ b/eng/illink.targets @@ -89,7 +89,7 @@ Include="$(ILLinkSuppressionsConfigurationSpecificXmlFile)" /> - @@ -231,6 +231,8 @@ $(ILLinkArgs) --skip-unresolved true $(ILLinkArgs) --disable-opt unusedinterfaces + + $(ILLinkArgs) --disable-opt unusedtypechecks diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index 5135de072544..097941761a36 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -27,7 +27,7 @@ '$(AllArtifactsDownloadPath)' != ''"> $(RuntimeIdentifier) - $(ArtifactPlatform.Replace('win-', 'Windows_NT-')) + $(ArtifactPlatform.Replace('win-', 'windows-')) $(ArtifactPlatform.Replace('unix-', 'Unix-')) $(ArtifactPlatform.Replace('linux-', 'Linux-')) $(ArtifactPlatform.Replace('osx-', 'OSX-')) @@ -197,6 +197,17 @@ $(LibrariesNativeArtifactsPath)dotnet.timezones.blat; $(LibrariesNativeArtifactsPath)*.dat;" IsNative="true" /> + + diff --git a/eng/native/configureplatform.cmake b/eng/native/configureplatform.cmake index 0d4ee0dae6de..f8b1a10c0e8f 100644 --- a/eng/native/configureplatform.cmake +++ b/eng/native/configureplatform.cmake @@ -178,7 +178,7 @@ if(CLR_CMAKE_HOST_OS STREQUAL SunOS) endif(CLR_CMAKE_HOST_OS STREQUAL SunOS) if(CLR_CMAKE_HOST_OS STREQUAL Windows) - set(CLR_CMAKE_HOST_OS Windows_NT) + set(CLR_CMAKE_HOST_OS windows) set(CLR_CMAKE_HOST_WIN32 1) endif(CLR_CMAKE_HOST_OS STREQUAL Windows) @@ -369,7 +369,7 @@ if (CLR_CMAKE_TARGET_OS STREQUAL CLR_CMAKE_HOST_OS) endif() endif() else() - if(NOT (CLR_CMAKE_HOST_OS STREQUAL Windows_NT)) + if(NOT (CLR_CMAKE_HOST_OS STREQUAL windows)) message(FATAL_ERROR "Invalid host and target os/arch combination. Host OS: ${CLR_CMAKE_HOST_OS}") endif() if(NOT (CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_ALPINE_LINUX)) diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index e8f4a6f24186..10c17e692641 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -187,7 +187,7 @@ function(compile_asm) foreach(ASM_FILE ${COMPILE_ASM_ASM_FILES}) get_filename_component(name ${ASM_FILE} NAME_WE) # Produce object file where CMake would store .obj files for an OBJECT library. - # ex: artifacts\obj\coreclr\Windows_NT.arm64.Debug\src\vm\wks\cee_wks.dir\Debug\AsmHelpers.obj + # ex: artifacts\obj\coreclr\windows.arm64.Debug\src\vm\wks\cee_wks.dir\Debug\AsmHelpers.obj set (OBJ_FILE "${CMAKE_CURRENT_BINARY_DIR}/${COMPILE_ASM_TARGET}.dir/${CMAKE_CFG_INTDIR}/${name}.obj") # Need to compile asm file using custom command as include directories are not provided to asm compiler diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 6d6ca9397ab4..d002de384703 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -88,6 +88,7 @@ jobs: du -sh $(Build.SourcesDirectory)/* df -h displayName: Disk Usage after Build + condition: always() # If intended to send extra steps after regular build add them here. - ${{ if ne(parameters.extraStepsTemplate, '') }}: diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index dc77a165d8d6..109caf7cb228 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -452,7 +452,7 @@ jobs: # macOS arm64 -- ${{ if or(containsValue(parameters.platforms, 'OSX_arm64'), eq(parameters.platformGroup, 'all')) }}: +- ${{ if containsValue(parameters.platforms, 'OSX_arm64') }}: - template: xplat-setup.yml parameters: jobTemplate: ${{ parameters.jobTemplate }} @@ -495,16 +495,16 @@ jobs: # Windows x64 -- ${{ if or(containsValue(parameters.platforms, 'Windows_NT_x64'), in(parameters.platformGroup, 'all', 'gcstress')) }}: +- ${{ if or(containsValue(parameters.platforms, 'windows_x64'), in(parameters.platformGroup, 'all', 'gcstress')) }}: - template: xplat-setup.yml parameters: jobTemplate: ${{ parameters.jobTemplate }} helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }} variables: ${{ parameters.variables }} - osGroup: Windows_NT + osGroup: windows archType: x64 targetRid: win-x64 - platform: Windows_NT_x64 + platform: windows_x64 jobParameters: runtimeFlavor: ${{ parameters.runtimeFlavor }} stagedBuild: ${{ parameters.stagedBuild }} @@ -516,16 +516,16 @@ jobs: # Windows x86 -- ${{ if or(containsValue(parameters.platforms, 'Windows_NT_x86'), in(parameters.platformGroup, 'all', 'gcstress')) }}: +- ${{ if or(containsValue(parameters.platforms, 'windows_x86'), in(parameters.platformGroup, 'all', 'gcstress')) }}: - template: xplat-setup.yml parameters: jobTemplate: ${{ parameters.jobTemplate }} helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }} variables: ${{ parameters.variables }} - osGroup: Windows_NT + osGroup: windows archType: x86 targetRid: win-x86 - platform: Windows_NT_x86 + platform: windows_x86 jobParameters: runtimeFlavor: ${{ parameters.runtimeFlavor }} stagedBuild: ${{ parameters.stagedBuild }} @@ -536,16 +536,16 @@ jobs: ${{ insert }}: ${{ parameters.jobParameters }} # Windows arm -- ${{ if or(containsValue(parameters.platforms, 'Windows_NT_arm'), eq(parameters.platformGroup, 'all')) }}: +- ${{ if or(containsValue(parameters.platforms, 'windows_arm'), eq(parameters.platformGroup, 'all')) }}: - template: xplat-setup.yml parameters: jobTemplate: ${{ parameters.jobTemplate }} helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }} variables: ${{ parameters.variables }} - osGroup: Windows_NT + osGroup: windows archType: arm targetRid: win-arm - platform: Windows_NT_arm + platform: windows_arm jobParameters: runtimeFlavor: ${{ parameters.runtimeFlavor }} stagedBuild: ${{ parameters.stagedBuild }} @@ -557,16 +557,16 @@ jobs: # Windows arm64 -- ${{ if or(containsValue(parameters.platforms, 'Windows_NT_arm64'), in(parameters.platformGroup, 'all', 'gcstress')) }}: +- ${{ if or(containsValue(parameters.platforms, 'windows_arm64'), in(parameters.platformGroup, 'all', 'gcstress')) }}: - template: xplat-setup.yml parameters: jobTemplate: ${{ parameters.jobTemplate }} helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }} variables: ${{ parameters.variables }} - osGroup: Windows_NT + osGroup: windows archType: arm64 targetRid: win-arm64 - platform: Windows_NT_arm64 + platform: windows_arm64 jobParameters: runtimeFlavor: ${{ parameters.runtimeFlavor }} stagedBuild: ${{ parameters.stagedBuild }} diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml index a658bba42fa9..f28ce14ce2cc 100644 --- a/eng/pipelines/common/templates/runtimes/build-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -89,7 +89,7 @@ jobs: - ${{ if eq(parameters.osGroup, 'OSX') }}: - script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) ${{ parameters.archType }} azDO displayName: Install native dependencies - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: # Necessary to install correct cmake version - script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force displayName: Install native dependencies diff --git a/eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml b/eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml index 647778511370..1427e68a273e 100644 --- a/eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml +++ b/eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml @@ -7,7 +7,7 @@ parameters: environment: {} steps: -- ${{ if eq(parameters.osGroup, 'Windows_NT') }}: +- ${{ if eq(parameters.osGroup, 'windows') }}: # TODO: Remove and consolidate this when we move to arcade via init-tools.cmd. - powershell: $(Build.SourcesDirectory)\eng\common\build.ps1 -ci ${{ parameters.restoreParams }} displayName: Restore blob feed tasks (Windows) @@ -18,7 +18,7 @@ steps: condition: ${{ and(ne(parameters.condition, false), ne(parameters.sendParams, '')) }} env: ${{ parameters.environment }} -- ${{ if ne(parameters.osGroup, 'Windows_NT') }}: +- ${{ if ne(parameters.osGroup, 'windows') }}: # TODO: Remove and consolidate this when we move to arcade via init-tools.sh. - script: $(Build.SourcesDirectory)/eng/common/build.sh --ci ${{ parameters.restoreParams }} displayName: Restore blob feed tasks (Unix) diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index c449f3f14e64..d8df89ed73ac 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -43,7 +43,7 @@ jobs: - name: _BuildConfig value: $(buildConfigUpper) - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - name: archiveExtension value: '.zip' - name: archiveType @@ -59,7 +59,7 @@ jobs: - name: setScriptToEchoAndFailOnNonZero value: '' - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - name: archiveExtension value: '.tar.gz' - name: archiveType @@ -119,12 +119,12 @@ jobs: vmImage: 'macOS-10.15' # Official Build Windows Pool - ${{ if and(eq(parameters.osGroup, 'Windows_NT'), ne(variables['System.TeamProject'], 'public')) }}: + ${{ if and(eq(parameters.osGroup, 'windows'), ne(variables['System.TeamProject'], 'public')) }}: name: NetCoreInternal-Pool queue: BuildPool.Windows.10.Amd64.VS2019 # Public Windows Build Pool - ${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(variables['System.TeamProject'], 'public')) }}: + ${{ if and(eq(parameters.osGroup, 'windows'), eq(variables['System.TeamProject'], 'public')) }}: name: NetCorePublic-Pool queue: BuildPool.Windows.10.Amd64.VS2019.Open diff --git a/eng/pipelines/coreclr/ci.yml b/eng/pipelines/coreclr/ci.yml index 2c0cba802d91..ea79101e9b43 100644 --- a/eng/pipelines/coreclr/ci.yml +++ b/eng/pipelines/coreclr/ci.yml @@ -46,8 +46,8 @@ jobs: - Linux_x64 - OSX_arm64 - OSX_x64 - - Windows_NT_arm - - Windows_NT_arm64 + - windows_arm + - windows_arm64 jobParameters: testGroup: outerloop @@ -75,7 +75,7 @@ jobs: - Linux_x64 - OSX_arm64 - OSX_x64 - - Windows_NT_x86 + - windows_x86 jobParameters: testGroup: outerloop @@ -131,10 +131,10 @@ jobs: - Linux_musl_arm64 - Linux_x64 - OSX_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm + - windows_arm64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: @@ -166,4 +166,4 @@ jobs: platforms: - Linux_x64 # Issue: https://github.com/dotnet/runtime/issues/40034 - #- Windows_NT_x64 + #- windows_x64 diff --git a/eng/pipelines/coreclr/clrinterpreter.yml b/eng/pipelines/coreclr/clrinterpreter.yml index 9506af301012..05d2418e8449 100644 --- a/eng/pipelines/coreclr/clrinterpreter.yml +++ b/eng/pipelines/coreclr/clrinterpreter.yml @@ -24,9 +24,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: clrinterpreter @@ -49,9 +49,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/crossgen2-composite.yml b/eng/pipelines/coreclr/crossgen2-composite.yml index 49dd16efcf62..7e60b582eade 100644 --- a/eng/pipelines/coreclr/crossgen2-composite.yml +++ b/eng/pipelines/coreclr/crossgen2-composite.yml @@ -23,9 +23,9 @@ jobs: - Linux_x64 - Linux_arm64 - OSX_x64 - - Windows_NT_x86 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x86 + - windows_x64 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: innerloop @@ -50,9 +50,9 @@ jobs: - Linux_x64 - Linux_arm64 - OSX_x64 - - Windows_NT_x86 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x86 + - windows_x64 + - windows_arm64 jobParameters: testGroup: innerloop readyToRun: true diff --git a/eng/pipelines/coreclr/crossgen2-gcstress.yml b/eng/pipelines/coreclr/crossgen2-gcstress.yml index f1b4fd23bf89..b0eccd168ca6 100644 --- a/eng/pipelines/coreclr/crossgen2-gcstress.yml +++ b/eng/pipelines/coreclr/crossgen2-gcstress.yml @@ -22,8 +22,8 @@ jobs: - Linux_x64 - Linux_arm64 - OSX_x64 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x64 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: gcstress-extra @@ -47,8 +47,8 @@ jobs: - Linux_x64 - Linux_arm64 - OSX_x64 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x64 + - windows_arm64 jobParameters: testGroup: gcstress-extra readyToRun: true diff --git a/eng/pipelines/coreclr/crossgen2-outerloop.yml b/eng/pipelines/coreclr/crossgen2-outerloop.yml index e5b55caca997..e7f7d12b4baf 100644 --- a/eng/pipelines/coreclr/crossgen2-outerloop.yml +++ b/eng/pipelines/coreclr/crossgen2-outerloop.yml @@ -22,8 +22,8 @@ jobs: - Linux_x64 - Linux_arm64 - OSX_x64 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x64 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: outerloop @@ -36,8 +36,8 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x86 - - Windows_NT_x64 + - windows_x86 + - windows_x64 jobParameters: testGroup: outerloop @@ -50,9 +50,9 @@ jobs: - Linux_arm64 - Linux_x64 - OSX_x64 - - Windows_NT_x86 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x86 + - windows_x64 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: isOfficialBuild: false @@ -78,8 +78,8 @@ jobs: - Linux_x64 - Linux_arm64 - OSX_x64 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x64 + - windows_arm64 jobParameters: testGroup: outerloop readyToRun: true @@ -114,8 +114,8 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x86 - - Windows_NT_x64 + - windows_x86 + - windows_x64 jobParameters: testGroup: outerloop liveLibrariesBuildConfig: Release @@ -129,13 +129,13 @@ jobs: buildConfig: Release platforms: - Linux_x64 - - Windows_NT_x86 + - windows_x86 helixQueueGroup: pr helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: testGroup: outerloop liveLibrariesBuildConfig: Release - targetos: Windows_NT + targetos: windows targetarch: x86 # test target Linux X64 @@ -145,7 +145,7 @@ jobs: jobTemplate: /eng/pipelines/coreclr/templates/crossgen2-comparison-job.yml buildConfig: Release platforms: - - Windows_NT_x64 + - windows_x64 helixQueueGroup: pr helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: @@ -167,7 +167,7 @@ jobs: jobParameters: testGroup: outerloop liveLibrariesBuildConfig: Release - targetos: Windows_NT + targetos: windows targetarch: x64 # test target Linux arm diff --git a/eng/pipelines/coreclr/crossgen2.yml b/eng/pipelines/coreclr/crossgen2.yml index e2623babf1e3..01c84fa43b41 100644 --- a/eng/pipelines/coreclr/crossgen2.yml +++ b/eng/pipelines/coreclr/crossgen2.yml @@ -22,8 +22,8 @@ jobs: - Linux_x64 - Linux_arm64 - OSX_x64 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x64 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: innerloop @@ -47,8 +47,8 @@ jobs: - Linux_x64 - Linux_arm64 - OSX_x64 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x64 + - windows_arm64 jobParameters: testGroup: innerloop readyToRun: true diff --git a/eng/pipelines/coreclr/gc-longrunning.yml b/eng/pipelines/coreclr/gc-longrunning.yml index c2dc2e07dfd1..a45dcdc868f1 100644 --- a/eng/pipelines/coreclr/gc-longrunning.yml +++ b/eng/pipelines/coreclr/gc-longrunning.yml @@ -23,8 +23,8 @@ jobs: platforms: - Linux_x64 - Linux_arm64 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x64 + - windows_arm64 - OSX_x64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: @@ -47,8 +47,8 @@ jobs: platforms: - Linux_x64 - Linux_arm64 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x64 + - windows_arm64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/gc-simulator.yml b/eng/pipelines/coreclr/gc-simulator.yml index bb8daf817272..c2250084b67f 100644 --- a/eng/pipelines/coreclr/gc-simulator.yml +++ b/eng/pipelines/coreclr/gc-simulator.yml @@ -24,8 +24,8 @@ jobs: # disable Linux x64 for now untill OOMs are resolved. # - Linux_x64 - Linux_arm64 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x64 + - windows_arm64 - OSX_x64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: @@ -49,8 +49,8 @@ jobs: # disable Linux x64 for now untill OOMs are resolved. # - Linux_x64 - Linux_arm64 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x64 + - windows_arm64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/ilasm.yml b/eng/pipelines/coreclr/ilasm.yml index 130f36938e47..ebf13e901195 100644 --- a/eng/pipelines/coreclr/ilasm.yml +++ b/eng/pipelines/coreclr/ilasm.yml @@ -33,9 +33,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: ilasm @@ -60,9 +60,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/jit-experimental.yml b/eng/pipelines/coreclr/jit-experimental.yml index 70790dddb9e2..f4bd8a36dce2 100644 --- a/eng/pipelines/coreclr/jit-experimental.yml +++ b/eng/pipelines/coreclr/jit-experimental.yml @@ -20,7 +20,7 @@ jobs: buildConfig: checked platforms: - Linux_x64 - - Windows_NT_x64 + - windows_x64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: jit-experimental @@ -41,7 +41,7 @@ jobs: buildConfig: checked platforms: - Linux_x64 - - Windows_NT_x64 + - windows_x64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/jitrollingbuild.yml b/eng/pipelines/coreclr/jitrollingbuild.yml index 68be50e4e2a9..9d608216059f 100644 --- a/eng/pipelines/coreclr/jitrollingbuild.yml +++ b/eng/pipelines/coreclr/jitrollingbuild.yml @@ -27,6 +27,6 @@ jobs: # - Linux_arm # - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 diff --git a/eng/pipelines/coreclr/jitstress-isas-arm.yml b/eng/pipelines/coreclr/jitstress-isas-arm.yml index 6a9c1b00425c..f7fda9231f18 100644 --- a/eng/pipelines/coreclr/jitstress-isas-arm.yml +++ b/eng/pipelines/coreclr/jitstress-isas-arm.yml @@ -22,7 +22,7 @@ jobs: buildConfig: checked platforms: - Linux_arm64 - - Windows_NT_arm64 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: jitstress-isas-arm @@ -43,7 +43,7 @@ jobs: buildConfig: checked platforms: - Linux_arm64 - - Windows_NT_arm64 + - windows_arm64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/jitstress-isas-x86.yml b/eng/pipelines/coreclr/jitstress-isas-x86.yml index 98beca7b6fa7..4f9978f75d72 100644 --- a/eng/pipelines/coreclr/jitstress-isas-x86.yml +++ b/eng/pipelines/coreclr/jitstress-isas-x86.yml @@ -23,8 +23,8 @@ jobs: platforms: - Linux_x64 - OSX_x64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_x64 + - windows_x86 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: jitstress-isas-x86 @@ -46,8 +46,8 @@ jobs: platforms: - Linux_x64 - OSX_x64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_x64 + - windows_x86 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/jitstress.yml b/eng/pipelines/coreclr/jitstress.yml index a78aaa620f0f..bad86b7c5b7e 100644 --- a/eng/pipelines/coreclr/jitstress.yml +++ b/eng/pipelines/coreclr/jitstress.yml @@ -32,9 +32,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: jitstress @@ -59,9 +59,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/jitstress2-jitstressregs.yml b/eng/pipelines/coreclr/jitstress2-jitstressregs.yml index 743e071e08e8..3510c09abcd5 100644 --- a/eng/pipelines/coreclr/jitstress2-jitstressregs.yml +++ b/eng/pipelines/coreclr/jitstress2-jitstressregs.yml @@ -26,9 +26,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: jitstress2-jitstressregs @@ -53,9 +53,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/jitstressregs-x86.yml b/eng/pipelines/coreclr/jitstressregs-x86.yml index 9de11695b46a..387e159499d5 100644 --- a/eng/pipelines/coreclr/jitstressregs-x86.yml +++ b/eng/pipelines/coreclr/jitstressregs-x86.yml @@ -22,8 +22,8 @@ jobs: buildConfig: checked platforms: - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_x64 + - windows_x86 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: jitstressregs-x86 @@ -44,8 +44,8 @@ jobs: buildConfig: checked platforms: - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_x64 + - windows_x86 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/jitstressregs.yml b/eng/pipelines/coreclr/jitstressregs.yml index 12c8fc515887..337261e7d5ee 100644 --- a/eng/pipelines/coreclr/jitstressregs.yml +++ b/eng/pipelines/coreclr/jitstressregs.yml @@ -26,9 +26,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: jitstressregs @@ -53,9 +53,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/libraries-gcstress-extra.yml b/eng/pipelines/coreclr/libraries-gcstress-extra.yml index 4063b0a8ffb9..e3869102b2d7 100644 --- a/eng/pipelines/coreclr/libraries-gcstress-extra.yml +++ b/eng/pipelines/coreclr/libraries-gcstress-extra.yml @@ -29,7 +29,7 @@ jobs: # libraries test build platforms testBuildPlatforms: - Linux_x64 - - Windows_NT_x64 + - windows_x64 # # Libraries Test Run using Release libraries, Checked CoreCLR, and stress modes diff --git a/eng/pipelines/coreclr/libraries-gcstress0x3-gcstress0xc.yml b/eng/pipelines/coreclr/libraries-gcstress0x3-gcstress0xc.yml index d5df152153db..5d49cb6f13a8 100644 --- a/eng/pipelines/coreclr/libraries-gcstress0x3-gcstress0xc.yml +++ b/eng/pipelines/coreclr/libraries-gcstress0x3-gcstress0xc.yml @@ -29,7 +29,7 @@ jobs: # libraries test build platforms testBuildPlatforms: - Linux_x64 - - Windows_NT_x64 + - windows_x64 # # Libraries Test Run using Release libraries, Checked CoreCLR, and stress modes diff --git a/eng/pipelines/coreclr/libraries-jitstress.yml b/eng/pipelines/coreclr/libraries-jitstress.yml index 91fae482d447..4d12e1ccb8ed 100644 --- a/eng/pipelines/coreclr/libraries-jitstress.yml +++ b/eng/pipelines/coreclr/libraries-jitstress.yml @@ -33,14 +33,14 @@ jobs: - Linux_x64 - Linux_arm - Linux_arm64 - - Windows_NT_x86 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x86 + - windows_x64 + - windows_arm64 jobParameters: # libraries test build platforms testBuildPlatforms: - Linux_x64 - - Windows_NT_x64 + - windows_x64 # # Libraries Test Run using Release libraries, Checked CoreCLR, and stress modes @@ -53,9 +53,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_arm64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_arm64 + - windows_x64 + - windows_x86 helixQueueGroup: libraries helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/libraries-jitstress2-jitstressregs.yml b/eng/pipelines/coreclr/libraries-jitstress2-jitstressregs.yml index d1a2a0afd0e5..b558def3d53e 100644 --- a/eng/pipelines/coreclr/libraries-jitstress2-jitstressregs.yml +++ b/eng/pipelines/coreclr/libraries-jitstress2-jitstressregs.yml @@ -27,14 +27,14 @@ jobs: - Linux_x64 - Linux_arm - Linux_arm64 - - Windows_NT_x86 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x86 + - windows_x64 + - windows_arm64 jobParameters: # libraries test build platforms testBuildPlatforms: - Linux_x64 - - Windows_NT_x64 + - windows_x64 # # Libraries Test Run using Release libraries, Checked CoreCLR, and stress modes @@ -47,9 +47,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_arm64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_arm64 + - windows_x64 + - windows_x86 helixQueueGroup: libraries helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/libraries-jitstressregs.yml b/eng/pipelines/coreclr/libraries-jitstressregs.yml index 691cb29b0d9f..b4f9386b8a1b 100644 --- a/eng/pipelines/coreclr/libraries-jitstressregs.yml +++ b/eng/pipelines/coreclr/libraries-jitstressregs.yml @@ -27,14 +27,14 @@ jobs: - Linux_x64 - Linux_arm - Linux_arm64 - - Windows_NT_x86 - - Windows_NT_x64 - - Windows_NT_arm64 + - windows_x86 + - windows_x64 + - windows_arm64 jobParameters: # libraries test build platforms testBuildPlatforms: - Linux_x64 - - Windows_NT_x64 + - windows_x64 # # Libraries Test Run using Release libraries, Checked CoreCLR, and stress modes @@ -47,9 +47,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_arm64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_arm64 + - windows_x64 + - windows_x86 helixQueueGroup: libraries helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/perf.yml b/eng/pipelines/coreclr/perf.yml index 8b12dae2dd1d..a80e985fef1d 100644 --- a/eng/pipelines/coreclr/perf.yml +++ b/eng/pipelines/coreclr/perf.yml @@ -34,8 +34,8 @@ jobs: buildConfig: release platforms: - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_x64 + - windows_x86 jobParameters: testGroup: perf @@ -128,8 +128,8 @@ jobs: runtimeFlavor: coreclr platforms: - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_x64 + - windows_x86 jobParameters: testGroup: perf liveLibrariesBuildConfig: Release @@ -145,8 +145,8 @@ jobs: runtimeFlavor: coreclr platforms: - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_x64 + - windows_x86 jobParameters: testGroup: perf liveLibrariesBuildConfig: Release diff --git a/eng/pipelines/coreclr/r2r.yml b/eng/pipelines/coreclr/r2r.yml index a3b76e9d8e3f..e8bde2dd259c 100644 --- a/eng/pipelines/coreclr/r2r.yml +++ b/eng/pipelines/coreclr/r2r.yml @@ -22,10 +22,10 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_arm - - Windows_NT_arm64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_arm + - windows_arm64 + - windows_x64 + - windows_x86 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: outerloop @@ -48,10 +48,10 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_arm - - Windows_NT_arm64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_arm + - windows_arm64 + - windows_x64 + - windows_x86 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/runincontext.yml b/eng/pipelines/coreclr/runincontext.yml index 64e6fe6205a3..037dad2a3f16 100644 --- a/eng/pipelines/coreclr/runincontext.yml +++ b/eng/pipelines/coreclr/runincontext.yml @@ -20,8 +20,8 @@ jobs: buildConfig: checked platforms: - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_x64 + - windows_x86 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: outerloop @@ -42,8 +42,8 @@ jobs: buildConfig: checked platforms: - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 + - windows_x64 + - windows_x86 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/eng/pipelines/coreclr/superpmi.yml b/eng/pipelines/coreclr/superpmi.yml index 5fb435365182..3ae264540b1f 100644 --- a/eng/pipelines/coreclr/superpmi.yml +++ b/eng/pipelines/coreclr/superpmi.yml @@ -27,9 +27,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 jobParameters: testGroup: outerloop @@ -54,9 +54,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: @@ -74,9 +74,9 @@ jobs: - Linux_arm - Linux_arm64 - Linux_x64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm64 - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml diff --git a/eng/pipelines/coreclr/templates/build-jit-job.yml b/eng/pipelines/coreclr/templates/build-jit-job.yml index a5f31d4d3b55..e07a0d272ab7 100644 --- a/eng/pipelines/coreclr/templates/build-jit-job.yml +++ b/eng/pipelines/coreclr/templates/build-jit-job.yml @@ -50,7 +50,7 @@ jobs: - name: compilerArg value: '' - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - name: compilerArg value: '-clang9' # Building for x64 MUSL happens on Alpine Linux and we need to use the stable version available there @@ -62,12 +62,12 @@ jobs: - name: compilerArg value: '' - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - name: PythonScript value: 'py -3' - name: PipScript value: 'py -3 -m pip' - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - name: PythonScript value: 'python3' - name: PipScript @@ -84,7 +84,7 @@ jobs: - ${{ if eq(parameters.osGroup, 'OSX') }}: - script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) ${{ parameters.archType }} azDO displayName: Install native dependencies - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: # Necessary to install python - script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force displayName: Install native dependencies @@ -97,10 +97,10 @@ jobs: - template: /eng/pipelines/common/restore-internal-tools.yml # Build CoreCLR JIT - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) $(crossArg) -ci $(compilerArg) -skipruntime -nopgooptimize displayName: Build CoreCLR JIT - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - script: set __TestIntermediateDir=int&&$(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -ci -skipruntime -nopgooptimize -skiprestoreoptdata displayName: Build CoreCLR JIT diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index de501480b767..beb779bc605b 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -74,7 +74,7 @@ jobs: value: '-gcc' - name: publishLogsArtifactPrefix value: 'BuildLogs_CoreCLR_GCC' - - ${{ if and(ne(parameters.osGroup, 'Windows_NT'), ne(parameters.compilerName, 'gcc')) }}: + - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc')) }}: - name: compilerArg value: '-clang9' # Building for x64 MUSL happens on Alpine Linux and we need to use the stable version available there @@ -102,7 +102,7 @@ jobs: - name: enforcePgoArg value: '' # The EnforcePGO script is only supported on Windows and is not supported on arm or arm64. - - ${{ if and(eq(parameters.buildConfig, 'Release'), and(eq(parameters.osGroup, 'Windows_NT'), not(or(eq(parameters.archType, 'arm64'), eq(parameters.archType, 'arm'))))) }}: + - ${{ if and(eq(parameters.buildConfig, 'Release'), and(eq(parameters.osGroup, 'windows'), not(or(eq(parameters.archType, 'arm64'), eq(parameters.archType, 'arm'))))) }}: - name: enforcePgoArg value: '-enforcepgo' @@ -120,7 +120,7 @@ jobs: - name: ninjaArg value: '' - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - name: ninjaArg value: '-ninja' @@ -135,7 +135,7 @@ jobs: - ${{ if eq(parameters.osGroup, 'OSX') }}: - script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) ${{ parameters.archType }} azDO displayName: Install native dependencies - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: # Necessary to install python - script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force displayName: Install native dependencies @@ -154,15 +154,15 @@ jobs: displayName: Disk Usage before Build # Build DacTableGen (Windows-only) - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.dactools $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) -ci /bl:$(Build.SourcesDirectory)artifacts/logs/$(buildConfig)/DacTools.binlog displayName: Build managed product components and packages # Build CoreCLR Runtime - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) $(crossArg) $(osArg) -ci $(compilerArg) $(clrBuildPALTestsBuildArg) $(ninjaArg) $(officialBuildIdArg) $(clrInterpreterBuildArg) displayName: Build CoreCLR Runtime - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - script: set __TestIntermediateDir=int&&$(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -ci $(ninjaArg) $(enforcePgoArg) $(officialBuildIdArg) $(clrInterpreterBuildArg) displayName: Build CoreCLR Runtime @@ -209,7 +209,7 @@ jobs: overWrite: true # Sign on Windows - - ${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(parameters.signBinaries, 'true'), ne(parameters.testGroup, 'clrTools')) }}: + - ${{ if and(eq(parameters.osGroup, 'windows'), eq(parameters.signBinaries, 'true'), ne(parameters.testGroup, 'clrTools')) }}: - powershell: eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 /p:ArcadeBuild=true /p:OfficialBuild=true /p:TargetOS=$(osGroup) /p:TargetArchitecture=$(archType) /p:Configuration=$(_BuildConfig) /p:DotNetSignType=$env:_SignType -projects $(Build.SourcesDirectory)\eng\empty.csproj displayName: Sign Binaries @@ -234,7 +234,7 @@ jobs: artifactName: $(buildProductArtifactName) displayName: 'product build' - - ${{ if and(in(parameters.osGroup, 'Windows_NT', 'Linux'), ne(parameters.archType, 'x86'), ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, 'clrTools')) }}: + - ${{ if and(in(parameters.osGroup, 'windows', 'Linux'), ne(parameters.archType, 'x86'), ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, 'clrTools')) }}: - template: /eng/pipelines/coreclr/templates/crossdac-build.yml parameters: archType: ${{ parameters.archType }} diff --git a/eng/pipelines/coreclr/templates/crossdac-build.yml b/eng/pipelines/coreclr/templates/crossdac-build.yml index 44fd80157f96..216485692c64 100644 --- a/eng/pipelines/coreclr/templates/crossdac-build.yml +++ b/eng/pipelines/coreclr/templates/crossdac-build.yml @@ -5,13 +5,13 @@ parameters: steps: # Always build the crossdac, that way we know in CI/PR if things break to build. - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - ${{ if notin(parameters.archType, 'x86') }}: - script: set __TestIntermediateDir=int&&$(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -ci -linuxdac $(officialBuildIdArg) displayName: Build Cross OS Linux DAC for Windows - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - ${{ if notin(parameters.archType, 'x86') }}: - script: set __TestIntermediateDir=int&&$(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -ci -alpinedac $(officialBuildIdArg) displayName: Build Cross OS Linux-musl DAC for Windows diff --git a/eng/pipelines/coreclr/templates/crossgen-comparison-job.yml b/eng/pipelines/coreclr/templates/crossgen-comparison-job.yml index 3faae1209c10..5275bb19dd9f 100644 --- a/eng/pipelines/coreclr/templates/crossgen-comparison-job.yml +++ b/eng/pipelines/coreclr/templates/crossgen-comparison-job.yml @@ -53,7 +53,7 @@ jobs: value: $(osGroup).$(archType).$(buildConfigUpper) - name: crossFlavor value: $(osGroup).$(hostArchType)_$(archType).$(buildConfigUpper) - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - name: artifactsDirectory value: $(Build.SourcesDirectory)/artifacts - name: binDirectory @@ -62,7 +62,7 @@ jobs: value: $(binDirectory)/coreclr - name: workItemDirectory value: $(artifactsDirectory)/tests/coreclr/$(targetFlavor)/Tests/Core_Root - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - name: artifactsDirectory value: $(Build.SourcesDirectory)\artifacts - name: binDirectory @@ -110,12 +110,12 @@ jobs: displayName: Populate Core_Root # Create directories and ensure crossgen is executable - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - script: | chmod +x $(workItemDirectory)/crossgen mkdir -p $(workItemDirectory)/log/$(crossFlavor) displayName: Create directories and ensure crossgen is executable - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - script: | mkdir $(workItemDirectory)\log\$(crossFlavor) displayName: Create directories @@ -127,14 +127,14 @@ jobs: scriptSource: 'filePath' scriptPath: $(Build.SourcesDirectory)/src/tests/Common/scripts/crossgen_comparison.py pythonInterpreter: /usr/bin/python3 - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + ${{ if ne(parameters.osGroup, 'windows') }}: arguments: crossgen_framework --crossgen $(productDirectory)/$(targetFlavor)/$(hostArchType)/crossgen --il_corelib $(productDirectory)/$(targetFlavor)/IL/System.Private.CoreLib.dll --core_root $(workItemDirectory) --result_dir $(workItemDirectory)/log/$(crossFlavor) - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + ${{ if eq(parameters.osGroup, 'windows') }}: arguments: crossgen_framework --crossgen $(productDirectory)\$(targetFlavor)\$(hostArchType)\crossgen @@ -143,12 +143,12 @@ jobs: --result_dir $(workItemDirectory)\log\$(crossFlavor) # Dump contents and payload information - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - script: | ls $(workItemDirectory) du -sh $(workItemDirectory) displayName: Dump contents and payload information - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - script: | dir $(workItemDirectory) displayName: Dump contents and payload information @@ -167,7 +167,7 @@ jobs: WorkItemTimeout: 3:00 # 3 hours WorkItemDirectory: '$(workItemDirectory)' CorrelationPayloadDirectory: '$(Build.SourcesDirectory)/src/tests/Common/scripts' - ${{ if ne(parameters.osName, 'Windows_NT') }}: + ${{ if ne(parameters.osName, 'windows') }}: WorkItemCommand: chmod +x $HELIX_WORKITEM_PAYLOAD/crossgen; mkdir -p $HELIX_WORKITEM_PAYLOAD/log/$(targetFlavor); @@ -179,7 +179,7 @@ jobs: python3 -u $HELIX_CORRELATION_PAYLOAD/crossgen_comparison.py compare --base_dir $HELIX_WORKITEM_PAYLOAD/log/$(crossFlavor) --diff_dir $HELIX_WORKITEM_PAYLOAD/log/$(targetFlavor) - ${{ if eq(parameters.osName, 'Windows_NT') }}: + ${{ if eq(parameters.osName, 'windows') }}: WorkItemCommand: mkdir %HELIX_WORKITEM_PAYLOAD%\log\$(targetFlavor); python3 -u %HELIX_CORRELATION_PAYLOAD%\crossgen_comparison.py crossgen_framework diff --git a/eng/pipelines/coreclr/templates/crossgen2-comparison-build-job.yml b/eng/pipelines/coreclr/templates/crossgen2-comparison-build-job.yml index 9bcd11057ed3..106ce3804753 100644 --- a/eng/pipelines/coreclr/templates/crossgen2-comparison-build-job.yml +++ b/eng/pipelines/coreclr/templates/crossgen2-comparison-build-job.yml @@ -63,7 +63,7 @@ jobs: value: $(artifactsDirectory)$(dir)tests$(dir)coreclr$(dir)$(targetFlavor)$(dir)Tests$(dir)CrossCompileRoot - name: crossgencompare_build_artifact value: crossgen_comparison_build_$(osGroup)$(osSubgroup)_$(archType) - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - name: target_crossgen2_os value: windows - ${{ if eq(parameters.osGroup, 'Linux') }}: @@ -118,7 +118,7 @@ jobs: displayName: Populate Core_Root # Create work item directory and populate with assemblies - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - script: | mkdir -p $(workItemDirectory) mkdir -p $(workItemDirectory)/log @@ -127,7 +127,7 @@ jobs: cp $(productDirectory)/$(targetFlavor)/IL/System.Private.CoreLib.dll $(workItemDirectory)/dlls displayName: Create directories failOnStderr: true - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - script: | md $(workItemDirectory)\log md $(workItemDirectory)\dlls @@ -144,7 +144,7 @@ jobs: inputs: scriptSource: 'filePath' scriptPath: $(Build.SourcesDirectory)/src/tests/Common/scripts/crossgen2_comparison.py - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + ${{ if ne(parameters.osGroup, 'windows') }}: pythonInterpreter: /usr/bin/python3 arguments: crossgen_framework @@ -154,7 +154,7 @@ jobs: --result_dir $(workItemDirectory)/log --target_os $(target_crossgen2_os) --target_arch $(archType) - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + ${{ if eq(parameters.osGroup, 'windows') }}: arguments: crossgen_framework --crossgen $(crossgen2location) diff --git a/eng/pipelines/coreclr/templates/crossgen2-comparison-job.yml b/eng/pipelines/coreclr/templates/crossgen2-comparison-job.yml index 7d825e93f541..ccb447e5ebfc 100644 --- a/eng/pipelines/coreclr/templates/crossgen2-comparison-job.yml +++ b/eng/pipelines/coreclr/templates/crossgen2-comparison-job.yml @@ -67,7 +67,9 @@ jobs: value: ${{ parameters.targetarch }} - name: crossgencompare_build_artifact value: crossgen_comparison_build_${{ parameters.targetos }}_${{ parameters.targetarch }} - - ${{ if eq(parameters.targetos, 'Windows_NT') }}: + - name: displayname_comparison_job + value: ${{ format('Test crossgen2-comparison {0}{1} {2} {3} to {4} {5}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.targetarch, parameters.targetos) }} + - ${{ if eq(parameters.targetos, 'windows') }}: - name: target_crossgen2_os value: windows - ${{ if eq(parameters.targetos, 'Linux') }}: @@ -136,8 +138,9 @@ jobs: WorkItemTimeout: 3:00 # 3 hours WorkItemDirectory: '$(workItemDirectory)' CorrelationPayloadDirectory: '$(Build.SourcesDirectory)/src/tests/Common/scripts' - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + ${{ if ne(parameters.osGroup, 'windows') }}: WorkItemCommand: + echo $(displayname_comparison_job) ; echo Targeting $(targetFlavor) ; chmod +x $HELIX_WORKITEM_PAYLOAD/corerun; mkdir -p $HELIX_WORKITEM_PAYLOAD/log; @@ -152,8 +155,9 @@ jobs: python3 -u $HELIX_CORRELATION_PAYLOAD/crossgen2_comparison.py compare --base_dir $HELIX_WORKITEM_PAYLOAD/prebuiltWork/log --diff_dir $HELIX_WORKITEM_PAYLOAD/log - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + ${{ if eq(parameters.osGroup, 'windows') }}: WorkItemCommand: + echo $(displayname_comparison_job) & echo Targeting $(targetFlavor) & md %HELIX_WORKITEM_PAYLOAD%\log & set CORE_ROOT=%HELIX_CORRELATION_PAYLOAD% & diff --git a/eng/pipelines/coreclr/templates/format-job.yml b/eng/pipelines/coreclr/templates/format-job.yml index 18aaf6ea34d7..5699ccb1d3d3 100644 --- a/eng/pipelines/coreclr/templates/format-job.yml +++ b/eng/pipelines/coreclr/templates/format-job.yml @@ -28,10 +28,10 @@ jobs: name: ${{ format('format_{0}{1}_{2}', parameters.osGroup, parameters.osSubgroup, parameters.archType) }} displayName: ${{ format('Formatting {0}{1} {2}', parameters.osGroup, parameters.osSubgroup, parameters.archType) }} helixType: 'format' - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + ${{ if eq(parameters.osGroup, 'windows') }}: pool: vmImage: 'windows-2019' - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + ${{ if ne(parameters.osGroup, 'windows') }}: pool: ${{ parameters.pool }} variables: ${{ parameters.variables }} condition: ${{ parameters.condition }} @@ -49,7 +49,7 @@ jobs: versionSpec: '3.x' addToPath: true architecture: 'x64' - condition: ${{ eq(parameters.osGroup, 'Windows_NT') }} + condition: ${{ eq(parameters.osGroup, 'windows') }} - task: PythonScript@0 displayName: Run tests/scripts/format.py inputs: diff --git a/eng/pipelines/coreclr/templates/helix-queues-setup.yml b/eng/pipelines/coreclr/templates/helix-queues-setup.yml index 6bcef8752c2e..dfd5f9bd3ef0 100644 --- a/eng/pipelines/coreclr/templates/helix-queues-setup.yml +++ b/eng/pipelines/coreclr/templates/helix-queues-setup.yml @@ -99,8 +99,8 @@ jobs: - OSX.1014.Amd64 - OSX.1015.Amd64 - # Windows_NT x64 - - ${{ if eq(parameters.platform, 'Windows_NT_x64') }}: + # windows x64 + - ${{ if eq(parameters.platform, 'windows_x64') }}: - ${{ if and(eq(variables['System.TeamProject'], 'public'), in(parameters.jobParameters.helixQueueGroup, 'pr', 'ci', 'libraries')) }}: - Windows.10.Amd64.Open - ${{ if and(eq(variables['System.TeamProject'], 'public'), notIn(parameters.jobParameters.helixQueueGroup, 'pr', 'ci', 'libraries')) }}: @@ -115,8 +115,8 @@ jobs: - Windows.10.Amd64.Core - (Windows.Nano.1809.Amd64.Open)windows.10.amd64.serverrs5.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1809-helix-amd64-08e8e40-20200107182504 - # Windows_NT x86 - - ${{ if eq(parameters.platform, 'Windows_NT_x86') }}: + # windows x86 + - ${{ if eq(parameters.platform, 'windows_x86') }}: - ${{ if and(eq(variables['System.TeamProject'], 'public'), in(parameters.jobParameters.helixQueueGroup, 'pr', 'ci', 'libraries')) }}: - Windows.10.Amd64.Open - ${{ if and(eq(variables['System.TeamProject'], 'public'), notIn(parameters.jobParameters.helixQueueGroup, 'pr', 'ci', 'libraries')) }}: @@ -129,15 +129,15 @@ jobs: - Windows.10.Amd64 - Windows.10.Amd64.Core - # Windows_NT arm - - ${{ if eq(parameters.platform, 'Windows_NT_arm') }}: + # windows arm + - ${{ if eq(parameters.platform, 'windows_arm') }}: - ${{ if and(eq(variables['System.TeamProject'], 'public'), in(parameters.jobParameters.helixQueueGroup, 'pr', 'ci', 'libraries')) }}: - Windows.10.Arm64v8.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - Windows.10.Arm64 - # Windows_NT arm64 - - ${{ if eq(parameters.platform, 'Windows_NT_arm64') }}: + # windows arm64 + - ${{ if eq(parameters.platform, 'windows_arm64') }}: - ${{ if and(eq(variables['System.TeamProject'], 'public'), in(parameters.jobParameters.helixQueueGroup, 'pr', 'ci', 'libraries')) }}: - Windows.10.Arm64v8.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml index b6101f39dc19..74a3015ed15d 100644 --- a/eng/pipelines/coreclr/templates/perf-job.yml +++ b/eng/pipelines/coreclr/templates/perf-job.yml @@ -49,12 +49,12 @@ jobs: - ${{ if eq(parameters.runtimeType, 'wasm') }}: - ${{ format('build_{0}{1}_{2}_{3}_{4}', 'Browser', '', 'wasm', parameters.buildConfig, parameters.runtimeType) }} - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + ${{ if eq(parameters.osGroup, 'windows') }}: ${{ if eq(parameters.runtimeType, 'mono') }}: extraSetupParameters: -Architecture ${{ parameters.archType }} -MonoDotnet $(Build.SourcesDirectory)\.dotnet-mono ${{ if eq(parameters.runtimeType, 'coreclr') }}: extraSetupParameters: -CoreRootDirectory $(Build.SourcesDirectory)\artifacts\tests\coreclr\${{ parameters.osGroup }}.${{ parameters.archType }}.Release\Tests\Core_Root -Architecture ${{ parameters.archType }} - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + ${{ if ne(parameters.osGroup, 'windows') }}: ${{ if eq(parameters.runtimeType, 'mono') }}: extraSetupParameters: --architecture ${{ parameters.archType }} --monodotnet $(Build.SourcesDirectory)/.dotnet-mono ${{ if eq(parameters.runtimeType, 'wasm') }}: @@ -117,8 +117,8 @@ jobs: # Copy the runtime directory into the testhost folder to include OOBs. - script: "build.cmd -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)\\bin\\mono\\$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\runtime\\$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)\\shared\\Microsoft.NETCore.App\\6.0.0 /E /I /Y;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\.dotnet-mono /E /I /Y;copy $(Build.SourcesDirectory)\\artifacts\\bin\\coreclr\\$(osGroup).$(archType).$(buildConfigUpper)\\corerun.exe $(Build.SourcesDirectory)\\.dotnet-mono\\shared\\Microsoft.NETCore.App\\6.0.0\\corerun.exe" displayName: "Create mono dotnet (Windows)" - condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), eq(variables.osGroup, 'Windows_NT')) + condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), eq(variables.osGroup, 'windows')) - script: "mkdir $(Build.SourcesDirectory)/.dotnet-mono;./build.sh -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)/bin/mono/$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;cp $(Build.SourcesDirectory)/artifacts/bin/runtime/$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)/* $(Build.SourcesDirectory)/artifacts/bin/testhost/$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)/shared/Microsoft.NETCore.App/6.0.0 -rf;cp $(Build.SourcesDirectory)/artifacts/bin/testhost/$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)/* $(Build.SourcesDirectory)/.dotnet-mono -r;cp $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)/corerun $(Build.SourcesDirectory)/.dotnet-mono/shared/Microsoft.NETCore.App/6.0.0/corerun" displayName: "Create mono dotnet (Linux)" - condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), ne(variables.osGroup, 'Windows_NT')) + condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), ne(variables.osGroup, 'windows')) diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml index 7cbead38035f..3517eabedfe1 100644 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ b/eng/pipelines/coreclr/templates/run-performance-job.yml @@ -60,31 +60,31 @@ jobs: - Interpreter: '' - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - ${{ if eq( parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq( parameters.osGroup, 'windows') }}: - HelixPreCommand: $(HelixPreCommandStemWindows);$(ExtraMSBuildLogsWindows) - IsInternal: -Internal - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - HelixPreCommand: $(HelixPreCommandStemLinux);$(ExtraMSBuildLogsLinux) - IsInternal: --internal - group: DotNet-HelixApi-Access - group: dotnet-benchview - ${{ if not(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'))) }}: - - ${{ if eq( parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq( parameters.osGroup, 'windows') }}: - HelixPreCommand: $(ExtraMSBuildLogsWindows) - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - HelixPreCommand: $(ExtraMSBuildLogsLinux);npm install --prefix $HELIX_WORKITEM_PAYLOAD jsvu -g;$HELIX_WORKITEM_PAYLOAD/bin/jsvu --os=linux64 --engines=v8 - ${{ if and(eq(parameters.codeGenType, 'Interpreter'), eq(parameters.runtimeType, 'mono')) }}: - - ${{ if eq( parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq( parameters.osGroup, 'windows') }}: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - HelixPreCommand: '$(HelixPreCommandStemWindows);set MONO_ENV_OPTIONS="--interpreter";$(ExtraMSBuildLogsWindows)' - Interpreter: ' -MonoInterpreter' - ${{ if not(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'))) }}: - HelixPreCommand: 'set MONO_ENV_OPTIONS="--interpreter";$(ExtraMSBuildLogsWindows)' - Interpreter: ' -MonoInterpreter' - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - HelixPreCommand: '$(HelixPreCommandStemLinux);export MONO_ENV_OPTIONS="--interpreter";$(ExtraMSBuildLogsLinux)' - Interpreter: ' --monointerpreter' diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml index 84451af18576..de22968e287b 100644 --- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml +++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml @@ -55,17 +55,17 @@ jobs: - SharedHelixPreCommands: '' - AdditionalHelixPreCommands: '' # run machine-setup and set PYTHONPATH for both public and private jobs - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - SharedHelixPreCommands: 'call %HELIX_WORKITEM_PAYLOAD%\machine-setup.cmd;set PYTHONPATH=%HELIX_WORKITEM_PAYLOAD%\scripts%3B%HELIX_WORKITEM_PAYLOAD%' - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - SharedHelixPreCommands: 'chmod +x $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;. $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;export PYTHONPATH=$HELIX_WORKITEM_PAYLOAD/scripts:$HELIX_WORKITEM_PAYLOAD' # extra private job settings - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - AdditionalHelixPreCommands: 'py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"' - IsInternal: -Internal - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - AdditionalHelixPreCommands: 'sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/Scripts/activate;export PYTHONPATH=;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"' - IsInternal: --internal - group: DotNet-HelixApi-Access @@ -127,7 +127,7 @@ jobs: PERFLAB_TARGET_FRAMEWORKS: netcoreapp3.1 condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) # build SizeOnDisk - - script: $(PayloadDirectory)\dotnet\dotnet.exe publish -c Release -o $(WorkItemDirectory)SOD -f netcoreapp3.1 -r win-$(Architecture) $(PerformanceDirectory)\src\tools\ScenarioMeasurement\SizeOnDisk\SizeOnDisk.csproj + - script: $(PayloadDirectory)\dotnet\dotnet.exe publish -c Release -o $(WorkItemDirectory)\SOD -f netcoreapp3.1 -r win-$(Architecture) $(PerformanceDirectory)\src\tools\ScenarioMeasurement\SizeOnDisk\SizeOnDisk.csproj displayName: Build SizeOnDisk tool (Windows) env: PERFLAB_TARGET_FRAMEWORKS: netcoreapp3.1 diff --git a/eng/pipelines/coreclr/templates/run-superpmi-job.yml b/eng/pipelines/coreclr/templates/run-superpmi-job.yml index 9f835a16b486..02c37e86294c 100644 --- a/eng/pipelines/coreclr/templates/run-superpmi-job.yml +++ b/eng/pipelines/coreclr/templates/run-superpmi-job.yml @@ -61,7 +61,7 @@ jobs: - MchFileTag: '${{ parameters.osGroup }}.${{ parameters.archType }}.${{ parameters.buildConfig }}' - CollectionName: ${{ parameters.collectionName }} - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - name: PythonScript value: 'py -3' - name: PipScript @@ -70,7 +70,7 @@ jobs: value: '$(Build.SourcesDirectory)\artifacts\tests\coreclr\${{ parameters.osGroup }}.${{ parameters.archType }}.${{ parameters.buildConfig }}\Tests\Core_Root' - name: MchFilesLocation value: '$(Build.SourcesDirectory)\artifacts\helixresults\' - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - name: PythonScript value: 'python3' - name: PipScript @@ -105,7 +105,7 @@ jobs: - template: /eng/pipelines/coreclr/templates/superpmi-send-to-helix.yml parameters: HelixSource: '$(HelixSourcePrefix)/$(Build.Repository.Name)/$(Build.SourceBranch)' # sources must start with pr/, official/, prodcon/, or agent/ - HelixType: 'test/superpmi/$(Kind)/$(_Framework)/$(Architecture)' + HelixType: 'test/superpmi/$(CollectionName)/$(_Framework)/$(Architecture)' HelixAccessToken: $(HelixApiAccessToken) HelixTargetQueues: $(Queue) HelixPreCommands: $(HelixPreCommand) diff --git a/eng/pipelines/coreclr/templates/xplat-job.yml b/eng/pipelines/coreclr/templates/xplat-job.yml index 7dde73e23b25..7a2a0cd7ca84 100644 --- a/eng/pipelines/coreclr/templates/xplat-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-job.yml @@ -61,8 +61,8 @@ jobs: agentOs: FreeBSD ${{ if eq(parameters.osGroup, 'OSX') }}: agentOs: MacOS - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - agentOs: Windows_NT + ${{ if eq(parameters.osGroup, 'windows') }}: + agentOs: windows # Setting this results in the arcade job template including a step # that gathers asset manifests and publishes them to pipeline diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index ad5088d8999b..00ae63eb25bd 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -127,10 +127,10 @@ jobs: # 'innerloop' and 'clrinterpreter' jobs run the Priority 0 tests; everything else runs the Priority 1 tests. - ${{ if and(ne(parameters.testGroup, 'innerloop'), ne(parameters.testGroup, 'clrinterpreter')) }}: - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - name: priorityArg value: 'priority1' - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - name: priorityArg value: '-priority=1' diff --git a/eng/pipelines/global-build.yml b/eng/pipelines/global-build.yml index 9721eb4b9f47..0f3f3e64f646 100644 --- a/eng/pipelines/global-build.yml +++ b/eng/pipelines/global-build.yml @@ -42,7 +42,7 @@ jobs: jobTemplate: /eng/pipelines/common/global-build-job.yml buildConfig: release platforms: - - Windows_NT_x86 + - windows_x86 - OSX_x64 jobParameters: testGroup: innerloop @@ -87,7 +87,7 @@ jobs: jobTemplate: /eng/pipelines/common/global-build-job.yml buildConfig: debug platforms: - - Windows_NT_x64 + - windows_x64 jobParameters: testGroup: innerloop nameSuffix: Mono_Libraries diff --git a/eng/pipelines/installer/jobs/base-job.yml b/eng/pipelines/installer/jobs/base-job.yml index a769413019d6..5ace7f310d47 100644 --- a/eng/pipelines/installer/jobs/base-job.yml +++ b/eng/pipelines/installer/jobs/base-job.yml @@ -98,7 +98,7 @@ jobs: ### Platform-specific variable setup ### - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - name: CommonMSBuildArgs value: >- @@ -354,7 +354,7 @@ jobs: parameters.archType, parameters.liveLibrariesBuildConfig) }} - ${{ if eq(parameters.useOfficialAllConfigurations, true) }}: - - libraries_build_allconfigurations_Windows_NT_x64_Release + - libraries_build_allconfigurations_windows_x64_Release - ${{ if eq(parameters.buildFullPlatformManifest, true) }}: - ${{ each platform in parameters.platforms }}: - ${{ parameters.runtimeFlavor }}_${{ parameters.runtimeVariant }}_product_build_${{ platform }}_${{ parameters.liveRuntimeBuildConfig }} @@ -369,7 +369,7 @@ jobs: parameters.liveRuntimeBuildConfig, parameters.globalBuildSuffix) }} - ${{ if eq(parameters.useOfficialAllConfigurations, true) }}: - - build_Windows_NT_x64_${{ parameters.liveLibrariesBuildConfig }}_AllConfigurations + - build_windows_x64_${{ parameters.liveLibrariesBuildConfig }}_AllConfigurations steps: @@ -391,7 +391,7 @@ jobs: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - task: NuGetAuthenticate@0 - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: # NuGet's http cache lasts 30 minutes. If we're on a static machine, this may interfere with # auto-update PRs by preventing the CI build from fetching the new version. Delete the cache. - powershell: Remove-Item -Recurse -ErrorAction Ignore "$env:LocalAppData\NuGet\v3-cache" @@ -549,7 +549,7 @@ jobs: continueOnError: true condition: succeededOrFailed() - - ${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(parameters.isOfficialBuild, true)) }}: + - ${{ if and(eq(parameters.osGroup, 'windows'), eq(parameters.isOfficialBuild, true)) }}: - task: NuGetCommand@2 displayName: Push Visual Studio NuPkgs inputs: @@ -570,7 +570,7 @@ jobs: skipTests: $(SkipTests) isOfficialBuild: ${{ eq(parameters.isOfficialBuild, true) }} - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - script: set -x && df -h displayName: Check remaining storage space condition: always() diff --git a/eng/pipelines/libraries/base-job.yml b/eng/pipelines/libraries/base-job.yml index 7a034f5ee4a2..38c08558e977 100644 --- a/eng/pipelines/libraries/base-job.yml +++ b/eng/pipelines/libraries/base-job.yml @@ -44,6 +44,7 @@ jobs: - _msbuildCommonParameters: '' # rename this variable, due to collision with build-native.proj - _runtimeOSArg: '' + - _osArg: '' - _finalFrameworkArg: '' - _testModeArg: '' - _buildScript: $(_buildScriptFileName)$(scriptExt) @@ -68,7 +69,7 @@ jobs: # force a value for OS when cross-building - ${{ if in(parameters.osGroup, 'Browser', 'iOS', 'tvOS', 'Android', 'FreeBSD') }}: - - _runtimeOSArg: -os ${{ parameters.osGroup }} + - _osArg: -os ${{ parameters.osGroup }} - ${{ if ne(parameters.framework, '') }}: - _finalFrameworkArg: -framework ${{ parameters.framework }} @@ -102,14 +103,14 @@ jobs: - _testRunNamePrefixSuffix: ${{ parameters.testDisplayName }} # Windows variables - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - _runtimeOSArg: /p:RuntimeOS=win10 # Non-Windows variables - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - _buildScript: ./$(_buildScriptFileName)$(scriptExt) - - _buildArguments: $(_runtimeConfigurationArg) -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_testModeArg) $(_testScopeArg) $(_runtimeOSArg) $(_msbuildCommonParameters) $(_runtimeArtifactsPathArg) $(_crossBuildPropertyArg) + - _buildArguments: $(_runtimeConfigurationArg) -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_testModeArg) $(_testScopeArg) $(_osArg) $(_runtimeOSArg) $(_msbuildCommonParameters) $(_runtimeArtifactsPathArg) $(_crossBuildPropertyArg) - ${{ parameters.variables }} # we need to override this value to support build-coreclr-and-libraries-job.yml diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index c0e13a2ca68e..84f09c6ba8fc 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -101,8 +101,8 @@ jobs: - ${{ if in(parameters.platform, 'iOS_x64', 'iOS_x86') }}: - OSX.1015.Amd64.Open - # Windows_NT x64 - - ${{ if eq(parameters.platform, 'Windows_NT_x64') }}: + # windows x64 + - ${{ if eq(parameters.platform, 'windows_x64') }}: # netcoreapp - ${{ if notIn(parameters.jobParameters.framework, 'allConfigurations', 'net48') }}: - ${{ if and(eq(parameters.jobParameters.testScope, 'outerloop'), eq(parameters.jobParameters.runtimeFlavor, 'mono')) }}: @@ -130,8 +130,8 @@ jobs: - ${{ if eq(parameters.jobParameters.framework, 'allConfigurations') }}: - Windows.10.Amd64.Server19H1.Open - # Windows_NT x86 - - ${{ if eq(parameters.platform, 'Windows_NT_x86') }}: + # windows x86 + - ${{ if eq(parameters.platform, 'windows_x86') }}: # netcoreapp - ${{ if notIn(parameters.jobParameters.framework, 'allConfigurations', 'net48') }}: - ${{ if and(eq(parameters.jobParameters.testScope, 'outerloop'), eq(parameters.jobParameters.runtimeFlavor, 'mono')) }}: @@ -153,12 +153,12 @@ jobs: - ${{ if eq(parameters.jobParameters.framework, 'net48') }}: - Windows.10.Amd64.Client19H1.Open - # Windows_NT arm - - ${{ if eq(parameters.platform, 'Windows_NT_arm') }}: + # windows arm + - ${{ if eq(parameters.platform, 'windows_arm') }}: - Windows.10.Arm64v8.Open - # Windows_NT arm64 - - ${{ if eq(parameters.platform, 'Windows_NT_arm64') }}: + # windows arm64 + - ${{ if eq(parameters.platform, 'windows_arm64') }}: - Windows.10.Arm64.Open # WebAssembly diff --git a/eng/pipelines/libraries/outerloop-mono.yml b/eng/pipelines/libraries/outerloop-mono.yml index a7eb7dfe3afd..3bf80f8b9db3 100644 --- a/eng/pipelines/libraries/outerloop-mono.yml +++ b/eng/pipelines/libraries/outerloop-mono.yml @@ -22,10 +22,10 @@ jobs: buildConfig: Release runtimeFlavor: mono platforms: - - Windows_NT_x86 + - windows_x86 - Browser_wasm - ${{ if eq(variables['isFullMatrix'], true) }}: - - Windows_NT_x64 + - windows_x64 - Linux_x64 - Linux_arm - Linux_musl_x64 @@ -51,7 +51,7 @@ jobs: buildConfig: Debug runtimeFlavor: mono platforms: - - Windows_NT_x64 + - windows_x64 - Linux_x64 - Linux_musl_x64 - OSX_x64 diff --git a/eng/pipelines/libraries/outerloop.yml b/eng/pipelines/libraries/outerloop.yml index 1718d174bf85..62ed9459c9d3 100644 --- a/eng/pipelines/libraries/outerloop.yml +++ b/eng/pipelines/libraries/outerloop.yml @@ -23,8 +23,8 @@ jobs: buildConfig: release platforms: - ${{ if eq(variables['includeWindowsOuterloop'], true) }}: - - Windows_NT_x64 - - Windows_NT_x86 + - windows_x64 + - windows_x86 - ${{ if eq(variables['includeLinuxOuterloop'], true) }}: - Linux_x64 - Linux_musl_x64 @@ -45,9 +45,9 @@ jobs: buildConfig: Release platforms: - ${{ if eq(variables['includeWindowsOuterloop'], true) }}: - - Windows_NT_x86 + - windows_x86 - ${{ if eq(variables['isFullMatrix'], true) }}: - - Windows_NT_x64 + - windows_x64 - ${{ if eq(variables['includeLinuxOuterloop'], true) }}: - ${{ if eq(variables['isFullMatrix'], true) }}: - Linux_x64 @@ -72,7 +72,7 @@ jobs: buildConfig: Debug platforms: - ${{ if eq(variables['includeWindowsOuterloop'], true) }}: - - Windows_NT_x64 + - windows_x64 - ${{ if eq(variables['includeLinuxOuterloop'], true) }}: - Linux_x64 - Linux_musl_x64 @@ -92,9 +92,9 @@ jobs: jobTemplate: /eng/pipelines/libraries/build-job.yml buildConfig: Release platforms: - - Windows_NT_x86 + - windows_x86 - ${{ if eq(variables['isFullMatrix'], true) }}: - - Windows_NT_x64 + - windows_x64 helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml jobParameters: isOfficialBuild: ${{ variables['isOfficialBuild'] }} diff --git a/eng/pipelines/libraries/prepare-publish-for-tests.yml b/eng/pipelines/libraries/prepare-publish-for-tests.yml deleted file mode 100644 index 835cdfb0eb2c..000000000000 --- a/eng/pipelines/libraries/prepare-publish-for-tests.yml +++ /dev/null @@ -1,55 +0,0 @@ -# Steps used to prepare the Artifacts Staging Directory with required files for -# executing libraries tests as well as shared framework assets -parameters: - isOfficialBuild: '' - -steps: - - ${{ if ne(parameters.isOfficialBuild, true) }}: - - task: CopyFiles@2 - displayName: Prepare testhost folder to publish - inputs: - sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/testhost - targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/testhost - - - task: CopyFiles@2 - displayName: Prepare artifacts toolset folder to publish - inputs: - sourceFolder: $(Build.SourcesDirectory)/artifacts/toolset - targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/toolset - - - task: CopyFiles@2 - displayName: Prepare runtime folder to publish - inputs: - sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/runtime - targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/runtime - - - task: CopyFiles@2 - displayName: Prepare ref folder to publish - inputs: - sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/ref - targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/ref - - - task: CopyFiles@2 - displayName: Prepare shared framework ref assemblies to publish - inputs: - sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/ref/microsoft.netcore.app - targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/ref/microsoft.netcore.app - - - task: CopyFiles@2 - displayName: Prepare shared framework runtime folder to publish - inputs: - sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/pkg - targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/pkg - - - task: CopyFiles@2 - displayName: Prepare native folder to publish - inputs: - sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/native - targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/native - - - task: CopyFiles@2 - displayName: Prepare artifacts packages folder to publish - inputs: - sourceFolder: $(Build.SourcesDirectory)/artifacts/packages - targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/packages - condition: and(succeeded(), eq(variables['_librariesBuildProducedPackages'], true)) diff --git a/eng/pipelines/libraries/run-test-job.yml b/eng/pipelines/libraries/run-test-job.yml index e0f0e1e91196..11e4341c7af9 100644 --- a/eng/pipelines/libraries/run-test-job.yml +++ b/eng/pipelines/libraries/run-test-job.yml @@ -91,12 +91,12 @@ jobs: # We need to find and download the GC stress dependencies (namely, coredistools). Put them # in the 'sharedFramework' directory where we unpacked the CoreCLR build artifacts. The 'sharedFramework' # directory is what is copied into the testhost. - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - script: $(Build.SourcesDirectory)\src\coreclr\tests\setup-stress-dependencies.cmd /arch ${{ parameters.archType }} /outputdir $(_runtimeDownloadPath)/sharedFramework displayName: Download GC stress dependencies - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - script: $(Build.SourcesDirectory)/src/coreclr/tests/setup-stress-dependencies.sh --arch=${{ parameters.archType }} --outputDir=$(_runtimeDownloadPath)/sharedFramework diff --git a/eng/pipelines/mono/templates/build-job.yml b/eng/pipelines/mono/templates/build-job.yml index a6f149d093af..6b601d83c050 100644 --- a/eng/pipelines/mono/templates/build-job.yml +++ b/eng/pipelines/mono/templates/build-job.yml @@ -94,7 +94,7 @@ jobs: - ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}: - script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) ${{ parameters.archType }} azDO displayName: Install native dependencies - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: # Necessary to install python - script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force displayName: Install native dependencies @@ -106,10 +106,10 @@ jobs: displayName: Disk Usage before Build # Build - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - script: ./build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(llvmParameter) displayName: Build product - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - script: build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(llvmParameter) displayName: Build product @@ -131,16 +131,16 @@ jobs: displayName: 'product build' # Build packages - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - script: ./build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(llvmParameter) -pack $(OutputRidArg) displayName: Build nupkg - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: - script: build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(llvmParameter) -pack $(OutputRidArg) displayName: Build nupkg # Publish official build - ${{ if eq(parameters.publishToBlobFeed, 'true') }}: - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: - script: $(Build.SourcesDirectory)/eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) /p:DotNetPublishUsingPipelines=true /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedUrl=$(dotnetfeedUrl) /p:DotNetPublishBlobFeedKey=$(dotnetfeedPAT) /p:Configuration=$(_BuildConfig) /p:TargetArchitecture=$(archType) /p:TargetOS=$(osGroup) /p:OSIdentifier=$(osGroup)$(osSubgroup) /bl:"$(Build.SourcesDirectory)/artifacts/log/publish-pkgs.binlog" --projects $(Build.SourcesDirectory)/eng/empty.csproj displayName: Publish packages to blob feed env: @@ -149,7 +149,7 @@ jobs: ${{ if eq(parameters.osGroup, 'FreeBSD') }}: # Arcade uses this SDK instead of trying to restore one. DotNetCoreSdkDir: /usr/local/dotnet - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - ${{ if eq(parameters.osGroup, 'windows') }}: # TODO: pass publish feed url and access token in from the internal pipeline - powershell: eng\common\build.ps1 -ci -restore -publish -configuration $(_BuildConfig) /p:DotNetPublishUsingPipelines=true /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedUrl=$(dotnetfeedUrl) /p:DotNetPublishBlobFeedKey=$(dotnetfeedPAT) /p:Configuration=$(_BuildConfig) /p:TargetArchitecture=$(archType) /p:TargetOS=$(osGroup) /p:OSIdentifier=$(osGroup)$(osSubgroup) /bl:"$(Build.SourcesDirectory)\artifacts\log\publish-pkgs.binlog" -projects $(Build.SourcesDirectory)\eng\empty.csproj displayName: Publish packages to blob feed diff --git a/eng/pipelines/mono/templates/xplat-job.yml b/eng/pipelines/mono/templates/xplat-job.yml index 01d12d859f9a..58366dde638b 100644 --- a/eng/pipelines/mono/templates/xplat-job.yml +++ b/eng/pipelines/mono/templates/xplat-job.yml @@ -59,8 +59,8 @@ jobs: agentOs: FreeBSD ${{ if in(parameters.osGroup, 'OSX', 'iOS') }}: agentOs: MacOS - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - agentOs: Windows_NT + ${{ if eq(parameters.osGroup, 'windows') }}: + agentOs: windows # Setting this results in the arcade job template including a step # that gathers asset manifests and publishes them to pipeline diff --git a/eng/pipelines/official/stages/publish.yml b/eng/pipelines/official/stages/publish.yml index fc453209702a..5507dc2b1beb 100644 --- a/eng/pipelines/official/stages/publish.yml +++ b/eng/pipelines/official/stages/publish.yml @@ -1,5 +1,5 @@ parameters: - PublishRidAgnosticPackagesFromPlatform: Windows_NT_x64 + PublishRidAgnosticPackagesFromPlatform: windows_x64 publishingInfraVersion: 3 stages: diff --git a/eng/pipelines/runtime-linker-tests.yml b/eng/pipelines/runtime-linker-tests.yml index bb51f3c0c736..b78db5fca3fc 100644 --- a/eng/pipelines/runtime-linker-tests.yml +++ b/eng/pipelines/runtime-linker-tests.yml @@ -59,7 +59,7 @@ jobs: jobTemplate: /eng/pipelines/common/global-build-job.yml buildConfig: release platforms: - - Windows_NT_x64 + - windows_x64 - OSX_x64 - Linux_x64 jobParameters: diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index 80141273f93c..62c07cbd896b 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -57,10 +57,10 @@ stages: - Linux_musl_x64 - Linux_musl_arm - Linux_musl_arm64 - - Windows_NT_x86 - - Windows_NT_x64 - - Windows_NT_arm - - Windows_NT_arm64 + - windows_x86 + - windows_x64 + - windows_arm + - windows_arm64 jobParameters: isOfficialBuild: ${{ variables.isOfficialBuild }} @@ -79,9 +79,9 @@ stages: - Linux_musl_x64 - Linux_musl_arm - Linux_musl_arm64 - - Windows_NT_x64 - - Windows_NT_arm - - Windows_NT_arm64 + - windows_x64 + - windows_arm + - windows_arm64 # # Build Mono runtime packs # @@ -109,10 +109,10 @@ stages: - Browser_wasm # - Linux_musl_arm # - Linux_musl_arm64 - # - Windows_NT_x64 enable once coreclr.dll has a version header: https://github.com/dotnet/runtime/issues/37503 - # - Windows_NT_x86 - # - Windows_NT_arm - # - Windows_NT_arm64 + # - windows_x64 enable once coreclr.dll has a version header: https://github.com/dotnet/runtime/issues/37503 + # - windows_x86 + # - windows_arm + # - windows_arm64 jobParameters: buildArgs: -s mono+libs+installer -c $(_BuildConfig) nameSuffix: AllSubsets_Mono @@ -133,10 +133,10 @@ stages: - Linux_arm64 # - Linux_musl_x64 # - Linux_musl_arm64 - # - Windows_NT_x64 - # - Windows_NT_x86 - # - Windows_NT_arm - # - Windows_NT_arm64 + # - windows_x64 + # - windows_x86 + # - windows_arm + # - windows_arm64 jobTemplates: # LLVMJIT - jobTemplate: /eng/pipelines/common/global-build-job.yml @@ -181,10 +181,10 @@ stages: - Linux_musl_x64 - Linux_musl_arm - Linux_musl_arm64 - - Windows_NT_x86 - - Windows_NT_x64 - - Windows_NT_arm - - Windows_NT_arm64 + - windows_x86 + - windows_x64 + - windows_arm + - windows_arm64 jobParameters: isOfficialBuild: ${{ variables.isOfficialBuild }} liveRuntimeBuildConfig: release @@ -197,7 +197,7 @@ stages: jobTemplate: /eng/pipelines/libraries/build-job.yml buildConfig: Release platforms: - - Windows_NT_x64 + - windows_x64 jobParameters: framework: allConfigurations isOfficialBuild: ${{ variables.isOfficialBuild }} @@ -224,10 +224,10 @@ stages: - Linux_musl_x64 - Linux_musl_arm - Linux_musl_arm64 - - Windows_NT_x86 - - Windows_NT_x64 - - Windows_NT_arm - - Windows_NT_arm64 + - windows_x86 + - windows_x64 + - windows_arm + - windows_arm64 - ${{ if eq(variables.isOfficialBuild, true) }}: - template: /eng/pipelines/official/stages/publish.yml diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index e28c814872ba..dd43cb33606d 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -144,10 +144,10 @@ jobs: - Linux_musl_arm64 - Linux_musl_x64 - OSX_arm64 - - Windows_NT_x86 - - Windows_NT_x64 - - Windows_NT_arm - - Windows_NT_arm64 + - windows_x86 + - windows_x64 + - windows_arm + - windows_arm64 jobParameters: testGroup: innerloop condition: >- @@ -210,10 +210,10 @@ jobs: - Linux_musl_x64 - Linux_musl_arm - Linux_musl_arm64 - - Windows_NT_x64 - - Windows_NT_x86 - - Windows_NT_arm - - Windows_NT_arm64 + - windows_x64 + - windows_x86 + - windows_arm + - windows_arm64 - FreeBSD_x64 jobParameters: testGroup: innerloop @@ -229,7 +229,7 @@ jobs: platforms: - Linux_x64 # Issue: https://github.com/dotnet/runtime/issues/40034 - #- Windows_NT_x64 + #- windows_x64 jobParameters: condition: >- and( @@ -558,10 +558,10 @@ jobs: - Linux_x64 - Linux_arm64 # - Linux_musl_arm64 - - Windows_NT_x64 - # - Windows_NT_x86 - # - Windows_NT_arm - # - Windows_NT_arm64 + - windows_x64 + # - windows_x86 + # - windows_arm + # - windows_arm64 jobParameters: condition: >- or( @@ -581,10 +581,10 @@ jobs: platforms: - Linux_x64 # - Linux_musl_arm64 - - Windows_NT_x64 - # - Windows_NT_x86 - # - Windows_NT_arm - # - Windows_NT_arm64 + - windows_x64 + # - windows_x86 + # - windows_arm + # - windows_arm64 jobParameters: condition: >- or( @@ -646,9 +646,9 @@ jobs: - Linux_arm - Linux_musl_arm - Linux_musl_arm64 - - Windows_NT_arm - - Windows_NT_arm64 - - Windows_NT_x86 + - windows_arm + - windows_arm64 + - windows_x86 jobParameters: liveRuntimeBuildConfig: release @@ -662,13 +662,13 @@ jobs: - Linux_x64 - OSX_arm64 - OSX_x64 - - Windows_NT_x64 + - windows_x64 - FreeBSD_x64 jobParameters: testScope: innerloop testBuildPlatforms: - Linux_x64 - - Windows_NT_x64 + - windows_x64 - OSX_x64 liveRuntimeBuildConfig: release @@ -681,7 +681,7 @@ jobs: buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} platforms: - ${{ if eq(variables['isFullMatrix'], false) }}: - - Windows_NT_x86 + - windows_x86 jobParameters: liveRuntimeBuildConfig: release condition: >- @@ -694,9 +694,9 @@ jobs: jobTemplate: /eng/pipelines/libraries/build-job.yml buildConfig: Release platforms: - - Windows_NT_x86 + - windows_x86 - ${{ if eq(variables['isFullMatrix'], true) }}: - - Windows_NT_x64 + - windows_x64 helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml jobParameters: isFullMatrix: ${{ variables.isFullMatrix }} @@ -713,7 +713,7 @@ jobs: jobTemplate: /eng/pipelines/libraries/build-job.yml buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} platforms: - - Windows_NT_x64 + - windows_x64 helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml jobParameters: isFullMatrix: ${{ variables.isFullMatrix }} @@ -736,9 +736,9 @@ jobs: - Linux_arm - Linux_musl_arm - Linux_musl_arm64 - - Windows_NT_x86 - - Windows_NT_arm - - Windows_NT_arm64 + - windows_x86 + - windows_arm + - windows_arm64 jobParameters: liveRuntimeBuildConfig: release liveLibrariesBuildConfig: Release @@ -752,7 +752,7 @@ jobs: - Linux_x64 - Linux_arm64 - Linux_musl_x64 - - Windows_NT_x64 + - windows_x64 - FreeBSD_x64 jobParameters: liveRuntimeBuildConfig: release @@ -806,8 +806,8 @@ jobs: buildConfig: checked platforms: - Linux_arm - - Windows_NT_x86 - - Windows_NT_arm64 + - windows_x86 + - windows_arm64 helixQueueGroup: pr helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: @@ -827,7 +827,7 @@ jobs: - OSX_x64 - Linux_x64 - Linux_arm64 - - Windows_NT_x64 + - windows_x64 helixQueueGroup: pr helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: @@ -916,7 +916,7 @@ jobs: runtimeFlavor: mono buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} platforms: - - Windows_NT_x64 + - windows_x64 - OSX_x64 - Linux_arm64 - Linux_x64 @@ -945,7 +945,7 @@ jobs: runtimeFlavor: mono buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} platforms: - # - Windows_NT_x64 + # - windows_x64 #- OSX_x64 - Linux_x64 helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml @@ -973,9 +973,9 @@ jobs: jobTemplate: /eng/pipelines/libraries/run-test-job.yml buildConfig: Release platforms: - - Windows_NT_x86 + - windows_x86 - ${{ if eq(variables['isFullMatrix'], true) }}: - - Windows_NT_arm64 + - windows_arm64 helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml jobParameters: isOfficialBuild: false @@ -998,14 +998,14 @@ jobs: jobTemplate: /eng/pipelines/libraries/run-test-job.yml buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} platforms: - - Windows_NT_x64 + - windows_x64 - OSX_x64 - Linux_x64 - Linux_musl_x64 - ${{ if eq(variables['isFullMatrix'], true) }}: - Linux_arm64 - ${{ if eq(variables['isFullMatrix'], false) }}: - - Windows_NT_x86 + - windows_x86 helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml jobParameters: isOfficialBuild: false @@ -1028,11 +1028,11 @@ jobs: jobTemplate: /eng/pipelines/libraries/run-test-job.yml buildConfig: Release platforms: - # - Windows_NT_arm return this when https://github.com/dotnet/runtime/issues/1097 is fixed. + # - windows_arm return this when https://github.com/dotnet/runtime/issues/1097 is fixed. - Linux_arm - Linux_musl_arm - Linux_musl_arm64 - - Windows_NT_x86 + - windows_x86 helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml helixQueueGroup: libraries jobParameters: @@ -1050,7 +1050,7 @@ jobs: jobTemplate: /eng/pipelines/libraries/run-test-job.yml buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} platforms: - - Windows_NT_x64 + - windows_x64 - Linux_x64 - Linux_musl_x64 helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml diff --git a/eng/pipelines/runtimelab.yml b/eng/pipelines/runtimelab.yml index 57e2edf25af2..9757c7e5fa7b 100644 --- a/eng/pipelines/runtimelab.yml +++ b/eng/pipelines/runtimelab.yml @@ -67,7 +67,7 @@ stages: buildConfig: Checked platforms: - Linux_x64 - - Windows_NT_x64 + - windows_x64 jobParameters: timeoutInMinutes: 100 testGroup: innerloop @@ -85,7 +85,7 @@ stages: buildConfig: Release platforms: - Linux_x64 - - Windows_NT_x64 + - windows_x64 jobParameters: isOfficialBuild: ${{ variables.isOfficialBuild }} testGroup: innerloop @@ -106,7 +106,7 @@ stages: jobTemplate: /eng/pipelines/common/global-build-job.yml buildConfig: Release platforms: - - Windows_NT_x64 + - windows_x64 jobParameters: isOfficialBuild: ${{ variables.isOfficialBuild }} testGroup: innerloop @@ -131,7 +131,7 @@ stages: dependsOnGlobalBuild: true platforms: - Linux_x64 - - Windows_NT_x64 + - windows_x64 - ${{ if ne(variables.isOfficialBuild, true) }}: # @@ -172,7 +172,7 @@ stages: jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml buildConfig: Checked platforms: - - Windows_NT_x64 + - windows_x64 helixQueueGroup: pr helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: @@ -180,8 +180,8 @@ stages: liveLibrariesBuildConfig: Release dependsOn: - coreclr_common_test_build_p0_AnyOS_AnyCPU_Checked - - build_Windows_NT_x64_Checked_ - - build_Windows_NT_x64_Release_ + - build_windows_x64_Checked_ + - build_windows_x64_Release_ # # Libraries Release Test Execution against a release coreclr runtime @@ -208,7 +208,7 @@ stages: jobTemplate: /eng/pipelines/libraries/run-test-job.yml buildConfig: Release platforms: - - Windows_NT_x64 + - windows_x64 helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml jobParameters: isFullMatrix: false @@ -218,7 +218,7 @@ stages: dependsOnTestBuildConfiguration: Release dependsOnTestArchitecture: x64 dependsOn: - - build_Windows_NT_x64_Release_ + - build_windows_x64_Release_ - ${{ if eq(variables.isOfficialBuild, true) }}: - template: /eng/pipelines/official/stages/publish.yml diff --git a/eng/resolveContract.targets b/eng/resolveContract.targets index 6f4bb0e253ee..06084755937f 100644 --- a/eng/resolveContract.targets +++ b/eng/resolveContract.targets @@ -12,8 +12,8 @@ $(NetCoreAppCurrentRefPath)$(TargetFileName) - $([MSBuild]::NormalizePath('$(BaseOutputPath)', 'ref', '$(TargetFramework)-$(Configuration)', '$(TargetFileName)')) - + <_TargetFrameworkWithoutPlatform>$([System.Text.RegularExpressions.Regex]::Replace('$(TargetFramework)', '(-[^;]+)', '')) + $([MSBuild]::NormalizePath('$(BaseOutputPath)', 'ref', '$(_TargetFrameworkWithoutPlatform)-$(Configuration)', '$(TargetFileName)')) false @@ -59,4 +59,4 @@ ReferenceAssembly="" /> - \ No newline at end of file + diff --git a/eng/targetframeworksuffix.props b/eng/targetframeworksuffix.props index 96cd8db859c3..2525ce954a35 100644 --- a/eng/targetframeworksuffix.props +++ b/eng/targetframeworksuffix.props @@ -1,6 +1,18 @@ + + + true + true + + + + $(TargetFrameworkSuffix) + 0.0 + $(TargetFrameworkSuffix),Version=$(TargetPlatformVersion) + + - + true win diff --git a/eng/testing/debug-dump-template.md b/eng/testing/debug-dump-template.md new file mode 100644 index 000000000000..bc8a29617b59 --- /dev/null +++ b/eng/testing/debug-dump-template.md @@ -0,0 +1,127 @@ +# Debugging a CI dump + +This document describes how to debug a CI/PR test dump by downloading assets from helix, using a dotnet tool called `runfo`. + +## What is runfo? + +Runfo is a dotnet global tool that helps get information about helix test runs and azure devops builds. For more information see [this](https://github.com/jaredpar/runfo/tree/master/runfo#runfo) + +### How do I install it? + +You just need to run: + +```script +dotnet tool install --global runfo +``` + +If you already have it installed, make sure you have at least version `0.6.1` installed, which contains support to download helix payloads. If you don't have the latest version just run: + +```script +dotnet tool update --global runfo +``` + +## Download helix payload containing symbols: + +You can just achieve this by running: + +```script +runfo get-helix-payload -j %JOBID% -w %WORKITEM% -o +``` + +> NOTE: if the helix job is an internal job, you need to pass down a [helix authentication token](https://helix.dot.net/Account/Tokens) using the `--helix-token` argument. + +This will download the workitem contents under `\workitems\` and the correlation payload under: `\correlation-payload\`. + +> The correlation payload is usually the testhost or core root, which contain the runtime and dotnet host that we use to run tests. + +Once you have those assets, you will need to extract the testhost or core root. Then extract the workitem assets into the same location where coreclr binary is. + +## Windows dump on Windows + +### Debug with WinDbg + +1. Install [dotnet-sos global tool](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-sos). +2. Run `dotnet sos install` (This has an architecture flag to install diferent plugin versions for specific arch scenarios). +3. Load the dump with a recent WinDbg version for it to load sos automatically (if not you can run `.update sos`). It is important that bitness of WinDbg matches the bitness of the dump. +4. Then run the following commands: + +```script +!setclrpath +.sympath+ +``` +### Analyze with dotnet-dump + +1. Install [dotnet-dump global tool](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dump). +2. Run: `dotnet-dump analyze ` +3. Then run the following commands: + +```script +setclrpath (To verify an incorrect DAC hasn't been loaded). +setclrpath +setsymbolserver -directory +``` + +## Linux dumps on Windows + +In order to debug a Linux dump on Windows, you will have to first go to the PR/CI build +that sent the test run and download the cross DAC. + +Download the [`CoreCLRCrossDacArtifacts`](https://dev.azure.com/dnceng/public/_apis/build/builds/%BUILDID%/artifacts?artifactName=CoreCLRCrossDacArtifacts&api-version=6.0&%24format=zip), then extract it, and copy the matching flavor of the DAC with your dump and extract it in the same location where coreclr binary is. + +### Debug with WinDbg + +1. Install [dotnet-sos global tool](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-sos). +2. Run `dotnet sos install` (This has an architecture flag to install diferent plugin versions for specific arch scenarios). +3. Load the dump with a recent WinDbg version for it to load sos automatically (if not you can run `.update sos`). It is important that bitness of WinDbg matches the bitness of the dump. +4. Then run the following commands: + +```script +!setclrpath +.sympath+ +``` +### Analyze with dotnet-dump + +1. Install [dotnet-dump global tool](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dump). +2. Run: `dotnet-dump analyze ` +3. Then run the following commands: + +```script +setclrpath (To verify an incorrect DAC hasn't been loaded). +setclrpath +setsymbolserver -directory +``` + +## Linux dumps on Linux + +### Debug with LLDB + +1. Install [dotnet-sos global tool](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-sos). +2. Run `dotnet sos install` (This has an architecture flag to install diferent plugin versions for specific arch scenarios). +3. Load the dump by running `lldb -c ` +4. Run the following commands: + +```script +setclrpath +sethostruntime '' +setsymbolserver -directory +loadsymbols (if you want to resolve native symbols) +``` + +### Analyze with dotnet-dump + +1. Install [dotnet-dump global tool](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dump). +2. Run: `dotnet-dump analyze ` +3. Then run the following commands: + +```script +setclrpath (To verify an incorrect DAC hasn't been loaded). +setclrpath +setsymbolserver -directory +``` + +## MacOS dumps + +Instructions for debugging dumps on MacOS the same as [Linux](#linux-dumps-on-linux); however there are a couple of caveats. + +1. It's only supported to debug them in `dotnet-dump` if it's a runtime generated dump. This includes hang dumps and dumps generated by `createdump`, `dotnet-dump` and the runtime itself. +2. If it's a system dump, then only `lldb` works. diff --git a/eng/testing/gen-debug-dump-docs.py b/eng/testing/gen-debug-dump-docs.py new file mode 100644 index 000000000000..bd6798b14a67 --- /dev/null +++ b/eng/testing/gen-debug-dump-docs.py @@ -0,0 +1,104 @@ +import os +import sys +import platform + +build_id = '' +job_id = '' +workitem = '' +dump_dir = '' +template_dir = os.getcwd() +out_dir = template_dir +idx = 0 +args_len = len(sys.argv) +while idx < args_len: + arg = sys.argv[idx] + idx += 1 + if arg == '-buildid': + if idx >= args_len or sys.argv[idx].startswith('-'): + print("Must specify a value for -buildid") + exit(1) + + build_id = sys.argv[idx] + idx += 1 + + if arg == '-jobid': + if idx >= args_len or sys.argv[idx].startswith('-'): + print("Must specify a value for -jobid") + exit(1) + + job_id = sys.argv[idx] + idx += 1 + + if arg == '-workitem': + if idx >= args_len or sys.argv[idx].startswith('-'): + print("Must specify a value for -workitem") + exit(1) + + workitem = sys.argv[idx] + idx += 1 + + if arg == '-templatedir': + if idx >= args_len or sys.argv[idx].startswith('-'): + print("Must specify a value for -templatedir") + exit(1) + + template_dir = sys.argv[idx] + idx += 1 + + if arg == '-outdir': + if idx >= args_len or sys.argv[idx].startswith('-'): + print("Must specify a value for -outdir") + exit(1) + + out_dir = sys.argv[idx] + idx += 1 + + if arg == '-dumpdir': + if idx >= args_len or sys.argv[idx].startswith('-'): + print("Must specify a value for -dumpdir") + exit(1) + + dump_dir = sys.argv[idx] + idx += 1 + +found_dumps = False +if dump_dir != '': + for filename in os.listdir(dump_dir): + if filename.endswith('.dmp') or 'core.' in filename: + found_dumps = True + break + +if not found_dumps: + print("Did not find dumps, skipping dump docs generation.") + exit(0) + +if build_id == '': + print("ERROR: unespecified required argument -buildid") + exit(1) + +if workitem == '': + print("ERROR: unespecified required argument -workitem") + exit(1) + +if job_id == '': + print("ERROR: unespecified required argument -jobid") + exit(1) + +replace_string = '' +dir_separator = '/' if platform.system() != 'Windows' else '\\' +source_file = template_dir + dir_separator + 'debug-dump-template.md' +with open(source_file, 'r+') as f: + file_text = f.read() + + print('read file: ' + source_file) + + replace_string = file_text.replace('%JOBID%', job_id) + replace_string = replace_string.replace('%WORKITEM%', workitem) + replace_string = replace_string.replace('%BUILDID%', build_id) + +output_file = out_dir + dir_separator + 'how-to-debug-dump.md' +with open(output_file, 'w+') as output: + print('writing output file: ' + output_file) + write_file = output.write(replace_string) + +print('done writing debug dump information') diff --git a/eng/testing/tests.targets b/eng/testing/tests.targets index 2fe669a10ba0..be296d75f02b 100644 --- a/eng/testing/tests.targets +++ b/eng/testing/tests.targets @@ -1,22 +1,22 @@ - RunnerTemplate.cmd - RunnerTemplate.sh + RunnerTemplate.cmd + RunnerTemplate.sh AppleRunnerTemplate.sh AndroidRunnerTemplate.sh WasmRunnerTemplate.sh $(MSBuildThisFileDirectory)$(RunScriptInputName) - RunTests.cmd - RunTests.sh + RunTests.cmd + RunTests.sh $([MSBuild]::NormalizePath('$(OutDir)', '$(RunScriptOutputName)')) - %RUNTIME_PATH%\ - $RUNTIME_PATH/ + %RUNTIME_PATH%\ + $RUNTIME_PATH/ - $(RunScriptHostDir)dotnet.exe - $(RunScriptHostDir)dotnet + $(RunScriptHostDir)dotnet.exe + $(RunScriptHostDir)dotnet @@ -52,8 +52,8 @@ - $(RunScriptCommand) %RSP_FILE% - $(RunScriptCommand) $RSP_FILE + $(RunScriptCommand) %RSP_FILE% + $(RunScriptCommand) $RSP_FILE $([MSBuild]::Escape('$(RunScriptCommand)')) @@ -86,7 +86,7 @@ TemplatePath="$(RunScriptInputPath)" OutputPath="$(RunScriptOutputPath)" /> - + diff --git a/eng/versioning.targets b/eng/versioning.targets index 61789747403d..3177b48b0ba6 100644 --- a/eng/versioning.targets +++ b/eng/versioning.targets @@ -155,4 +155,14 @@ WriteOnlyWhenDifferent="true" /> + + + + + + + + + diff --git a/global.json b/global.json index 712486f620a0..d969cf5dbfc3 100644 --- a/global.json +++ b/global.json @@ -12,10 +12,10 @@ "python3": "3.7.1" }, "msbuild-sdks": { - "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.20529.1", - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.20529.1", - "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "6.0.0-beta.20529.1", - "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.20529.1", + "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.20552.5", + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.20552.5", + "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "6.0.0-beta.20552.5", + "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.20552.5", "Microsoft.FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "5.0.0-preview.8.20359.4", "Microsoft.Build.NoTargets": "2.0.1", diff --git a/src/coreclr/build-runtime.cmd b/src/coreclr/build-runtime.cmd index 730e8d0f94fa..ca32712554db 100644 --- a/src/coreclr/build-runtime.cmd +++ b/src/coreclr/build-runtime.cmd @@ -26,7 +26,7 @@ if defined VS160COMNTOOLS ( :: Note that the msbuild project files (specifically, dir.proj) will use the following variables, if set: :: __BuildArch -- default: x64 :: __BuildType -- default: Debug -:: __TargetOS -- default: Windows_NT +:: __TargetOS -- default: windows :: __ProjectDir -- default: directory of the dir.props file :: __RepoRootDir -- default: directory two levels above the dir.props file :: __SourceDir -- default: %__ProjectDir%\src\ @@ -40,7 +40,7 @@ if defined VS160COMNTOOLS ( :: Set the default arguments for build set __BuildArch=x64 set __BuildType=Debug -set __TargetOS=Windows_NT +set __TargetOS=windows :: Set the various build properties here so that CMake and MSBuild can pick them up set "__ProjectDir=%~dp0" diff --git a/src/coreclr/crossgen-corelib.cmd b/src/coreclr/crossgen-corelib.cmd index c153745ea91c..14a018ae88a4 100644 --- a/src/coreclr/crossgen-corelib.cmd +++ b/src/coreclr/crossgen-corelib.cmd @@ -13,7 +13,7 @@ set __ThisScriptDir=%~dp0 :: Note that the msbuild project files (specifically, dir.proj) will use the following variables, if set: :: __BuildArch -- default: x64 :: __BuildType -- default: Debug -:: __TargetOS -- default: Windows_NT +:: __TargetOS -- default: windows :: __ProjectDir -- default: directory of the dir.props file :: __RepoRootDir -- default: directory two levels above the dir.props file :: __RootBinDir -- default: %__RepoRootDir%\artifacts\ @@ -26,7 +26,7 @@ set __ThisScriptDir=%~dp0 :: Set the default arguments for build set __BuildArch=x64 set __BuildType=Debug -set __TargetOS=Windows_NT +set __TargetOS=windows set "__ProjectDir=%~dp0" :: remove trailing slash diff --git a/src/coreclr/dir.common.props b/src/coreclr/dir.common.props index b4494a50ac17..ebaf9645134a 100644 --- a/src/coreclr/dir.common.props +++ b/src/coreclr/dir.common.props @@ -58,7 +58,7 @@ true true true - true + true true diff --git a/src/coreclr/scripts/coreclr_arguments.py b/src/coreclr/scripts/coreclr_arguments.py index 441c44790302..aab997306f19 100644 --- a/src/coreclr/scripts/coreclr_arguments.py +++ b/src/coreclr/scripts/coreclr_arguments.py @@ -65,7 +65,7 @@ def __init__(self, self.valid_arches = ["x64", "x86", "arm", "arm64", "wasm"] self.valid_build_types = ["Debug", "Checked", "Release"] - self.valid_host_os = ["Windows_NT", "OSX", "Linux", "illumos", "Solaris", "Browser", "Android"] + self.valid_host_os = ["windows", "OSX", "Linux", "illumos", "Solaris", "Browser", "Android"] self.__initialize__(args) @@ -175,7 +175,7 @@ def verify(self, def provide_default_host_os(): """ Return a string representing the current host operating system. - Returns one of: Linux, OSX, Windows_NT, illumos, Solaris + Returns one of: Linux, OSX, windows, illumos, Solaris """ if sys.platform == "linux" or sys.platform == "linux2": @@ -183,7 +183,7 @@ def provide_default_host_os(): elif sys.platform == "darwin": return "OSX" elif sys.platform == "win32": - return "Windows_NT" + return "windows" elif sys.platform.startswith("sunos"): is_illumos = ('illumos' in subprocess.Popen(["uname", "-o"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0].decode('utf-8')) return 'illumos' if is_illumos else 'Solaris' diff --git a/src/coreclr/scripts/jitrollingbuild.py b/src/coreclr/scripts/jitrollingbuild.py index d947c7a5d2fd..83434438dac1 100644 --- a/src/coreclr/scripts/jitrollingbuild.py +++ b/src/coreclr/scripts/jitrollingbuild.py @@ -57,7 +57,7 @@ List clrjit in SuperPMI Azure storage. """ -host_os_help = "OS (Windows_NT, OSX, Linux). Default: current OS." +host_os_help = "OS (windows, OSX, Linux). Default: current OS." arch_help = "Architecture (x64, x86, arm, arm64). Default: current architecture." @@ -166,7 +166,7 @@ def determine_jit_name(coreclr_args): return "lib" + jit_base_name + ".dylib" elif coreclr_args.host_os == "Linux": return "lib" + jit_base_name + ".so" - elif coreclr_args.host_os == "Windows_NT": + elif coreclr_args.host_os == "windows": return jit_base_name + ".dll" else: raise RuntimeError("Unknown OS.") @@ -299,7 +299,7 @@ def upload_blob(file, blob_name): elif coreclr_args.host_os == "Linux": allowed_extensions = [ ".so" ] # Add .dbg for debug info - elif coreclr_args.host_os == "Windows_NT": + elif coreclr_args.host_os == "windows": allowed_extensions = [ ".dll" ] else: raise RuntimeError("Unknown OS.") @@ -310,7 +310,7 @@ def upload_blob(file, blob_name): files += cross_jit_paths # On Windows, grab the PDB files from a sub-directory. - # if coreclr_args.host_os == "Windows_NT": + # if coreclr_args.host_os == "windows": # pdb_dir = os.path.join(coreclr_args.product_location, "PDB") # if os.path.isdir(pdb_dir): # pdb_paths = [os.path.join(pdb_dir, item) for item in os.listdir(pdb_dir) if re.match(r'.*clrjit.*', item)] diff --git a/src/coreclr/scripts/superpmi-setup.py b/src/coreclr/scripts/superpmi-setup.py index 48e72d5de774..10365804de8b 100644 --- a/src/coreclr/scripts/superpmi-setup.py +++ b/src/coreclr/scripts/superpmi-setup.py @@ -23,7 +23,7 @@ # 4. Lastly, it sets the pipeline variables. # Below are the helix queues it sets depending on the OS/architecture: -# | Arch | Windows_NT | Linux | +# | Arch | windows | Linux | # |-------|------------------|--------------------------------------------------------------------------------------------------------------------------------------| # | x86 | Windows.10.Amd64 | - | # | x64 | Windows.10.Amd64 | Ubuntu.1804.Amd64 | @@ -89,7 +89,7 @@ "superpmi-shim-counter.dll", "superpmi-shim-simple.dll", ] - +MAX_FILES_COUNT = 1500 def setup_args(args): """ Setup the args for SuperPMI to use. @@ -206,7 +206,7 @@ def first_fit(sorted_by_size, max_size): if file_size < max_size: for p_index in partitions: total_in_curr_par = sum(n for _, n in partitions[p_index]) - if (total_in_curr_par + file_size) < max_size: + if (((total_in_curr_par + file_size) < max_size) and (len(partitions[p_index]) < MAX_FILES_COUNT)): partitions[p_index].append(curr_file) found_bucket = True break @@ -217,7 +217,7 @@ def first_fit(sorted_by_size, max_size): total_size = 0 for p_index in partitions: partition_size = sum(n for _, n in partitions[p_index]) - print("Partition {0}: {1} bytes.".format(p_index, partition_size)) + print("Partition {0}: {1} files with {2} bytes.".format(p_index, len(partitions[p_index]), partition_size)) total_size += partition_size print("Total {0} partitions with {1} bytes.".format(str(len(partitions)), total_size)) diff --git a/src/coreclr/scripts/superpmi.md b/src/coreclr/scripts/superpmi.md index a72ee2f06a95..5e80f70f663b 100644 --- a/src/coreclr/scripts/superpmi.md +++ b/src/coreclr/scripts/superpmi.md @@ -58,7 +58,7 @@ If you want to use a specific MCH file collection, use the `-mch_files` argument one or more MCH files on your machine: ``` -python f:\gh\runtime\src\coreclr\scripts\superpmi.py replay -mch_files f:\spmi\collections\tests.pmi.Windows_NT.x64.Release.mch +python f:\gh\runtime\src\coreclr\scripts\superpmi.py replay -mch_files f:\spmi\collections\tests.pmi.windows.x64.Release.mch ``` The `-mch_files` argument takes a list of one or more directories or files to use. For diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py index 85bdcb974c9a..2540559eff58 100755 --- a/src/coreclr/scripts/superpmi.py +++ b/src/coreclr/scripts/superpmi.py @@ -114,7 +114,7 @@ to get that version. Otherwise, use "unknown-jit-ee-version". """ -host_os_help = "OS (Windows_NT, OSX, Linux). Default: current OS." +host_os_help = "OS (windows, OSX, Linux). Default: current OS." arch_help = "Architecture (x64, x86, arm, arm64). Default: current architecture." @@ -625,7 +625,7 @@ def __init__(self, coreclr_args): elif coreclr_args.host_os == "Linux": self.collection_shim_name = "libsuperpmi-shim-collector.so" self.corerun_tool_name = "corerun" - elif coreclr_args.host_os == "Windows_NT": + elif coreclr_args.host_os == "windows": self.collection_shim_name = "superpmi-shim-collector.dll" self.corerun_tool_name = "corerun.exe" else: @@ -975,7 +975,7 @@ def print_superpmi_failure_code(return_code, coreclr_args): logging.warning("Compilation failures") elif return_code == 2: logging.warning("Asm diffs found") - elif return_code == 139 and coreclr_args.host_os != "Windows_NT": + elif return_code == 139 and coreclr_args.host_os != "windows": logging.error("Fatal error, SuperPMI has returned SIGSEGV (segmentation fault)") else: logging.error("Unknown error code %s", return_code) @@ -1621,7 +1621,7 @@ def determine_coredis_tools(coreclr_args): coredistools_dll_name = "libcoredistools.dylib" elif coreclr_args.host_os.lower() == "linux": coredistools_dll_name = "libcoredistools.so" - elif coreclr_args.host_os.lower() == "windows_nt": + elif coreclr_args.host_os.lower() == "windows": coredistools_dll_name = "coredistools.dll" else: raise RuntimeError("Unknown host os: {}".format(coreclr_args.host_os)) @@ -1703,7 +1703,7 @@ def determine_jit_name(coreclr_args): return "lib" + jit_base_name + ".dylib" elif coreclr_args.host_os == "Linux": return "lib" + jit_base_name + ".so" - elif coreclr_args.host_os == "Windows_NT": + elif coreclr_args.host_os == "windows": return jit_base_name + ".dll" else: raise RuntimeError("Unknown OS.") @@ -1762,7 +1762,7 @@ def determine_superpmi_tool_name(coreclr_args): if coreclr_args.host_os == "OSX" or coreclr_args.host_os == "Linux": return "superpmi" - elif coreclr_args.host_os == "Windows_NT": + elif coreclr_args.host_os == "windows": return "superpmi.exe" else: raise RuntimeError("Unknown OS.") @@ -1794,7 +1794,7 @@ def determine_mcs_tool_name(coreclr_args): if coreclr_args.host_os == "OSX" or coreclr_args.host_os == "Linux": return "mcs" - elif coreclr_args.host_os == "Windows_NT": + elif coreclr_args.host_os == "windows": return "mcs.exe" else: raise RuntimeError("Unsupported OS.") @@ -1883,7 +1883,7 @@ def print_platform_specific_environment_vars(loglevel, coreclr_args, var, value) value (str): value being set. """ - if coreclr_args.host_os == "Windows_NT": + if coreclr_args.host_os == "windows": logging.log(loglevel, "set %s=%s", var, value) else: logging.log(loglevel, "export %s=%s", var, value) @@ -1975,7 +1975,7 @@ def process_mch_files_arg(coreclr_args): for item in coreclr_args.mch_files: # On Windows only, see if any of the mch_files are UNC paths (i.e., "\\server\share\..."). # If so, download and cache all the files found there to our usual local cache location, to avoid future network access. - if coreclr_args.host_os == "Windows_NT" and item.startswith("\\\\"): + if coreclr_args.host_os == "windows" and item.startswith("\\\\"): # Special case: if the user specifies a .mch file, we'll also look for and cache a .mch.mct file next to it, if one exists. # This happens naturally if a directory is passed and we search for all .mch and .mct files in that directory. mch_file = os.path.abspath(item) @@ -2175,19 +2175,20 @@ def upload_blob(file, blob_name): files = [] for item in coreclr_args.mch_files: - files += get_files_from_path(item, match_func=lambda path: any(path.endswith(extension) for extension in [".mch", ".mct"])) + files += get_files_from_path(item, match_func=lambda path: any(path.endswith(extension) for extension in [".mch"])) + files_to_upload = [] # Special case: walk the files list and for every ".mch" file, check to see that either the associated ".mct" file is already # in the list, or add it if the ".mct" file exists. for file in files.copy(): - if file.endswith(".mch"): + if file.endswith(".mch") and os.stat(file).st_size > 0: + files_to_upload.append(file) mct_file = file + ".mct" - if mct_file not in files: - if os.path.isfile(mct_file): - files.append(mct_file) + if os.path.isfile(mct_file) and os.stat(mct_file).st_size > 0: + files_to_upload.append(mct_file) logging.info("Uploading:") - for item in files: + for item in files_to_upload: logging.info(" %s", item) try: @@ -2205,7 +2206,7 @@ def upload_blob(file, blob_name): total_bytes_uploaded = 0 with TempDir() as temp_location: - for file in files: + for file in files_to_upload: # Zip compress the file we will upload zip_name = os.path.basename(file) + ".zip" zip_path = os.path.join(temp_location, zip_name) @@ -2293,8 +2294,8 @@ def list_collections_local_command(coreclr_args): default_mch_dir = os.path.join(default_mch_root_dir, "{}.{}.{}".format(coreclr_args.jit_ee_version, coreclr_args.host_os, coreclr_args.arch)) # Determine if a file should be allowed. The filenames look like: - # c:\gh\runtime\artifacts\spmi\mch\a5eec3a4-4176-43a7-8c2b-a05b551d4f49.Windows_NT.x64\corelib.Windows_NT.x64.Checked.mch - # c:\gh\runtime\artifacts\spmi\mch\a5eec3a4-4176-43a7-8c2b-a05b551d4f49.Windows_NT.x64\corelib.Windows_NT.x64.Checked.mch.mct + # c:\gh\runtime\artifacts\spmi\mch\a5eec3a4-4176-43a7-8c2b-a05b551d4f49.windows.x64\corelib.windows.x64.Checked.mch + # c:\gh\runtime\artifacts\spmi\mch\a5eec3a4-4176-43a7-8c2b-a05b551d4f49.windows.x64\corelib.windows.x64.Checked.mch.mct # Only include MCH files, not clrjit.dll or MCT (TOC) files. def filter_superpmi_collections(path: str): return path.lower().endswith(".mch") @@ -2788,18 +2789,18 @@ def verify_replay_common_args(): determined_arch = None determined_build_type = None if jit_in_product_location: - # Get os/arch/flavor directory, e.g. split "F:\gh\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked" with "F:\gh\runtime\artifacts\bin\coreclr" + # Get os/arch/flavor directory, e.g. split "F:\gh\runtime\artifacts\bin\coreclr\windows.x64.Checked" with "F:\gh\runtime\artifacts\bin\coreclr" # yielding # [0]: "" - # [1]: "\Windows_NT.x64.Checked" + # [1]: "\windows.x64.Checked" standard_location_split = os.path.dirname(coreclr_args.jit_path).split(os.path.dirname(coreclr_args.product_location)) assert coreclr_args.host_os in standard_location_split[1] # Get arch/flavor. Remove leading slash. specialized_path = standard_location_split[1].split(os.path.sep)[1] - # Split components: "Windows_NT.x64.Checked" into: - # [0]: "Windows_NT" + # Split components: "windows.x64.Checked" into: + # [0]: "windows" # [1]: "x64" # [2]: "Checked" determined_split = specialized_path.split(".") @@ -2894,18 +2895,18 @@ def verify_replay_common_args(): determined_arch = None determined_build_type = None if jit_in_product_location: - # Get os/arch/flavor directory, e.g. split "F:\gh\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked" with "F:\gh\runtime\artifacts\bin\coreclr" + # Get os/arch/flavor directory, e.g. split "F:\gh\runtime\artifacts\bin\coreclr\windows.x64.Checked" with "F:\gh\runtime\artifacts\bin\coreclr" # yielding # [0]: "" - # [1]: "\Windows_NT.x64.Checked" + # [1]: "\windows.x64.Checked" standard_location_split = os.path.dirname(coreclr_args.base_jit_path).split(os.path.dirname(coreclr_args.product_location)) assert coreclr_args.host_os in standard_location_split[1] # Get arch/flavor. Remove leading slash. specialized_path = standard_location_split[1].split(os.path.sep)[1] - # Split components: "Windows_NT.x64.Checked" into: - # [0]: "Windows_NT" + # Split components: "windows.x64.Checked" into: + # [0]: "windows" # [1]: "x64" # [2]: "Checked" determined_split = specialized_path.split(".") diff --git a/src/coreclr/src/.nuget/Directory.Build.props b/src/coreclr/src/.nuget/Directory.Build.props index e44f8de0a11c..3473cbf83b52 100644 --- a/src/coreclr/src/.nuget/Directory.Build.props +++ b/src/coreclr/src/.nuget/Directory.Build.props @@ -33,7 +33,7 @@ $(OSRid) - Windows_NT;OSX;Android;Linux;FreeBSD;NetBSD;illumos;Solaris + windows;OSX;Android;Linux;FreeBSD;NetBSD;illumos;Solaris ;$(SupportedPackageOSGroups); diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs index 9a6c6d44c509..7a44e3cce019 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs @@ -287,9 +287,9 @@ private static Attribute[] InternalParamGetCustomAttributes(ParameterInfo param, count = 0; for (int i = 0; i < objAttr.Length; i++) { - if (objAttr[i] != null) + if (objAttr[i] is object attr) { - attributes[count] = (Attribute)objAttr[i]!; // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) + attributes[count] = (Attribute)attr; count++; } } diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs index 252627d27633..ef5ec5948211 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs @@ -116,7 +116,7 @@ internal override int IndexOf(T[] array, T value, int startIndex, int count) { for (int i = startIndex; i < endIndex; i++) { - if (array[i] != null && array[i]!.Equals(value)) return i; // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) + if (array[i] != null && array[i]!.Equals(value)) return i; } } return -1; @@ -136,7 +136,7 @@ internal override int LastIndexOf(T[] array, T value, int startIndex, int count) { for (int i = startIndex; i >= endIndex; i--) { - if (array[i] != null && array[i]!.Equals(value)) return i; // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) + if (array[i] != null && array[i]!.Equals(value)) return i; } } return -1; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/MulticastDelegate.cs b/src/coreclr/src/System.Private.CoreLib/src/System/MulticastDelegate.cs index bba499737c27..34d08a8b056b 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/MulticastDelegate.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/MulticastDelegate.cs @@ -160,10 +160,10 @@ private static bool TrySetSlot(object?[] a, int index, object o) // The slot may be already set because we have added and removed the same method before. // Optimize this case, because it's cheaper than copying the array. - if (a[index] != null) + if (a[index] is object ai) { MulticastDelegate d = (MulticastDelegate)o; - MulticastDelegate dd = (MulticastDelegate)a[index]!; // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) + MulticastDelegate dd = (MulticastDelegate)ai; if (dd._methodPtr == d._methodPtr && dd._target == d._target && diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs index acdf1663b80c..23a973f15ae3 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs @@ -1622,14 +1622,14 @@ internal void AddLocalSymInfoToCurrentScope( { int i = GetCurrentActiveScopeIndex(); m_localSymInfos[i] ??= new LocalSymInfo(); - m_localSymInfos[i]!.AddLocalSymInfo(strName, signature, slot, startOffset, endOffset); // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) + m_localSymInfos[i]!.AddLocalSymInfo(strName, signature, slot, startOffset, endOffset); } internal void AddUsingNamespaceToCurrentScope(string strNamespace) { int i = GetCurrentActiveScopeIndex(); m_localSymInfos[i] ??= new LocalSymInfo(); - m_localSymInfos[i]!.AddUsingNamespace(strNamespace); // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) + m_localSymInfos[i]!.AddUsingNamespace(strNamespace); } internal void AddScopeInfo(ScopeAction sa, int iOffset) @@ -1693,9 +1693,9 @@ internal void EmitScopeTree(ISymbolWriter symWriter) { symWriter.CloseScope(m_iOffsets[i]); } - if (m_localSymInfos[i] != null) + if (m_localSymInfos[i] is LocalSymInfo lsi) { - m_localSymInfos[i]!.EmitLocalSymInfo(symWriter); // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) + lsi.EmitLocalSymInfo(symWriter); } } } diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs index 744efa515e3c..f76df3efa491 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs @@ -3900,9 +3900,9 @@ private void CreateInstanceCheckThis() Type[] argsType = new Type[args.Length]; for (int i = 0; i < args.Length; i++) { - if (args[i] != null) + if (args[i] is object arg) { - argsType[i] = args[i]!.GetType(); // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) + argsType[i] = arg.GetType(); } } diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/StubHelpers.cs b/src/coreclr/src/System.Private.CoreLib/src/System/StubHelpers.cs index 1c4a5649c251..a12b3f211d74 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/StubHelpers.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/StubHelpers.cs @@ -584,7 +584,7 @@ internal static class InterfaceMarshaler internal static extern IntPtr ConvertToNative(object objSrc, IntPtr itfMT, IntPtr classMT, int flags); [MethodImpl(MethodImplOptions.InternalCall)] - internal static extern object ConvertToManaged(IntPtr ppUnk, IntPtr itfMT, IntPtr classMT, int flags); + internal static extern object ConvertToManaged(ref IntPtr ppUnk, IntPtr itfMT, IntPtr classMT, int flags); [DllImport(RuntimeHelpers.QCall)] internal static extern void ClearNative(IntPtr pUnk); diff --git a/src/coreclr/src/ToolBox/superpmi/readme.md b/src/coreclr/src/ToolBox/superpmi/readme.md index 7b6be5693b93..e5e64514dd20 100644 --- a/src/coreclr/src/ToolBox/superpmi/readme.md +++ b/src/coreclr/src/ToolBox/superpmi/readme.md @@ -78,7 +78,7 @@ To manually do a collection (not using the `superpmi.py` script or First, build the `dotnet/runtime` repo, which builds the `superpmi`, `mcs`, and `superpmi-shim-collector` programs, along with the rest of coreclr, and places them in the same native code directory as the JIT and the rest -of coreclr, e.g., `f:\gh\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked\superpmi.exe` +of coreclr, e.g., `f:\gh\runtime\artifacts\bin\coreclr\windows.x64.Checked\superpmi.exe` for a `dotnet/runtime` repo rooted at the `f:\gh\runtime` directory, and built on Windows for the x64 Checked architecture / build flavor combination. @@ -131,7 +131,7 @@ for example, on Windows: ``` mkdir f:\spmi\temp set SuperPMIShimLogPath=f:\spmi\temp -set SuperPMIShimPath=f:\gh\runtime\artifacts\tests\coreclr\Windows_NT.x64.Checked\Tests\Core_Root\clrjit.dll +set SuperPMIShimPath=f:\gh\runtime\artifacts\tests\coreclr\windows.x64.Checked\Tests\Core_Root\clrjit.dll set COMPlus_AltJit=* set COMPlus_AltJitNgen=* set COMPlus_AltJitName=superpmi-shim-collector.dll @@ -181,7 +181,7 @@ the initial collection). So, for the example above, you might use: ``` -f:\gh\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked\mcs.exe -merge f:\spmi\base.mch f:\spmi\temp\*.mc -recursive -dedup -thin +f:\gh\runtime\artifacts\bin\coreclr\windows.x64.Checked\mcs.exe -merge f:\spmi\base.mch f:\spmi\temp\*.mc -recursive -dedup -thin ``` Note that `mcs -merge` without `-dedup -thin` is literally just a file concatenation @@ -210,7 +210,7 @@ the ways in which we normally use SuperPMI. For the continuing example, you might use: ``` -f:\gh\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked\mcs.exe -removeDup -thin f:\spmi\base.mch f:\spmi\unique.mch +f:\gh\runtime\artifacts\bin\coreclr\windows.x64.Checked\mcs.exe -removeDup -thin f:\spmi\base.mch f:\spmi\unique.mch ``` After this step, you can remove the base.mch file (unless you want to debug @@ -234,8 +234,8 @@ mcs.exe -strip basefail.mcl unique.mch final.mch Or, continuing the example above, giving full paths, we have: ``` -f:\gh\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked\superpmi.exe -p -f f:\spmi\basefail.mcl f:\spmi\unique.mch f:\gh\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked\clrjit.dll -f:\gh\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked\mcs.exe -strip f:\spmi\basefail.mcl f:\spmi\unique.mch f:\spmi\final.mch +f:\gh\runtime\artifacts\bin\coreclr\windows.x64.Checked\superpmi.exe -p -f f:\spmi\basefail.mcl f:\spmi\unique.mch f:\gh\runtime\artifacts\bin\coreclr\windows.x64.Checked\clrjit.dll +f:\gh\runtime\artifacts\bin\coreclr\windows.x64.Checked\mcs.exe -strip f:\spmi\basefail.mcl f:\spmi\unique.mch f:\spmi\final.mch ``` @@ -250,7 +250,7 @@ mcs -toc final.mch or, using the full paths from above: ``` -f:\gh\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked\mcs.exe -toc f:\spmi\final.mch +f:\gh\runtime\artifacts\bin\coreclr\windows.x64.Checked\mcs.exe -toc f:\spmi\final.mch ``` @@ -265,7 +265,7 @@ superpmi -p -f finalfail.mcl final.mch clrjit.dll Or, continuing the example above, giving full paths, we have: ``` -f:\gh\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked\superpmi.exe -p -f f:\spmi\finalfail.mcl f:\spmi\final.mch f:\gh\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked\clrjit.dll +f:\gh\runtime\artifacts\bin\coreclr\windows.x64.Checked\superpmi.exe -p -f f:\spmi\finalfail.mcl f:\spmi\final.mch f:\gh\runtime\artifacts\bin\coreclr\windows.x64.Checked\clrjit.dll ``` In this case, if `finalfail.mcl` is not empty, there was a failure in the final "check" replay. diff --git a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/standardpch.h b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/standardpch.h index 8aa6a1acbbdd..e6ba1478e42b 100644 --- a/src/coreclr/src/ToolBox/superpmi/superpmi-shared/standardpch.h +++ b/src/coreclr/src/ToolBox/superpmi/superpmi-shared/standardpch.h @@ -3,6 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // +#ifndef STANDARDPCH_H +#define STANDARDPCH_H + // The point of a PCH file is to never reparse files that never change. // Only include files here that will almost NEVER change. Headers for the project // itself are probably inappropriate, because if you change them, the entire @@ -117,3 +120,4 @@ static inline void __debugbreak() } #endif +#endif // STANDARDPCH_H diff --git a/src/coreclr/src/classlibnative/bcltype/system.cpp b/src/coreclr/src/classlibnative/bcltype/system.cpp index 74623125fdf4..3660c14963df 100644 --- a/src/coreclr/src/classlibnative/bcltype/system.cpp +++ b/src/coreclr/src/classlibnative/bcltype/system.cpp @@ -590,23 +590,6 @@ FCIMPL0(FC_BOOL_RET, SystemNative::IsServerGC) } FCIMPLEND -#ifdef FEATURE_COMINTEROP - -BOOL QCALLTYPE SystemNative::WinRTSupported() -{ - QCALL_CONTRACT; - - BOOL hasWinRT = FALSE; - - BEGIN_QCALL; - hasWinRT = ::WinRTSupported(); - END_QCALL; - - return hasWinRT; -} - -#endif // FEATURE_COMINTEROP - #if defined(TARGET_X86) || defined(TARGET_AMD64) void QCALLTYPE SystemNative::X86BaseCpuId(int cpuInfo[4], int functionId, int subFunctionId) diff --git a/src/coreclr/src/classlibnative/bcltype/system.h b/src/coreclr/src/classlibnative/bcltype/system.h index ff6720f0a8c0..5bbf73d4a104 100644 --- a/src/coreclr/src/classlibnative/bcltype/system.h +++ b/src/coreclr/src/classlibnative/bcltype/system.h @@ -73,11 +73,6 @@ class SystemNative static FCDECL0(FC_BOOL_RET, IsServerGC); -#ifdef FEATURE_COMINTEROP - static - BOOL QCALLTYPE WinRTSupported(); -#endif // FEATURE_COMINTEROP - // Return a method info for the method were the exception was thrown static FCDECL1(ReflectMethodObject*, GetMethodFromStackTrace, ArrayBase* pStackTraceUNSAFE); diff --git a/src/coreclr/src/debug/daccess/daccess.cpp b/src/coreclr/src/debug/daccess/daccess.cpp index 0344ddc1a3fb..424cff1b9148 100644 --- a/src/coreclr/src/debug/daccess/daccess.cpp +++ b/src/coreclr/src/debug/daccess/daccess.cpp @@ -40,7 +40,6 @@ extern bool TryGetSymbol(ICorDebugDataTarget* dataTarget, uint64_t baseAddress, CRITICAL_SECTION g_dacCritSec; ClrDataAccess* g_dacImpl; -HINSTANCE g_thisModule; EXTERN_C #ifdef TARGET_UNIX @@ -75,9 +74,6 @@ BOOL WINAPI DllMain(HANDLE instance, DWORD reason, LPVOID reserved) #endif InitializeCriticalSection(&g_dacCritSec); - // Save the module handle. - g_thisModule = (HINSTANCE)instance; - g_procInitialized = true; break; } @@ -95,12 +91,6 @@ BOOL WINAPI DllMain(HANDLE instance, DWORD reason, LPVOID reserved) return TRUE; } -HINSTANCE -GetModuleInst(void) -{ - return g_thisModule; -} - HRESULT ConvertUtf8(__in LPCUTF8 utf8, ULONG32 bufLen, @@ -5622,16 +5612,6 @@ ClrDataAccess::Initialize(void) // Do some validation IfFailRet(VerifyDlls()); - // To support EH SxS, utilcode requires the base address of the runtime - // as part of its initialization so that functions like "WasThrownByUs" work correctly since - // they use the CLR base address to check if an exception was raised by a given instance of the runtime - // or not. - // - // Thus, when DAC is initialized, initialize utilcode with the base address of the runtime loaded in the - // target process. This is similar to work done in CorDB::SetTargetCLR for mscordbi. - - g_hmodCoreCLR = (HINSTANCE)m_globalBase; // Base address of the runtime in the target process - return S_OK; } diff --git a/src/coreclr/src/debug/daccess/dacimpl.h b/src/coreclr/src/debug/daccess/dacimpl.h index fdea07159d26..717c6cf07ed5 100644 --- a/src/coreclr/src/debug/daccess/dacimpl.h +++ b/src/coreclr/src/debug/daccess/dacimpl.h @@ -127,9 +127,6 @@ enum DAC_USAGE_TYPE DAC_PAL, }; -// mscordacwks's module handle -extern HINSTANCE g_thisModule; - class ReflectionModule; struct DAC_MD_IMPORT diff --git a/src/coreclr/src/debug/daccess/request.cpp b/src/coreclr/src/debug/daccess/request.cpp index 99366e980e26..6523b40f2413 100644 --- a/src/coreclr/src/debug/daccess/request.cpp +++ b/src/coreclr/src/debug/daccess/request.cpp @@ -3889,12 +3889,22 @@ HRESULT ClrDataAccess::GetTLSIndex(ULONG *pIndex) return hr; } +#ifndef TARGET_UNIX +extern "C" IMAGE_DOS_HEADER __ImageBase; +#endif + HRESULT ClrDataAccess::GetDacModuleHandle(HMODULE *phModule) { if(phModule == NULL) return E_INVALIDARG; - *phModule = GetModuleInst(); + +#ifndef TARGET_UNIX + *phModule = (HMODULE)&__ImageBase; return S_OK; +#else + // hModule is not available under TARGET_UNIX + return E_FAIL; +#endif } HRESULT ClrDataAccess::GetRCWData(CLRDATA_ADDRESS addr, struct DacpRCWData *rcwData) diff --git a/src/coreclr/src/debug/debug-pal/win/diagnosticsipc.cpp b/src/coreclr/src/debug/debug-pal/win/diagnosticsipc.cpp index 9a28e482342f..fe7828daf78b 100644 --- a/src/coreclr/src/debug/debug-pal/win/diagnosticsipc.cpp +++ b/src/coreclr/src/debug/debug-pal/win/diagnosticsipc.cpp @@ -134,6 +134,7 @@ IpcStream *IpcStream::DiagnosticsIpc::Accept(ErrorCallback callback) _ASSERTE(mode == ConnectionMode::LISTEN); DWORD dwDummy = 0; + IpcStream *pStream = nullptr; bool fSuccess = GetOverlappedResult( _hPipe, // handle &_oOverlap, // overlapped @@ -144,11 +145,14 @@ IpcStream *IpcStream::DiagnosticsIpc::Accept(ErrorCallback callback) { if (callback != nullptr) callback("Failed to GetOverlappedResults for NamedPipe server", ::GetLastError()); - return nullptr; + // close the pipe (cleaned up and reset below) + ::CloseHandle(_hPipe); + } + else + { + // create new IpcStream using handle (passes ownership to pStream) + pStream = new IpcStream(_hPipe, ConnectionMode::LISTEN); } - - // create new IpcStream using handle and reset the Server object so it can listen again - IpcStream *pStream = new IpcStream(_hPipe, ConnectionMode::LISTEN); // reset the server _hPipe = INVALID_HANDLE_VALUE; @@ -159,7 +163,7 @@ IpcStream *IpcStream::DiagnosticsIpc::Accept(ErrorCallback callback) if (!fSuccess) { delete pStream; - return nullptr; + pStream = nullptr; } return pStream; @@ -434,43 +438,42 @@ bool IpcStream::Read(void *lpBuffer, const uint32_t nBytesToRead, uint32_t &nByt if (!fSuccess) { + DWORD dwError = GetLastError(); + // if we're waiting infinitely, only make one syscall - if (timeoutMs == InfiniteTimeout) + if (timeoutMs == InfiniteTimeout && dwError == ERROR_IO_PENDING) { fSuccess = GetOverlappedResult(_hPipe, // pipe overlap, // overlapped &nNumberOfBytesRead, // out actual number of bytes read true) != 0; // block until async IO completes } - else + else if (dwError == ERROR_IO_PENDING) { - DWORD dwError = GetLastError(); - if (dwError == ERROR_IO_PENDING) + // Wait on overlapped IO event (triggers when async IO is complete regardless of success) + // or timeout + DWORD dwWait = WaitForSingleObject(_oOverlap.hEvent, (DWORD)timeoutMs); + if (dwWait == WAIT_OBJECT_0) { - // Wait on overlapped IO event (triggers when async IO is complete regardless of success) - // or timeout - DWORD dwWait = WaitForSingleObject(_oOverlap.hEvent, (DWORD)timeoutMs); - if (dwWait == WAIT_OBJECT_0) - { - // async IO compelted, get the result - fSuccess = GetOverlappedResult(_hPipe, // pipe - overlap, // overlapped - &nNumberOfBytesRead, // out actual number of bytes read - true) != 0; // block until async IO completes - } - else + // async IO compelted, get the result + fSuccess = GetOverlappedResult(_hPipe, // pipe + overlap, // overlapped + &nNumberOfBytesRead, // out actual number of bytes read + true) != 0; // block until async IO completes + } + else + { + // We either timed out or something else went wrong. + // For any error, attempt to cancel IO and ensure the cancel happened + if (CancelIoEx(_hPipe, overlap) != 0) { - // We either timed out or something else went wrong. - // For any error, attempt to cancel IO and ensure the cancel happened - if (CancelIoEx(_hPipe, overlap) != 0) - { - // check if the async write beat the cancellation - fSuccess = GetOverlappedResult(_hPipe, overlap, &nNumberOfBytesRead, true) != 0; - // Failure here isn't recoverable, so return as such - } + // check if the async write beat the cancellation + fSuccess = GetOverlappedResult(_hPipe, overlap, &nNumberOfBytesRead, true) != 0; + // Failure here isn't recoverable, so return as such } } } + // error is unrecoverable, so return as such } nBytesRead = static_cast(nNumberOfBytesRead); @@ -492,43 +495,42 @@ bool IpcStream::Write(const void *lpBuffer, const uint32_t nBytesToWrite, uint32 if (!fSuccess) { + DWORD dwError = GetLastError(); + // if we're waiting infinitely, only make one syscall - if (timeoutMs == InfiniteTimeout) + if (timeoutMs == InfiniteTimeout && dwError == ERROR_IO_PENDING) { fSuccess = GetOverlappedResult(_hPipe, // pipe overlap, // overlapped &nNumberOfBytesWritten, // out actual number of bytes written true) != 0; // block until async IO completes } - else + else if (dwError == ERROR_IO_PENDING) { - DWORD dwError = GetLastError(); - if (dwError == ERROR_IO_PENDING) + // Wait on overlapped IO event (triggers when async IO is complete regardless of success) + // or timeout + DWORD dwWait = WaitForSingleObject(_oOverlap.hEvent, (DWORD)timeoutMs); + if (dwWait == WAIT_OBJECT_0) { - // Wait on overlapped IO event (triggers when async IO is complete regardless of success) - // or timeout - DWORD dwWait = WaitForSingleObject(_oOverlap.hEvent, (DWORD)timeoutMs); - if (dwWait == WAIT_OBJECT_0) - { - // async IO compelted, get the result - fSuccess = GetOverlappedResult(_hPipe, // pipe - overlap, // overlapped - &nNumberOfBytesWritten, // out actual number of bytes written - true) != 0; // block until async IO completes - } - else + // async IO compelted, get the result + fSuccess = GetOverlappedResult(_hPipe, // pipe + overlap, // overlapped + &nNumberOfBytesWritten, // out actual number of bytes written + true) != 0; // block until async IO completes + } + else + { + // We either timed out or something else went wrong. + // For any error, attempt to cancel IO and ensure the cancel happened + if (CancelIoEx(_hPipe, overlap) != 0) { - // We either timed out or something else went wrong. - // For any error, attempt to cancel IO and ensure the cancel happened - if (CancelIoEx(_hPipe, overlap) != 0) - { - // check if the async write beat the cancellation - fSuccess = GetOverlappedResult(_hPipe, overlap, &nNumberOfBytesWritten, true) != 0; - // Failure here isn't recoverable, so return as such - } + // check if the async write beat the cancellation + fSuccess = GetOverlappedResult(_hPipe, overlap, &nNumberOfBytesWritten, true) != 0; + // Failure here isn't recoverable, so return as such } } } + // error is unrecoverable, so return as such } nBytesWritten = static_cast(nNumberOfBytesWritten); diff --git a/src/coreclr/src/debug/di/cordb.cpp b/src/coreclr/src/debug/di/cordb.cpp index 673d48c8ab8f..2c11397fcd3b 100644 --- a/src/coreclr/src/debug/di/cordb.cpp +++ b/src/coreclr/src/debug/di/cordb.cpp @@ -26,11 +26,6 @@ #define SUPPORT_LOCAL_DEBUGGING 1 #endif -//********** Globals. ********************************************************* -#ifndef HOST_UNIX -HINSTANCE g_hInst; // Instance handle to this piece of code. -#endif - //----------------------------------------------------------------------------- // SxS Versioning story for Mscordbi (ICorDebug + friends) //----------------------------------------------------------------------------- @@ -200,9 +195,7 @@ BOOL WINAPI DbgDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) case DLL_PROCESS_ATTACH: { -#ifndef HOST_UNIX - g_hInst = hInstance; -#else +#ifdef HOST_UNIX int err = PAL_InitializeDLL(); if(err != 0) { @@ -438,17 +431,6 @@ HRESULT STDMETHODCALLTYPE CClassFactory::LockServer( } -//***************************************************************************** -// This helper provides access to the instance handle of the loaded image. -//***************************************************************************** -#ifndef TARGET_UNIX -HINSTANCE GetModuleInst() -{ - return g_hInst; -} -#endif - - //----------------------------------------------------------------------------- // Substitute for mscoree // diff --git a/src/coreclr/src/debug/di/module.cpp b/src/coreclr/src/debug/di/module.cpp index 39f306f7c0f4..88a6e366286b 100644 --- a/src/coreclr/src/debug/di/module.cpp +++ b/src/coreclr/src/debug/di/module.cpp @@ -2565,7 +2565,7 @@ HRESULT CordbModule::CreateReaderForInMemorySymbols(REFIID riid, void** ppObj) #ifndef TARGET_UNIX // PDB format - use diasymreader.dll with COM activation InlineSString<_MAX_PATH> ssBuf; - IfFailThrow(GetHModuleDirectory(GetModuleInst(), ssBuf)); + IfFailThrow(GetClrModuleDirectory(ssBuf)); IfFailThrow(FakeCoCreateInstanceEx(CLSID_CorSymBinder_SxS, ssBuf.GetUnicode(), IID_ISymUnmanagedBinder, diff --git a/src/coreclr/src/debug/di/rsmain.cpp b/src/coreclr/src/debug/di/rsmain.cpp index 11d5fcf4b1a8..779a6eac56d2 100644 --- a/src/coreclr/src/debug/di/rsmain.cpp +++ b/src/coreclr/src/debug/di/rsmain.cpp @@ -456,6 +456,7 @@ void LeftSideResourceCleanupList::SweepNeuterLeftSideResources(CordbProcess * pP /* ------------------------------------------------------------------------- * * CordbBase class * ------------------------------------------------------------------------- */ +extern void* GetClrModuleBase(); // Do any initialization necessary for both CorPublish and CorDebug // This includes enabling logging and adding the SEDebug priv. @@ -488,11 +489,7 @@ void CordbCommonBase::InitializeCommon() unsigned level = REGUTIL::GetConfigDWORD_DontUse_(CLRConfig::EXTERNAL_LogLevel, LL_INFO1000); unsigned bytesPerThread = REGUTIL::GetConfigDWORD_DontUse_(CLRConfig::UNSUPPORTED_StressLogSize, STRESSLOG_CHUNK_SIZE * 2); unsigned totalBytes = REGUTIL::GetConfigDWORD_DontUse_(CLRConfig::UNSUPPORTED_TotalStressLogSize, STRESSLOG_CHUNK_SIZE * 1024); -#ifndef TARGET_UNIX - StressLog::Initialize(facilities, level, bytesPerThread, totalBytes, GetModuleInst()); -#else - StressLog::Initialize(facilities, level, bytesPerThread, totalBytes, NULL); -#endif + StressLog::Initialize(facilities, level, bytesPerThread, totalBytes, GetClrModuleBase()); } } @@ -1427,13 +1424,6 @@ HRESULT Cordb::SetTargetCLR(HMODULE hmodTargetCLR) m_targetCLR = hmodTargetCLR; #endif - // @REVIEW: are we happy with this workaround? It allows us to use the existing - // infrastructure for instance name decoration, but it really doesn't fit - // the same model because coreclr.dll isn't in this process and hmodTargetCLR - // is the debuggee target, not the coreclr.dll to bind utilcode to.. - - g_hmodCoreCLR = hmodTargetCLR; - return S_OK; } diff --git a/src/coreclr/src/debug/di/rspriv.h b/src/coreclr/src/debug/di/rspriv.h index 5cbba66aaf18..5777f29f233f 100644 --- a/src/coreclr/src/debug/di/rspriv.h +++ b/src/coreclr/src/debug/di/rspriv.h @@ -134,12 +134,6 @@ class DbgTransportSession; // These hooks must be removed before shipping. class ShimProcess; - -#ifndef TARGET_UNIX -extern HINSTANCE GetModuleInst(); -#endif - - template class CordbSafeHashTable; diff --git a/src/coreclr/src/debug/di/shimprocess.cpp b/src/coreclr/src/debug/di/shimprocess.cpp index 685c4f2b3018..72da6068e823 100644 --- a/src/coreclr/src/debug/di/shimprocess.cpp +++ b/src/coreclr/src/debug/di/shimprocess.cpp @@ -1824,34 +1824,19 @@ HMODULE ShimProcess::GetDacModule() HModuleHolder hDacDll; PathString wszAccessDllPath; -#ifdef TARGET_UNIX - if (!PAL_GetPALDirectoryWrapper(wszAccessDllPath)) - { - ThrowLastError(); - } - PCWSTR eeFlavor = MAKEDLLNAME_W(W("mscordaccore")); -#else // // Load the access DLL from the same directory as the the current CLR Debugging Services DLL. // - - if (!WszGetModuleFileName(GetModuleInst(), wszAccessDllPath)) + if (GetClrModuleDirectory(wszAccessDllPath) != S_OK) { ThrowLastError(); } - if (!SUCCEEDED(CopySystemDirectory(wszAccessDllPath, wszAccessDllPath))) - { - ThrowHR(E_INVALIDARG); - } - // Dac Dll is named: // mscordaccore.dll <-- coreclr // mscordacwks.dll <-- desktop - PCWSTR eeFlavor = - W("mscordaccore.dll"); + PCWSTR eeFlavor = MAKEDLLNAME_W(W("mscordaccore")); -#endif // TARGET_UNIX wszAccessDllPath.Append(eeFlavor); hDacDll.Assign(WszLoadLibrary(wszAccessDllPath)); diff --git a/src/coreclr/src/debug/ee/debugger.cpp b/src/coreclr/src/debug/ee/debugger.cpp index 79d8dd0e6af2..a84b6d6ef613 100644 --- a/src/coreclr/src/debug/ee/debugger.cpp +++ b/src/coreclr/src/debug/ee/debugger.cpp @@ -1750,7 +1750,7 @@ void Debugger::SendRawEvent(const DebuggerIPCEvent * pManagedEvent) // The debugger can then use ReadProcessMemory to read through this array. ULONG_PTR rgData [] = { CLRDBG_EXCEPTION_DATA_CHECKSUM, - (ULONG_PTR) g_hThisInst, + (ULONG_PTR)GetClrModuleBase(), (ULONG_PTR) pManagedEvent }; @@ -5668,7 +5668,7 @@ bool Debugger::FirstChanceNativeException(EXCEPTION_RECORD *exception, // Ignore any notification exceptions sent from code:Debugger.SendRawEvent. // This is not a common case, but could happen in some cases described // in SendRawEvent. Either way, Left-Side and VM should just ignore these. - if (IsEventDebuggerNotification(exception, PTR_TO_CORDB_ADDRESS(g_hThisInst))) + if (IsEventDebuggerNotification(exception, PTR_TO_CORDB_ADDRESS(GetClrModuleBase()))) { return true; } @@ -12363,7 +12363,7 @@ void Debugger::GetAndSendTransitionStubInfo(CORDB_ADDRESS_TYPE *stubAddress) // If its not a stub, then maybe its an address in mscoree? if (result == false) { - result = (IsIPInModule(g_hThisInst, (PCODE)stubAddress) == TRUE); + result = (IsIPInModule(GetClrModuleBase(), (PCODE)stubAddress) == TRUE); } // This is a synchronous event (reply required) diff --git a/src/coreclr/src/dlls/mscordac/mscordac_unixexports.src b/src/coreclr/src/dlls/mscordac/mscordac_unixexports.src index a7e6a8786ed7..911ba406042a 100644 --- a/src/coreclr/src/dlls/mscordac/mscordac_unixexports.src +++ b/src/coreclr/src/dlls/mscordac/mscordac_unixexports.src @@ -30,7 +30,6 @@ nativeStringResourceTable_mscorrc #PAL_fwprintf #PAL_GetLogicalCpuCountFromOS #PAL_GetNumaProcessorNode -#PAL_GetPALDirectoryW #PAL_get_stdout #PAL_get_stderr #PAL_GetApplicationGroupId @@ -38,6 +37,7 @@ nativeStringResourceTable_mscorrc #PAL_GetCurrentThread #PAL_GetCpuLimit #PAL_GetNativeExceptionHolderHead +#PAL_GetPalHostModule #PAL_GetSymbolModuleBase #PAL_GetTransportPipeName #PAL_InitializeDLL diff --git a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt index 11dee9f699a5..7835929afc1c 100644 --- a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt +++ b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt @@ -207,7 +207,7 @@ if(CLR_CMAKE_TARGET_WIN32) DEPENDS coreclr mscordaccore mscordbi ${CLR_DIR}/src/debug/daccess/daccess.cpp OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/inject_debug_resources.timestamp COMMAND ${CMAKE_CXX_COMPILER} /P /EP /TP ${PREPROCESS_DEFINITIONS} ${INC_DIR} /Fi${CMAKE_CURRENT_BINARY_DIR}/daccess.i ${CLR_DIR}/src/debug/daccess/daccess.cpp - COMMAND ${CLR_REPO_ROOT_DIR}/dotnet.cmd exec ${CMAKE_INSTALL_PREFIX}/DacTableGen/DacTableGen.dll /dac:${CMAKE_CURRENT_BINARY_DIR}/daccess.i /pdb:$ /dll:$ /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin + COMMAND cmd /c ${CLR_REPO_ROOT_DIR}/dotnet.cmd exec ${CMAKE_INSTALL_PREFIX}/DacTableGen/DacTableGen.dll /dac:${CMAKE_CURRENT_BINARY_DIR}/daccess.i /pdb:$ /dll:$ /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin COMMAND InjectResource /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin /dll:$ COMMAND GenClrDebugResource /dac:$ /dbi:$ /sku:onecoreclr /out:${CMAKE_CURRENT_BINARY_DIR}/clrDebugResource.bin COMMAND InjectResource /bin:${CMAKE_CURRENT_BINARY_DIR}/clrDebugResource.bin /dll:$ /name:CLRDEBUGINFO diff --git a/src/coreclr/src/dlls/mscoree/mscoree.cpp b/src/coreclr/src/dlls/mscoree/mscoree.cpp index c610e9e91a10..4219910a6b3f 100644 --- a/src/coreclr/src/dlls/mscoree/mscoree.cpp +++ b/src/coreclr/src/dlls/mscoree/mscoree.cpp @@ -47,14 +47,7 @@ BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved) #endif // !defined(CROSSGEN_COMPILE) && !defined(CORECLR_EMBEDDED) -// Globals -extern HINSTANCE g_hThisInst; - -HINSTANCE GetModuleInst() -{ - LIMITED_METHOD_CONTRACT; - return (g_hThisInst); -} +extern void* GetClrModuleBase(); // --------------------------------------------------------------------------- // %%Function: MetaDataGetDispenser @@ -222,39 +215,6 @@ STDAPI ReOpenMetaDataWithMemoryEx( return hr; } -STDAPI GetCORSystemDirectoryInternaL(SString& pBuffer) -{ - CONTRACTL { - NOTHROW; - GC_NOTRIGGER; - ENTRY_POINT; - } CONTRACTL_END; - - HRESULT hr = S_OK; - BEGIN_ENTRYPOINT_NOTHROW; - - -#ifdef CROSSGEN_COMPILE - - if (WszGetModuleFileName(NULL, pBuffer) > 0) - { - hr = CopySystemDirectory(pBuffer, pBuffer); - } - else { - hr = HRESULT_FROM_GetLastError(); - } - -#else - - if (!PAL_GetPALDirectoryWrapper(pBuffer)) { - hr = HRESULT_FROM_GetLastError(); - } -#endif - - END_ENTRYPOINT_NOTHROW; - return hr; -} - static DWORD g_dwSystemDirectory = 0; static WCHAR * g_pSystemDirectory = NULL; @@ -326,8 +286,7 @@ HRESULT SetInternalSystemDirectory() // use local buffer for thread safety PathString wzSystemDirectory; - - hr = GetCORSystemDirectoryInternaL(wzSystemDirectory); + hr = GetClrModuleDirectory(wzSystemDirectory); if (FAILED(hr)) { wzSystemDirectory.Set(W('\0')); diff --git a/src/coreclr/src/dlls/mscoree/stdafx.h b/src/coreclr/src/dlls/mscoree/stdafx.h index 1573727298fe..1e29b9f0597e 100644 --- a/src/coreclr/src/dlls/mscoree/stdafx.h +++ b/src/coreclr/src/dlls/mscoree/stdafx.h @@ -17,8 +17,4 @@ #include "intrinsic.h" // Functions to make intrinsic. - -// Helper function returns the instance handle of this module. -HINSTANCE GetModuleInst(); - #endif // __STDAFX_H__ diff --git a/src/coreclr/src/gc/env/etmdummy.h b/src/coreclr/src/gc/env/etmdummy.h index 3d0e220f436f..0605f03a98ed 100644 --- a/src/coreclr/src/gc/env/etmdummy.h +++ b/src/coreclr/src/gc/env/etmdummy.h @@ -129,6 +129,7 @@ #define FireEtwMethodJitInliningFailed(MethodBeingCompiledNamespace, MethodBeingCompiledName, MethodBeingCompiledNameSignature, InlinerNamespace, InlinerName, InlinerNameSignature, InlineeNamespace, InlineeName, InlineeNameSignature, FailAlways, FailReason, ClrInstanceID) 0 #define FireEtwMethodJitTailCallSucceeded(MethodBeingCompiledNamespace, MethodBeingCompiledName, MethodBeingCompiledNameSignature, CallerNamespace, CallerName, CallerNameSignature, CalleeNamespace, CalleeName, CalleeNameSignature, TailPrefix, TailCallType, ClrInstanceID) 0 #define FireEtwMethodJitTailCallFailed(MethodBeingCompiledNamespace, MethodBeingCompiledName, MethodBeingCompiledNameSignature, CallerNamespace, CallerName, CallerNameSignature, CalleeNamespace, CalleeName, CalleeNameSignature, TailPrefix, FailReason, ClrInstanceID) 0 +#define FireEtwMethodJitMemoryAllocatedForCode(MethodID, ModuleID, JitHotCodeRequestSize, JitRODataRequestSize, AllocatedSizeForJitCode, JitAllocFlag, ClrInstanceID) 0 #define FireEtwMethodILToNativeMap(MethodID, ReJITID, MethodExtent, CountOfMapEntries, ILOffsets, NativeOffsets, ClrInstanceID) 0 #define FireEtwModuleDCStartV2(ModuleID, AssemblyID, ModuleFlags, Reserved1, ModuleILPath, ModuleNativePath) 0 #define FireEtwModuleDCEndV2(ModuleID, AssemblyID, ModuleFlags, Reserved1, ModuleILPath, ModuleNativePath) 0 diff --git a/src/coreclr/src/gc/gc.cpp b/src/coreclr/src/gc/gc.cpp index 9f022df84657..38b6d8e97d56 100644 --- a/src/coreclr/src/gc/gc.cpp +++ b/src/coreclr/src/gc/gc.cpp @@ -2616,6 +2616,7 @@ alloc_list gc_heap::poh_alloc_list [NUM_POH_ALIST-1]; #ifdef DOUBLY_LINKED_FL // size we removed with no undo; only for recording purpose size_t gc_heap::gen2_removed_no_undo = 0; +size_t gc_heap::saved_pinned_plug_index = 0; #endif //DOUBLY_LINKED_FL dynamic_data gc_heap::dynamic_data_table [total_generation_count]; @@ -3795,6 +3796,10 @@ class CObjectHeader : public Object } void ClearFreeObjInCompactBit() { +#ifdef _DEBUG + // check this looks like an object + Validate(); +#endif //_DEBUG RawSetMethodTable((MethodTable *)(((size_t) RawGetMethodTable()) & (~MAKE_FREE_OBJ_IN_COMPACT))); } #endif //DOUBLY_LINKED_FL @@ -11783,7 +11788,7 @@ void gc_heap::adjust_limit (uint8_t* start, size_t limit_size, generation* gen) // This means we cannot simply make a filler free object right after what's allocated in this alloc context if // that's < 5-ptr sized. // - if (allocated_size < min_free_item_no_prev) + if (allocated_size <= min_free_item_no_prev) { // We can't make the free object just yet. Need to record the size. size_t* filler_free_obj_size_location = (size_t*)(generation_allocation_context_start_region (gen) + min_free_item_no_prev); @@ -11803,7 +11808,26 @@ void gc_heap::adjust_limit (uint8_t* start, size_t limit_size, generation* gen) generation_free_obj_space (gen) += filler_free_obj_size; *filler_free_obj_size_location = filler_free_obj_size; uint8_t* old_loc = generation_last_free_list_allocated (gen); - set_free_obj_in_compact_bit (old_loc); + + // check if old_loc happens to be in a saved plug_and_gap with a pinned plug after it + uint8_t* saved_plug_and_gap = pinned_plug (pinned_plug_of (saved_pinned_plug_index)) - sizeof(plug_and_gap); + size_t offset = old_loc - saved_plug_and_gap; + if (offset < sizeof(gap_reloc_pair)) + { + // the object at old_loc must be at least min_obj_size + assert (offset <= sizeof(plug_and_gap) - min_obj_size); + + // if so, set the bit in the saved info instead + set_free_obj_in_compact_bit ((uint8_t*)(&pinned_plug_of (saved_pinned_plug_index)->saved_pre_plug_reloc) + offset); + } + else + { +#ifdef _DEBUG + // check this looks like an object + header(old_loc)->Validate(); +#endif //_DEBUG + set_free_obj_in_compact_bit (old_loc); + } dprintf (3333, ("[h%d] ac: %Ix->%Ix((%Id < %Id), Pset %Ix s->%Id", heap_number, generation_allocation_context_start_region (gen), generation_allocation_pointer (gen), @@ -23334,6 +23358,12 @@ void gc_heap::store_plug_gap_info (uint8_t* plug_start, if (save_pre_plug_info_p) { +#ifdef DOUBLY_LINKED_FL + if (last_object_in_last_plug == generation_last_free_list_allocated(generation_of(max_generation))) + { + saved_pinned_plug_index = mark_stack_tos; + } +#endif //DOUBLY_LINKED_FL set_gap_size (plug_start, sizeof (gap_reloc_pair)); } } @@ -23718,6 +23748,7 @@ void gc_heap::plan_phase (int condemned_gen_number) #ifdef DOUBLY_LINKED_FL gen2_removed_no_undo = 0; + saved_pinned_plug_index = 0; #endif //DOUBLY_LINKED_FL while (1) @@ -26606,7 +26637,7 @@ void gc_heap::gcmemcopy (uint8_t* dest, uint8_t* src, size_t len, BOOL copy_car } BOOL make_free_obj_p = FALSE; - if (len < min_free_item_no_prev) + if (len <= min_free_item_no_prev) { make_free_obj_p = is_free_obj_in_compact_bit_set (src); @@ -26869,6 +26900,7 @@ void gc_heap::compact_in_brick (uint8_t* tree, compact_args* args) uint8_t* gap = (plug - gap_size); uint8_t* last_plug_end = gap; size_t last_plug_size = (last_plug_end - args->last_plug); + assert ((last_plug_size & (sizeof(PTR_PTR) - 1)) == 0); dprintf (3, ("tree: %Ix, last_plug: %Ix, gap: %Ix(%Ix), last_plug_end: %Ix, size: %Ix", tree, args->last_plug, gap, gap_size, last_plug_end, last_plug_size)); @@ -34705,6 +34737,12 @@ void gc_heap::background_sweep() current_bgc_state = bgc_sweep_soh; verify_soh_segment_list(); +#ifdef DOUBLY_LINKED_FL + // set the initial segment and position so that foreground GC knows where BGC is with the sweep + current_sweep_seg = heap_segment_rw (generation_start_segment (generation_of (max_generation))); + current_sweep_pos = 0; +#endif //DOUBLY_LINKED_FL + #ifdef FEATURE_BASICFREEZE generation* max_gen = generation_of (max_generation); if ((generation_start_segment (max_gen) != ephemeral_heap_segment) && diff --git a/src/coreclr/src/gc/gchandletable.cpp b/src/coreclr/src/gc/gchandletable.cpp index 9934889e58e4..3f69dbd1ef03 100644 --- a/src/coreclr/src/gc/gchandletable.cpp +++ b/src/coreclr/src/gc/gchandletable.cpp @@ -99,7 +99,7 @@ IGCHandleStore* GCHandleManager::CreateHandleStore() return store; #else - assert("CreateHandleStore is not implemented when FEATURE_REDHAWK is defined!"); + assert(!"CreateHandleStore is not implemented when FEATURE_REDHAWK is defined!"); return nullptr; #endif } diff --git a/src/coreclr/src/gc/gcpriv.h b/src/coreclr/src/gc/gcpriv.h index 189ad57bc069..23f5bc836339 100644 --- a/src/coreclr/src/gc/gcpriv.h +++ b/src/coreclr/src/gc/gcpriv.h @@ -66,7 +66,7 @@ inline void FATAL_GC_ERROR() // We need the lower 3 bits in the MT to do our bookkeeping so doubly linked free list is only for 64-bit #ifdef HOST_64BIT // To be enabled. -//#define DOUBLY_LINKED_FL +// #define DOUBLY_LINKED_FL #endif //HOST_64BIT #ifndef FEATURE_REDHAWK @@ -4091,6 +4091,9 @@ class gc_heap // accounting into the alloc_list class. PER_HEAP size_t gen2_removed_no_undo; + + PER_HEAP + size_t saved_pinned_plug_index; #endif //DOUBLY_LINKED_FL PER_HEAP diff --git a/src/coreclr/src/gcdump/i386/gcdumpx86.cpp b/src/coreclr/src/gcdump/i386/gcdumpx86.cpp index 92b64430aece..1bf3e61011bd 100644 --- a/src/coreclr/src/gcdump/i386/gcdumpx86.cpp +++ b/src/coreclr/src/gcdump/i386/gcdumpx86.cpp @@ -255,7 +255,7 @@ size_t GCDump::DumpGCTable(PTR_CBYTE table, table = DumpEncoding(table, sz); - _ASSERTE(0 == ~OFFSET_MASK % sizeof(void*)); + _ASSERTE(0 == ~OFFSET_MASK % sizeof(uint32_t)); lowBits = OFFSET_MASK & stkOffs; stkOffs &= ~OFFSET_MASK; @@ -304,7 +304,7 @@ size_t GCDump::DumpGCTable(PTR_CBYTE table, DumpEncoding(bp, table-bp); - _ASSERTE(0 == ~OFFSET_MASK % sizeof(void*)); + _ASSERTE(0 == ~OFFSET_MASK % sizeof(uint32_t)); lowBits = varOffs & 0x3; varOffs &= ~OFFSET_MASK; diff --git a/src/coreclr/src/inc/clrhost.h b/src/coreclr/src/inc/clrhost.h index 8f5f3ff03fb7..f70382cf17da 100644 --- a/src/coreclr/src/inc/clrhost.h +++ b/src/coreclr/src/inc/clrhost.h @@ -92,7 +92,7 @@ typedef Holder, VoidClrDeleteCriticalSection, NULL> CRITSEC_AllocationHolder; -HMODULE GetCLRModule (); +DWORD GetClrModulePathName(SString& buffer); extern thread_local int t_CantAllocCount; diff --git a/src/coreclr/src/inc/corcompile.h b/src/coreclr/src/inc/corcompile.h index 38e837a4ad53..8226fba3d8f0 100644 --- a/src/coreclr/src/inc/corcompile.h +++ b/src/coreclr/src/inc/corcompile.h @@ -814,10 +814,6 @@ typedef enum extern LPCWSTR CorCompileGetRuntimeDllName(CorCompileRuntimeDlls id); -// Will always return a valid HMODULE for CLR_INFO, but will return NULL for NGEN_COMPILER_INFO -// if the DLL has not yet been loaded (it does not try to cause a load). -extern HMODULE CorCompileGetRuntimeDll(CorCompileRuntimeDlls id); - struct CORCOMPILE_RUNTIME_DLL_INFO { // This structure can only contain information not updated by authenticode signing. It is required diff --git a/src/coreclr/src/inc/corpriv.h b/src/coreclr/src/inc/corpriv.h index fb0b39924cc8..003386c4d177 100644 --- a/src/coreclr/src/inc/corpriv.h +++ b/src/coreclr/src/inc/corpriv.h @@ -382,21 +382,6 @@ struct CORCOMPILE_VERSION_INFO; struct CORCOMPILE_DEPENDENCY; typedef GUID CORCOMPILE_NGEN_SIGNATURE; - -//********************************************************************** -// Internal versions of shim functions for use by the CLR. - -STDAPI GetCORSystemDirectoryInternaL( - SString& pBuffer - ); - -//LONGPATH:TODO: Remove this once Desktop usage has been removed -STDAPI GetCORSystemDirectoryInternal( - __out_ecount_part_opt(cchBuffer, *pdwLength) LPWSTR pBuffer, - DWORD cchBuffer, - __out_opt DWORD* pdwLength - ); - #endif // _CORPRIV_H_ // EOF ======================================================================= diff --git a/src/coreclr/src/inc/longfilepathwrappers.h b/src/coreclr/src/inc/longfilepathwrappers.h index 76aec1a86594..149cdcf4443a 100644 --- a/src/coreclr/src/inc/longfilepathwrappers.h +++ b/src/coreclr/src/inc/longfilepathwrappers.h @@ -106,7 +106,5 @@ DWORD WINAPI GetEnvironmentVariableWrapper( _Out_opt_ SString& lpBuffer ); -BOOL PAL_GetPALDirectoryWrapper(SString& pbuffer); - #endif //_WIN_PATH_APIS_WRAPPER_ diff --git a/src/coreclr/src/inc/readme.md b/src/coreclr/src/inc/readme.md index e8f3405859e0..ee47be8e514e 100644 --- a/src/coreclr/src/inc/readme.md +++ b/src/coreclr/src/inc/readme.md @@ -4,9 +4,9 @@ This directory has a variety of .idl files (such as corprof.idl) that need a lit the build rules would automatically convert the idls into corresponding .h/.c files and include them in compilations. On non-windows platforms we don't have an equivalent for midl.exe which did that conversion so we work around the issue by doing: -- Build on Windows as normal, which will generate files in artifacts\obj\Windows_NT.x64.Debug\src\inc\idls_out\ +- Build on Windows as normal, which will generate files in artifacts\obj\windows.x64.Debug\src\inc\idls_out\ - Copy any updated headers into src\pal\prebuilt\inc\ -- If needed, adjust any of the .cpp files in src\pal\prebuilt\idl\ by hand, using the corresponding artifacts\obj\Windows_NT.x64.Debug\src\inc\idls_out\*_i.c as a guide. Typically +- If needed, adjust any of the .cpp files in src\pal\prebuilt\idl\ by hand, using the corresponding artifacts\obj\windows.x64.Debug\src\inc\idls_out\*_i.c as a guide. Typically this is just adding MIDL_DEFINE_GUID(...) for any new classes/interfaces that have been added to the idl file. Include these src changes with the remainder of your work when you submit a PR. diff --git a/src/coreclr/src/inc/stresslog.h b/src/coreclr/src/inc/stresslog.h index e162dae9bcea..4858f6fd02b8 100644 --- a/src/coreclr/src/inc/stresslog.h +++ b/src/coreclr/src/inc/stresslog.h @@ -263,7 +263,7 @@ class ThreadStressLog; class StressLog { public: static void Initialize(unsigned facilities, unsigned level, unsigned maxBytesPerThread, - unsigned maxBytesTotal, HMODULE hMod); + unsigned maxBytesTotal, void* moduleBase); static void Terminate(BOOL fProcessDetach=FALSE); static void ThreadDetach(); // call at DllMain THREAD_DETACH if you want to recycle thread logs static int NewChunk () diff --git a/src/coreclr/src/inc/utilcode.h b/src/coreclr/src/inc/utilcode.h index 56bbd0dd2bac..84a7b89b69a7 100644 --- a/src/coreclr/src/inc/utilcode.h +++ b/src/coreclr/src/inc/utilcode.h @@ -4707,19 +4707,7 @@ FORCEINLINE void HolderSysFreeString(BSTR str) { CONTRACT_VIOLATION(ThrowsViolat typedef Wrapper BSTRHolder; -// HMODULE_TGT represents a handle to a module in the target process. In non-DAC builds this is identical -// to HMODULE (HINSTANCE), which is the base address of the module. In DAC builds this must be a target address, -// and so is represented by TADDR. - -#ifdef DACCESS_COMPILE -typedef TADDR HMODULE_TGT; -#else -typedef HMODULE HMODULE_TGT; -#endif - -BOOL IsIPInModule(HMODULE_TGT hModule, PCODE ip); - -extern HINSTANCE g_hmodCoreCLR; +BOOL IsIPInModule(PTR_VOID pModuleBaseAddress, PCODE ip); namespace UtilCode { @@ -4906,9 +4894,9 @@ inline T* InterlockedCompareExchangeT( #undef InterlockedCompareExchangePointer #define InterlockedCompareExchangePointer Use_InterlockedCompareExchangeT -// Returns the directory for HMODULE. So, if HMODULE was for "C:\Dir1\Dir2\Filename.DLL", +// Returns the directory for clr module. So, if path was for "C:\Dir1\Dir2\Filename.DLL", // then this would return "C:\Dir1\Dir2\" (note the trailing backslash). -HRESULT GetHModuleDirectory(HMODULE hMod, SString& wszPath); +HRESULT GetClrModuleDirectory(SString& wszPath); HRESULT CopySystemDirectory(const SString& pPathString, SString& pbuffer); HMODULE LoadLocalizedResourceDLLForSDK(_In_z_ LPCWSTR wzResourceDllName, _In_opt_z_ LPCWSTR modulePath=NULL, bool trySelf=true); diff --git a/src/coreclr/src/jit/assertionprop.cpp b/src/coreclr/src/jit/assertionprop.cpp index de6439fc0d8d..135bc1e5083f 100644 --- a/src/coreclr/src/jit/assertionprop.cpp +++ b/src/coreclr/src/jit/assertionprop.cpp @@ -3203,18 +3203,175 @@ GenTree* Compiler::optAssertionProp_RelOp(ASSERT_VALARG_TP assertions, GenTree* return optAssertionPropLocal_RelOp(assertions, tree, stmt); } -/************************************************************************************* - * - * Given the set of "assertions" to look up a relop assertion about the relop "tree", - * perform Value numbering based relop assertion propagation on the tree. - * - */ +//------------------------------------------------------------------------ +// optAssertionProp: try and optimize a relop via assertion propagation +// (and dominator based redundant branch elimination) +// +// Arguments: +// assertions - set of live assertions +// tree - tree to possibly optimize +// stmt - statement containing the tree +// +// Returns: +// The modified tree, or nullptr if no assertion prop took place. +// +// Notes: +// Redundant branch elimination doesn't rely on assertions currently, +// it is done here out of convenience. +// GenTree* Compiler::optAssertionPropGlobal_RelOp(ASSERT_VALARG_TP assertions, GenTree* tree, Statement* stmt) { GenTree* newTree = tree; GenTree* op1 = tree->AsOp()->gtOp1; GenTree* op2 = tree->AsOp()->gtOp2; + // First, walk up the dom tree and see if any dominating block has branched on + // exactly this tree's VN... + // + BasicBlock* prevBlock = compCurBB; + BasicBlock* domBlock = compCurBB->bbIDom; + int relopValue = -1; + + while (domBlock != nullptr) + { + if (prevBlock == compCurBB) + { + JITDUMP("\nVN relop, checking " FMT_BB " for redundancy\n", compCurBB->bbNum); + } + + // Check the current dominator + // + JITDUMP(" ... checking dom " FMT_BB "\n", domBlock->bbNum); + + if (domBlock->bbJumpKind == BBJ_COND) + { + Statement* const domJumpStmt = domBlock->lastStmt(); + GenTree* const domJumpTree = domJumpStmt->GetRootNode(); + assert(domJumpTree->OperIs(GT_JTRUE)); + GenTree* const domCmpTree = domJumpTree->AsOp()->gtGetOp1(); + + if (domCmpTree->OperKind() & GTK_RELOP) + { + ValueNum domCmpVN = domCmpTree->GetVN(VNK_Conservative); + + // Note we could also infer the tree relop's value from similar relops higher in the dom tree. + // For example, (x >= 0) dominating (x > 0), or (x < 0) dominating (x > 0). + // + // That is left as a future enhancement. + // + if (domCmpVN == tree->GetVN(VNK_Conservative)) + { + // Thes compare in "tree" is redundant. + // Is there a unique path from the dominating compare? + JITDUMP(" Redundant compare; current relop:\n"); + DISPTREE(tree); + JITDUMP(" dominating relop in " FMT_BB " with same VN:\n", domBlock->bbNum); + DISPTREE(domCmpTree); + + BasicBlock* trueSuccessor = domBlock->bbJumpDest; + BasicBlock* falseSuccessor = domBlock->bbNext; + + const bool trueReaches = fgReachable(trueSuccessor, compCurBB); + const bool falseReaches = fgReachable(falseSuccessor, compCurBB); + + if (trueReaches && falseReaches) + { + // Both dominating compare outcomes reach the current block so we can't infer the + // value of the relop. + // + // If the dominating compare is close to the current compare, this may be a missed + // opportunity to tail duplicate. + // + JITDUMP("Both successors of " FMT_BB " reach, can't optimize\n", domBlock->bbNum); + + if ((trueSuccessor->GetUniqueSucc() == compCurBB) || + (falseSuccessor->GetUniqueSucc() == compCurBB)) + { + JITDUMP("Perhaps we should have tail duplicated " FMT_BB "\n", compCurBB->bbNum); + } + } + else if (trueReaches) + { + // Taken jump in dominator reaches, fall through doesn't; relop must be true. + // + JITDUMP("Jump successor " FMT_BB " of " FMT_BB " reaches, relop must be true\n", + domBlock->bbJumpDest->bbNum, domBlock->bbNum); + relopValue = 1; + break; + } + else if (falseReaches) + { + // Fall through from dominator reaches, taken jump doesn't; relop must be false. + // + JITDUMP("Fall through successor " FMT_BB " of " FMT_BB " reaches, relop must be false\n", + domBlock->bbNext->bbNum, domBlock->bbNum); + relopValue = 0; + break; + } + else + { + // No apparent path from the dominating BB. + // + // If domBlock or compCurBB is in an EH handler we may fail to find a path. + // Just ignore those cases. + // + // No point in looking further up the tree. + // + break; + } + } + } + } + + // Keep looking higher up in the tree + // + prevBlock = domBlock; + domBlock = domBlock->bbIDom; + } + + // Did we determine the relop value via dominance checks? If so, optimize. + // + if (relopValue == -1) + { + JITDUMP("Failed to find a suitable dominating compare, so we won't optimize\n"); + } + else + { + // Bail out if tree is has certain side effects + // + // Note we really shouldn't get here if the tree has non-exception effects, + // as they should have impacted the value number. + // + if ((tree->gtFlags & GTF_SIDE_EFFECT) != 0) + { + // Bail if there is a non-exception effect. + // + if ((tree->gtFlags & GTF_SIDE_EFFECT) != GTF_EXCEPT) + { + JITDUMP("Current relop has non-exception side effects, so we won't optimize\n"); + return nullptr; + } + + // Be conservative if there is an exception effect and we're in an EH region + // as we might not model the full extent of EH flow. + // + if (compCurBB->hasTryIndex()) + { + JITDUMP("Current relop has exception side effect and is in a try, so we won't optimize\n"); + return nullptr; + } + } + + JITDUMP("\nVN relop based redundant branch opt in " FMT_BB ":\n", compCurBB->bbNum); + + tree->ChangeOperConst(GT_CNS_INT); + tree->AsIntCon()->gtIconVal = relopValue; + + newTree = fgMorphTree(tree); + DISPTREE(newTree); + return optAssertionProp_Update(newTree, tree, stmt); + } + // Look for assertions of the form (tree EQ/NE 0) AssertionIndex index = optGlobalAssertionIsEqualOrNotEqualZero(assertions, tree); diff --git a/src/coreclr/src/jit/compiler.cpp b/src/coreclr/src/jit/compiler.cpp index 0c6ef1ddd1a7..89da77e1653f 100644 --- a/src/coreclr/src/jit/compiler.cpp +++ b/src/coreclr/src/jit/compiler.cpp @@ -5508,6 +5508,12 @@ int Compiler::compCompile(CORINFO_MODULE_HANDLE classPtr, } #if defined(DEBUG) || defined(INLINE_DATA) +//------------------------------------------------------------------------ +// compMethodHash: get hash code for currently jitted method +// +// Returns: +// Hash based on method's full name +// unsigned Compiler::Info::compMethodHash() const { if (compMethodHashPrivate == 0) @@ -5521,6 +5527,42 @@ unsigned Compiler::Info::compMethodHash() const } return compMethodHashPrivate; } + +//------------------------------------------------------------------------ +// compMethodHash: get hash code for specified method +// +// Arguments: +// methodHnd - method of interest +// +// Returns: +// Hash based on method's full name +// +unsigned Compiler::compMethodHash(CORINFO_METHOD_HANDLE methodHnd) +{ + // If this is the root method, delegate to the caching version + // + if (methodHnd == info.compMethodHnd) + { + return info.compMethodHash(); + } + + // Else compute from scratch. Might consider caching this too. + // + unsigned methodHash = 0; + const char* calleeName = eeGetMethodFullName(methodHnd); + + if (calleeName != nullptr) + { + methodHash = HashStringA(calleeName); + } + else + { + methodHash = info.compCompHnd->getMethodHash(methodHnd); + } + + return methodHash; +} + #endif // defined(DEBUG) || defined(INLINE_DATA) void Compiler::compCompileFinish() diff --git a/src/coreclr/src/jit/compiler.h b/src/coreclr/src/jit/compiler.h index 05743b159c28..0770b2821a4d 100644 --- a/src/coreclr/src/jit/compiler.h +++ b/src/coreclr/src/jit/compiler.h @@ -3094,8 +3094,8 @@ class Compiler void gtDispClassLayout(ClassLayout* layout, var_types type); void gtDispStmt(Statement* stmt, const char* msg = nullptr); void gtDispBlockStmts(BasicBlock* block); - void gtGetArgMsg(GenTreeCall* call, GenTree* arg, unsigned argNum, int listCount, char* bufp, unsigned bufLength); - void gtGetLateArgMsg(GenTreeCall* call, GenTree* arg, int argNum, int listCount, char* bufp, unsigned bufLength); + void gtGetArgMsg(GenTreeCall* call, GenTree* arg, unsigned argNum, char* bufp, unsigned bufLength); + void gtGetLateArgMsg(GenTreeCall* call, GenTree* arg, int argNum, char* bufp, unsigned bufLength); void gtDispArgList(GenTreeCall* call, IndentStack* indentStack); void gtDispFieldSeq(FieldSeqNode* pfsn); @@ -4121,6 +4121,8 @@ class Compiler GenTreeCall::Use* impPopCallArgs(unsigned count, CORINFO_SIG_INFO* sig, GenTreeCall::Use* prefixArgs = nullptr); + bool impCheckImplicitArgumentCoercion(var_types sigType, var_types nodeType) const; + GenTreeCall::Use* impPopReverseCallArgs(unsigned count, CORINFO_SIG_INFO* sig, unsigned skipReverseCount = 0); /* @@ -7370,6 +7372,7 @@ class Compiler const char* eeGetMethodName(CORINFO_METHOD_HANDLE hnd, const char** className); const char* eeGetMethodFullName(CORINFO_METHOD_HANDLE hnd); + unsigned compMethodHash(CORINFO_METHOD_HANDLE methodHandle); bool eeIsNativeMethod(CORINFO_METHOD_HANDLE method); CORINFO_METHOD_HANDLE eeGetMethodHandleForNative(CORINFO_METHOD_HANDLE method); diff --git a/src/coreclr/src/jit/compiler.hpp b/src/coreclr/src/jit/compiler.hpp index ebb55a7ebdf3..c9bd49172442 100644 --- a/src/coreclr/src/jit/compiler.hpp +++ b/src/coreclr/src/jit/compiler.hpp @@ -1301,6 +1301,7 @@ inline GenTree* Compiler::gtNewIndir(var_types typ, GenTree* addr) inline GenTree* Compiler::gtNewNullCheck(GenTree* addr, BasicBlock* basicBlock) { + assert(fgAddrCouldBeNull(addr)); GenTree* nullCheck = gtNewOperNode(GT_NULLCHECK, TYP_BYTE, addr); nullCheck->gtFlags |= GTF_EXCEPT; basicBlock->bbFlags |= BBF_HAS_NULLCHECK; diff --git a/src/coreclr/src/jit/dllmain.cpp b/src/coreclr/src/jit/dllmain.cpp index 7fcf274e5b64..fcc829f054a8 100644 --- a/src/coreclr/src/jit/dllmain.cpp +++ b/src/coreclr/src/jit/dllmain.cpp @@ -14,14 +14,11 @@ extern void jitShutdown(bool processIsTerminating); -HINSTANCE g_hInst = nullptr; - /*****************************************************************************/ extern "C" DLLEXPORT BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID pvReserved) { if (dwReason == DLL_PROCESS_ATTACH) { - g_hInst = (HINSTANCE)hInstance; DisableThreadLibraryCalls((HINSTANCE)hInstance); } else if (dwReason == DLL_PROCESS_DETACH) @@ -34,8 +31,3 @@ extern "C" DLLEXPORT BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOI return TRUE; } - -HINSTANCE GetModuleInst() -{ - return (g_hInst); -} diff --git a/src/coreclr/src/jit/flowgraph.cpp b/src/coreclr/src/jit/flowgraph.cpp index ee8bee39cd56..8ee9e69ac5c8 100644 --- a/src/coreclr/src/jit/flowgraph.cpp +++ b/src/coreclr/src/jit/flowgraph.cpp @@ -122,6 +122,9 @@ void Compiler::fgInit() /* This global flag is set whenever we add a throw block for a RngChk */ fgRngChkThrowAdded = false; /* reset flag for fgIsCodeAdded() */ + /* Keep track of whether or not EH statements have been optimized */ + fgOptimizedFinally = false; + /* We will record a list of all BBJ_RETURN blocks here */ fgReturnBlocks = nullptr; @@ -23773,7 +23776,7 @@ Statement* Compiler::fgInlinePrependStatements(InlineInfo* inlineInfo) GenTree* thisOp = impInlineFetchArg(0, inlArgInfo, lclVarInfo); if (fgAddrCouldBeNull(thisOp)) { - nullcheck = gtNewNullCheck(impInlineFetchArg(0, inlArgInfo, lclVarInfo), block); + nullcheck = gtNewNullCheck(thisOp, block); // The NULL-check statement will be inserted to the statement list after those statements // that assign arguments to temps and before the actual body of the inlinee method. } @@ -25436,6 +25439,7 @@ PhaseStatus Compiler::fgCloneFinally() if (cloneCount > 0) { JITDUMP("fgCloneFinally() cloned %u finally handlers\n", cloneCount); + fgOptimizedFinally = true; #ifdef DEBUG if (verbose) diff --git a/src/coreclr/src/jit/gentree.cpp b/src/coreclr/src/jit/gentree.cpp index ef83a02a0536..e2ae7339c6d5 100644 --- a/src/coreclr/src/jit/gentree.cpp +++ b/src/coreclr/src/jit/gentree.cpp @@ -11854,7 +11854,7 @@ void Compiler::gtDispTree(GenTree* tree, for (GenTreeCall::Use& use : call->LateArgs()) { IndentInfo arcType = (use.GetNext() == nullptr) ? IIArcBottom : IIArc; - gtGetLateArgMsg(call, use.GetNode(), lateArgIndex, -1, bufp, sizeof(buf)); + gtGetLateArgMsg(call, use.GetNode(), lateArgIndex, bufp, sizeof(buf)); gtDispChild(use.GetNode(), indentStack, arcType, bufp, topOnly); lateArgIndex++; } @@ -11953,8 +11953,6 @@ void Compiler::gtDispTree(GenTree* tree, // call - The call for which 'arg' is an argument // arg - The argument for which a message should be constructed // argNum - The ordinal number of the arg in the argument list -// listCount - When printing in LIR form this is the count for a GT_FIELD_LIST -// or -1 if we are not printing in LIR form // bufp - A pointer to the buffer into which the message is written // bufLength - The length of the buffer pointed to by bufp // @@ -11965,8 +11963,7 @@ void Compiler::gtDispTree(GenTree* tree, // 'call' must be a call node // 'arg' must be an argument to 'call' (else gtArgEntryByNode will assert) -void Compiler::gtGetArgMsg( - GenTreeCall* call, GenTree* arg, unsigned argNum, int listCount, char* bufp, unsigned bufLength) +void Compiler::gtGetArgMsg(GenTreeCall* call, GenTree* arg, unsigned argNum, char* bufp, unsigned bufLength) { if (call->gtCallLateArgs != nullptr) { @@ -11983,77 +11980,36 @@ void Compiler::gtGetArgMsg( if (curArgTabEntry->IsSplit()) { regNumber firstReg = curArgTabEntry->GetRegNum(); - if (listCount == -1) + if (curArgTabEntry->numRegs == 1) { - if (curArgTabEntry->numRegs == 1) - { - sprintf_s(bufp, bufLength, "arg%d %s out+%02x%c", argNum, compRegVarName(firstReg), - (curArgTabEntry->slotNum) * TARGET_POINTER_SIZE, 0); - } - else - { - regNumber lastReg = REG_STK; - char separator = (curArgTabEntry->numRegs == 2) ? ',' : '-'; - if (curArgTabEntry->IsHfaRegArg()) - { - unsigned lastRegNum = genMapFloatRegNumToRegArgNum(firstReg) + curArgTabEntry->numRegs - 1; - lastReg = genMapFloatRegArgNumToRegNum(lastRegNum); - } - else - { - unsigned lastRegNum = genMapIntRegNumToRegArgNum(firstReg) + curArgTabEntry->numRegs - 1; - lastReg = genMapIntRegArgNumToRegNum(lastRegNum); - } - sprintf_s(bufp, bufLength, "arg%d %s%c%s out+%02x%c", argNum, compRegVarName(firstReg), - separator, compRegVarName(lastReg), (curArgTabEntry->slotNum) * TARGET_POINTER_SIZE, - 0); - } + sprintf_s(bufp, bufLength, "arg%d %s out+%02x%c", argNum, compRegVarName(firstReg), + (curArgTabEntry->slotNum) * TARGET_POINTER_SIZE, 0); } else { - unsigned curArgNum = BAD_VAR_NUM; - bool isFloat = curArgTabEntry->IsHfaRegArg(); - if (isFloat) - { - curArgNum = genMapFloatRegNumToRegArgNum(firstReg) + listCount; - } - else - { - curArgNum = genMapIntRegNumToRegArgNum(firstReg) + listCount; - } - - if (!isFloat && curArgNum < MAX_REG_ARG) - { - regNumber curReg = genMapIntRegArgNumToRegNum(curArgNum); - sprintf_s(bufp, bufLength, "arg%d m%d %s%c", argNum, listCount, compRegVarName(curReg), 0); - } - else if (isFloat && curArgNum < MAX_FLOAT_REG_ARG) + regNumber lastReg = REG_STK; + char separator = (curArgTabEntry->numRegs == 2) ? ',' : '-'; + if (curArgTabEntry->IsHfaRegArg()) { - regNumber curReg = genMapFloatRegArgNumToRegNum(curArgNum); - sprintf_s(bufp, bufLength, "arg%d m%d %s%c", argNum, listCount, compRegVarName(curReg), 0); + unsigned lastRegNum = genMapFloatRegNumToRegArgNum(firstReg) + curArgTabEntry->numRegs - 1; + lastReg = genMapFloatRegArgNumToRegNum(lastRegNum); } else { - unsigned stackSlot = listCount - curArgTabEntry->numRegs; - sprintf_s(bufp, bufLength, "arg%d m%d out+%02x%c", argNum, listCount, - stackSlot * TARGET_POINTER_SIZE, 0); + unsigned lastRegNum = genMapIntRegNumToRegArgNum(firstReg) + curArgTabEntry->numRegs - 1; + lastReg = genMapIntRegArgNumToRegNum(lastRegNum); } + sprintf_s(bufp, bufLength, "arg%d %s%c%s out+%02x%c", argNum, compRegVarName(firstReg), separator, + compRegVarName(lastReg), (curArgTabEntry->slotNum) * TARGET_POINTER_SIZE, 0); } + return; } #endif // TARGET_ARM #if FEATURE_FIXED_OUT_ARGS - if (listCount == -1) - { - sprintf_s(bufp, bufLength, "arg%d out+%02x%c", argNum, curArgTabEntry->slotNum * TARGET_POINTER_SIZE, - 0); - } - else // listCount is 0,1,2 or 3 - { - assert(listCount <= MAX_ARG_REG_COUNT); - sprintf_s(bufp, bufLength, "arg%d out+%02x%c", argNum, - (curArgTabEntry->slotNum + listCount) * TARGET_POINTER_SIZE, 0); - } + + sprintf_s(bufp, bufLength, "arg%d out+%02x%c", argNum, curArgTabEntry->slotNum * TARGET_POINTER_SIZE, 0); + #else sprintf_s(bufp, bufLength, "arg%d on STK%c", argNum, 0); #endif @@ -12072,8 +12028,6 @@ void Compiler::gtGetArgMsg( // call - The call for which 'arg' is an argument // argx - The argument for which a message should be constructed // lateArgIndex - The ordinal number of the arg in the lastArg list -// listCount - When printing in LIR form this is the count for a multireg GT_FIELD_LIST -// or -1 if we are not printing in LIR form // bufp - A pointer to the buffer into which the message is written // bufLength - The length of the buffer pointed to by bufp // @@ -12084,8 +12038,7 @@ void Compiler::gtGetArgMsg( // 'call' must be a call node // 'arg' must be an argument to 'call' (else gtArgEntryByNode will assert) -void Compiler::gtGetLateArgMsg( - GenTreeCall* call, GenTree* argx, int lateArgIndex, int listCount, char* bufp, unsigned bufLength) +void Compiler::gtGetLateArgMsg(GenTreeCall* call, GenTree* argx, int lateArgIndex, char* bufp, unsigned bufLength) { assert(!argx->IsArgPlaceHolderNode()); // No place holders nodes are in gtCallLateArgs; @@ -12114,60 +12067,27 @@ void Compiler::gtGetLateArgMsg( { regNumber firstReg = curArgTabEntry->GetRegNum(); unsigned argNum = curArgTabEntry->argNum; - if (listCount == -1) + if (curArgTabEntry->numRegs == 1) { - if (curArgTabEntry->numRegs == 1) - { - sprintf_s(bufp, bufLength, "arg%d %s out+%02x%c", argNum, compRegVarName(firstReg), - (curArgTabEntry->slotNum) * TARGET_POINTER_SIZE, 0); - } - else - { - regNumber lastReg = REG_STK; - char separator = (curArgTabEntry->numRegs == 2) ? ',' : '-'; - if (curArgTabEntry->IsHfaRegArg()) - { - unsigned lastRegNum = genMapFloatRegNumToRegArgNum(firstReg) + curArgTabEntry->numRegs - 1; - lastReg = genMapFloatRegArgNumToRegNum(lastRegNum); - } - else - { - unsigned lastRegNum = genMapIntRegNumToRegArgNum(firstReg) + curArgTabEntry->numRegs - 1; - lastReg = genMapIntRegArgNumToRegNum(lastRegNum); - } - sprintf_s(bufp, bufLength, "arg%d %s%c%s out+%02x%c", argNum, compRegVarName(firstReg), separator, - compRegVarName(lastReg), (curArgTabEntry->slotNum) * TARGET_POINTER_SIZE, 0); - } + sprintf_s(bufp, bufLength, "arg%d %s out+%02x%c", argNum, compRegVarName(firstReg), + (curArgTabEntry->slotNum) * TARGET_POINTER_SIZE, 0); } else { - unsigned curArgNum = BAD_VAR_NUM; - bool isFloat = curArgTabEntry->IsHfaRegArg(); - if (isFloat) + regNumber lastReg = REG_STK; + char separator = (curArgTabEntry->numRegs == 2) ? ',' : '-'; + if (curArgTabEntry->IsHfaRegArg()) { - curArgNum = genMapFloatRegNumToRegArgNum(firstReg) + listCount; + unsigned lastRegNum = genMapFloatRegNumToRegArgNum(firstReg) + curArgTabEntry->numRegs - 1; + lastReg = genMapFloatRegArgNumToRegNum(lastRegNum); } else { - curArgNum = genMapIntRegNumToRegArgNum(firstReg) + listCount; - } - - if (!isFloat && curArgNum < MAX_REG_ARG) - { - regNumber curReg = genMapIntRegArgNumToRegNum(curArgNum); - sprintf_s(bufp, bufLength, "arg%d m%d %s%c", argNum, listCount, compRegVarName(curReg), 0); - } - else if (isFloat && curArgNum < MAX_FLOAT_REG_ARG) - { - regNumber curReg = genMapFloatRegArgNumToRegNum(curArgNum); - sprintf_s(bufp, bufLength, "arg%d m%d %s%c", argNum, listCount, compRegVarName(curReg), 0); - } - else - { - unsigned stackSlot = listCount - curArgTabEntry->numRegs; - sprintf_s(bufp, bufLength, "arg%d m%d out+%02x%c", argNum, listCount, - stackSlot * TARGET_POINTER_SIZE, 0); + unsigned lastRegNum = genMapIntRegNumToRegArgNum(firstReg) + curArgTabEntry->numRegs - 1; + lastReg = genMapIntRegArgNumToRegNum(lastRegNum); } + sprintf_s(bufp, bufLength, "arg%d %s%c%s out+%02x%c", argNum, compRegVarName(firstReg), separator, + compRegVarName(lastReg), (curArgTabEntry->slotNum) * TARGET_POINTER_SIZE, 0); } return; } @@ -12177,8 +12097,6 @@ void Compiler::gtGetLateArgMsg( #if FEATURE_MULTIREG_ARGS if (curArgTabEntry->numRegs >= 2) { - // listCount could be -1 but it is signed, so this comparison is OK. - assert(listCount <= MAX_ARG_REG_COUNT); char separator = (curArgTabEntry->numRegs == 2) ? ',' : '-'; sprintf_s(bufp, bufLength, "arg%d %s%c%s%c", curArgTabEntry->argNum, compRegVarName(argReg), separator, compRegVarName(curArgTabEntry->GetRegNum(curArgTabEntry->numRegs - 1)), 0); @@ -12220,7 +12138,7 @@ void Compiler::gtDispArgList(GenTreeCall* call, IndentStack* indentStack) if (!argNode->IsNothingNode() && !argNode->IsArgPlaceHolderNode()) { char buf[256]; - gtGetArgMsg(call, argNode, argnum, -1, buf, sizeof(buf)); + gtGetArgMsg(call, argNode, argnum, buf, sizeof(buf)); gtDispChild(argNode, indentStack, (argNode == lastArgNode) ? IIArcBottom : IIArc, buf, false); } argnum++; @@ -12393,40 +12311,18 @@ void Compiler::gtDispLIRNode(GenTree* node, const char* prefixMsg /* = nullptr * { fgArgTabEntry* curArgTabEntry = gtArgEntryByNode(call, operand); assert(curArgTabEntry); + assert(operand->OperGet() != GT_LIST); - if (operand->OperGet() == GT_LIST) + if (!curArgTabEntry->isLateArg()) { - int listIndex = 0; - for (GenTreeArgList* element = operand->AsArgList(); element != nullptr; element = element->Rest()) - { - operand = element->Current(); - if (curArgTabEntry->GetLateArgInx() == (unsigned)-1) - { - gtGetArgMsg(call, operand, curArgTabEntry->argNum, listIndex, buf, sizeof(buf)); - } - else - { - gtGetLateArgMsg(call, operand, curArgTabEntry->GetLateArgInx(), listIndex, buf, - sizeof(buf)); - } - - displayOperand(operand, buf, operandArc, indentStack, prefixIndent); - operandArc = IIArc; - } + gtGetArgMsg(call, operand, curArgTabEntry->argNum, buf, sizeof(buf)); } else { - if (!curArgTabEntry->isLateArg()) - { - gtGetArgMsg(call, operand, curArgTabEntry->argNum, -1, buf, sizeof(buf)); - } - else - { - gtGetLateArgMsg(call, operand, curArgTabEntry->GetLateArgInx(), -1, buf, sizeof(buf)); - } - - displayOperand(operand, buf, operandArc, indentStack, prefixIndent); + gtGetLateArgMsg(call, operand, curArgTabEntry->GetLateArgInx(), buf, sizeof(buf)); } + + displayOperand(operand, buf, operandArc, indentStack, prefixIndent); } } else if (node->OperIsDynBlkOp()) diff --git a/src/coreclr/src/jit/importer.cpp b/src/coreclr/src/jit/importer.cpp index c408667db7c6..d5b909d4002b 100644 --- a/src/coreclr/src/jit/importer.cpp +++ b/src/coreclr/src/jit/importer.cpp @@ -946,20 +946,27 @@ GenTreeCall::Use* Compiler::impPopCallArgs(unsigned count, CORINFO_SIG_INFO* sig CorInfoType corType = strip(info.compCompHnd->getArgType(sig, argLst, &argClass)); + var_types jitSigType = JITtype2varType(corType); + + if (!impCheckImplicitArgumentCoercion(jitSigType, arg->GetNode()->TypeGet())) + { + BADCODE("the call argument has a type that can't be implicitly converted to the signature type"); + } + // insert implied casts (from float to double or double to float) - if ((corType == CORINFO_TYPE_DOUBLE) && (arg->GetNode()->TypeGet() == TYP_FLOAT)) + if ((jitSigType == TYP_DOUBLE) && (arg->GetNode()->TypeGet() == TYP_FLOAT)) { arg->SetNode(gtNewCastNode(TYP_DOUBLE, arg->GetNode(), false, TYP_DOUBLE)); } - else if ((corType == CORINFO_TYPE_FLOAT) && (arg->GetNode()->TypeGet() == TYP_DOUBLE)) + else if ((jitSigType == TYP_FLOAT) && (arg->GetNode()->TypeGet() == TYP_DOUBLE)) { arg->SetNode(gtNewCastNode(TYP_FLOAT, arg->GetNode(), false, TYP_FLOAT)); } // insert any widening or narrowing casts for backwards compatibility - arg->SetNode(impImplicitIorI4Cast(arg->GetNode(), JITtype2varType(corType))); + arg->SetNode(impImplicitIorI4Cast(arg->GetNode(), jitSigType)); if (corType != CORINFO_TYPE_CLASS && corType != CORINFO_TYPE_BYREF && corType != CORINFO_TYPE_PTR && corType != CORINFO_TYPE_VAR && (argRealClass = info.compCompHnd->getArgClass(sig, argLst)) != nullptr) @@ -993,6 +1000,111 @@ GenTreeCall::Use* Compiler::impPopCallArgs(unsigned count, CORINFO_SIG_INFO* sig return argList; } +static bool TypeIs(var_types type1, var_types type2) +{ + return type1 == type2; +} + +// Check if type1 matches any type from the list. +template +static bool TypeIs(var_types type1, var_types type2, T... rest) +{ + return TypeIs(type1, type2) || TypeIs(type1, rest...); +} + +//------------------------------------------------------------------------ +// impCheckImplicitArgumentCoercion: check that the node's type is compatible with +// the signature's type using ECMA implicit argument coercion table. +// +// Arguments: +// sigType - the type in the call signature; +// nodeType - the node type. +// +// Return Value: +// true if they are compatible, false otherwise. +// +// Notes: +// - it is currently allowing byref->long passing, should be fixed in VM; +// - it can't check long -> native int case on 64-bit platforms, +// so the behavior is different depending on the target bitness. +// +bool Compiler::impCheckImplicitArgumentCoercion(var_types sigType, var_types nodeType) const +{ + if (sigType == nodeType) + { + return true; + } + + if (TypeIs(sigType, TYP_BOOL, TYP_UBYTE, TYP_BYTE, TYP_USHORT, TYP_SHORT, TYP_UINT, TYP_INT)) + { + if (TypeIs(nodeType, TYP_BOOL, TYP_UBYTE, TYP_BYTE, TYP_USHORT, TYP_SHORT, TYP_UINT, TYP_INT, TYP_I_IMPL)) + { + return true; + } + } + else if (TypeIs(sigType, TYP_ULONG, TYP_LONG)) + { + if (TypeIs(nodeType, TYP_LONG)) + { + return true; + } + } + else if (TypeIs(sigType, TYP_FLOAT, TYP_DOUBLE)) + { + if (TypeIs(nodeType, TYP_FLOAT, TYP_DOUBLE)) + { + return true; + } + } + else if (TypeIs(sigType, TYP_BYREF)) + { + if (TypeIs(nodeType, TYP_I_IMPL)) + { + return true; + } + + // This condition tolerates such IL: + // ; V00 this ref this class-hnd + // ldarg.0 + // call(byref) + if (TypeIs(nodeType, TYP_REF)) + { + return true; + } + } + else if (varTypeIsStruct(sigType)) + { + if (varTypeIsStruct(nodeType)) + { + return true; + } + } + + // This condition should not be under `else` because `TYP_I_IMPL` + // intersects with `TYP_LONG` or `TYP_INT`. + if (TypeIs(sigType, TYP_I_IMPL, TYP_U_IMPL)) + { + // Note that it allows `ldc.i8 1; call(nint)` on 64-bit platforms, + // but we can't distinguish `nint` from `long` there. + if (TypeIs(nodeType, TYP_I_IMPL, TYP_U_IMPL, TYP_INT, TYP_UINT)) + { + return true; + } + + // It tolerates IL that ECMA does not allow but that is commonly used. + // Example: + // V02 loc1 struct + // ldloca.s 0x2 + // call(native int) + if (TypeIs(nodeType, TYP_BYREF)) + { + return true; + } + } + + return false; +} + /***************************************************************************** * * Pop the given number of values from the stack in reverse order (STDCALL/CDECL etc.) @@ -6175,8 +6287,12 @@ int Compiler::impBoxPatternMatch(CORINFO_RESOLVED_TOKEN* pResolvedToken, const B if (((treeToBox->gtFlags & GTF_SIDE_EFFECT) == GTF_EXCEPT) && treeToBox->OperIs(GT_OBJ, GT_BLK, GT_IND)) { - // Yes, we just need to perform a null check. - treeToNullcheck = treeToBox->AsOp()->gtOp1; + // Yes, we just need to perform a null check if needed. + GenTree* const addr = treeToBox->AsOp()->gtGetOp1(); + if (fgAddrCouldBeNull(addr)) + { + treeToNullcheck = addr; + } } else { diff --git a/src/coreclr/src/jit/inline.cpp b/src/coreclr/src/jit/inline.cpp index 759a6e366181..050214e188b2 100644 --- a/src/coreclr/src/jit/inline.cpp +++ b/src/coreclr/src/jit/inline.cpp @@ -495,9 +495,8 @@ void InlineContext::DumpXml(FILE* file, unsigned indent) { Compiler* compiler = m_InlineStrategy->GetCompiler(); - mdMethodDef calleeToken = compiler->info.compCompHnd->getMethodDefFromMethod(m_Callee); - unsigned calleeHash = compiler->info.compCompHnd->getMethodHash(m_Callee); - + mdMethodDef calleeToken = compiler->info.compCompHnd->getMethodDefFromMethod(m_Callee); + unsigned calleeHash = compiler->compMethodHash(m_Callee); const char* inlineReason = InlGetObservationString(m_Observation); int offset = -1; diff --git a/src/coreclr/src/jit/inline.h b/src/coreclr/src/jit/inline.h index 8302356c6e8f..b2c414d13705 100644 --- a/src/coreclr/src/jit/inline.h +++ b/src/coreclr/src/jit/inline.h @@ -239,6 +239,7 @@ class InlinePolicy // Policy determinations virtual void DetermineProfitability(CORINFO_METHOD_INFO* methodInfo) = 0; + virtual bool BudgetCheck() const = 0; // Policy policies virtual bool PropagateNeverToRuntime() const = 0; diff --git a/src/coreclr/src/jit/inlinepolicy.cpp b/src/coreclr/src/jit/inlinepolicy.cpp index cb113e646e82..487fbe688dd3 100644 --- a/src/coreclr/src/jit/inlinepolicy.cpp +++ b/src/coreclr/src/jit/inlinepolicy.cpp @@ -369,35 +369,13 @@ void DefaultPolicy::NoteBool(InlineObservation obs, bool value) // "reestablishes" candidacy rather than alters // candidacy ... so instead we bail out here. // - if (!m_IsPrejitRoot) - { - InlineStrategy* strategy = m_RootCompiler->m_inlineStrategy; - const bool overBudget = strategy->BudgetCheck(m_CodeSize); + bool overBudget = this->BudgetCheck(); - if (overBudget) - { - // If the candidate is a forceinline and the callsite is - // not too deep, allow the inline even if it goes over budget. - // - // For now, "not too deep" means a top-level inline. Note - // depth 0 is used for the root method, so inline candidate depth - // will be 1 or more. - // - assert(m_IsForceInlineKnown); - assert(m_CallsiteDepth > 0); - const bool allowOverBudget = m_IsForceInline && (m_CallsiteDepth == 1); - - if (allowOverBudget) - { - JITDUMP("Allowing over-budget top-level forceinline\n"); - } - else - { - SetFailure(InlineObservation::CALLSITE_OVER_BUDGET); - } - } + if (overBudget) + { + SetFailure(InlineObservation::CALLSITE_OVER_BUDGET); + return; } - break; } @@ -461,6 +439,53 @@ void DefaultPolicy::NoteBool(InlineObservation obs, bool value) } } +//------------------------------------------------------------------------ +// BudgetCheck: see if this inline would exceed the current budget +// +// Returns: +// True if inline would exceed the budget. +// +bool DefaultPolicy::BudgetCheck() const +{ + // Only relevant if we're actually inlining. + // + if (m_IsPrejitRoot) + { + return false; + } + + // The strategy tracks the amout of inlining done so far, + // so it performs the actual check. + // + InlineStrategy* strategy = m_RootCompiler->m_inlineStrategy; + const bool overBudget = strategy->BudgetCheck(m_CodeSize); + + if (overBudget) + { + // If the candidate is a forceinline and the callsite is + // not too deep, allow the inline even if it goes over budget. + // + // For now, "not too deep" means a top-level inline. Note + // depth 0 is used for the root method, so inline candidate depth + // will be 1 or more. + // + assert(m_IsForceInlineKnown); + assert(m_CallsiteDepth > 0); + const bool allowOverBudget = m_IsForceInline && (m_CallsiteDepth == 1); + + if (allowOverBudget) + { + JITDUMP("Allowing over-budget top-level forceinline\n"); + } + else + { + return true; + } + } + + return false; +} + //------------------------------------------------------------------------ // NoteInt: handle an observed integer value // @@ -1012,15 +1037,11 @@ void RandomPolicy::DetermineProfitability(CORINFO_METHOD_INFO* methodInfo) assert(m_Observation == InlineObservation::CALLEE_IS_DISCRETIONARY_INLINE); // Budget check. - if (!m_IsPrejitRoot) + const bool overBudget = this->BudgetCheck(); + if (overBudget) { - InlineStrategy* strategy = m_RootCompiler->m_inlineStrategy; - bool overBudget = strategy->BudgetCheck(m_CodeSize); - if (overBudget) - { - SetFailure(InlineObservation::CALLSITE_OVER_BUDGET); - return; - } + SetFailure(InlineObservation::CALLSITE_OVER_BUDGET); + return; } // If we're also dumping inline data, make additional observations @@ -2180,6 +2201,19 @@ FullPolicy::FullPolicy(Compiler* compiler, bool isPrejitRoot) : DiscretionaryPol // Empty } +//------------------------------------------------------------------------ +// BudgetCheck: see if this inline would exceed the current budget +// +// Returns: +// True if inline would exceed the budget. +// +bool FullPolicy::BudgetCheck() const +{ + // There are no budget restrictions for the full policy. + // + return false; +} + //------------------------------------------------------------------------ // DetermineProfitability: determine if this inline is profitable // @@ -2482,7 +2516,7 @@ bool ReplayPolicy::FindContext(InlineContext* context) // // Token and Hash we're looking for. mdMethodDef contextToken = m_RootCompiler->info.compCompHnd->getMethodDefFromMethod(context->GetCallee()); - unsigned contextHash = m_RootCompiler->info.compCompHnd->getMethodHash(context->GetCallee()); + unsigned contextHash = m_RootCompiler->compMethodHash(context->GetCallee()); unsigned contextOffset = (unsigned)context->GetOffset(); return FindInline(contextToken, contextHash, contextOffset); @@ -2666,7 +2700,7 @@ bool ReplayPolicy::FindInline(CORINFO_METHOD_HANDLE callee) { // Token and Hash we're looking for mdMethodDef calleeToken = m_RootCompiler->info.compCompHnd->getMethodDefFromMethod(callee); - unsigned calleeHash = m_RootCompiler->info.compCompHnd->getMethodHash(callee); + unsigned calleeHash = m_RootCompiler->compMethodHash(callee); // Abstract this or just pass through raw bits // See matching code in xml writer diff --git a/src/coreclr/src/jit/inlinepolicy.h b/src/coreclr/src/jit/inlinepolicy.h index 9024996521a3..7bd6557b2511 100644 --- a/src/coreclr/src/jit/inlinepolicy.h +++ b/src/coreclr/src/jit/inlinepolicy.h @@ -119,6 +119,7 @@ class DefaultPolicy : public LegalPolicy // Policy determinations void DetermineProfitability(CORINFO_METHOD_INFO* methodInfo) override; + bool BudgetCheck() const override; // Policy policies bool PropagateNeverToRuntime() const override; @@ -350,6 +351,7 @@ class FullPolicy : public DiscretionaryPolicy // Policy determinations void DetermineProfitability(CORINFO_METHOD_INFO* methodInfo) override; + bool BudgetCheck() const override; // Miscellaneous const char* GetName() const override diff --git a/src/coreclr/src/jit/lower.cpp b/src/coreclr/src/jit/lower.cpp index 6494b9515626..d047083e763f 100644 --- a/src/coreclr/src/jit/lower.cpp +++ b/src/coreclr/src/jit/lower.cpp @@ -2549,7 +2549,7 @@ GenTree* Lowering::OptimizeConstCompare(GenTree* cmp) // into ((x AND mask) NE|EQ 0) when mask is a single bit. // - if (isPow2(static_cast(op2Value)) && andOp2->IsIntegralConst(op2Value)) + if (isPow2(static_cast(op2Value)) && andOp2->IsIntegralConst(op2Value)) { op2Value = 0; op2->SetIconValue(0); diff --git a/src/coreclr/src/jit/lowerxarch.cpp b/src/coreclr/src/jit/lowerxarch.cpp index 971424e64c96..8a02933bfc64 100644 --- a/src/coreclr/src/jit/lowerxarch.cpp +++ b/src/coreclr/src/jit/lowerxarch.cpp @@ -5464,9 +5464,30 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node) break; } + case NI_SSE2_ShiftLeftLogical128BitLane: + case NI_SSE2_ShiftRightLogical128BitLane: + case NI_AVX2_ShiftLeftLogical128BitLane: + case NI_AVX2_ShiftRightLogical128BitLane: + { +#if DEBUG + // These intrinsics should have been marked contained by the general-purpose handling + // earlier in the method. + + GenTree* lastOp = HWIntrinsicInfo::lookupLastOp(node); + assert(lastOp != nullptr); + + if (HWIntrinsicInfo::isImmOp(intrinsicId, lastOp) && lastOp->IsCnsIntOrI()) + { + assert(lastOp->isContained()); + } +#endif + + break; + } + default: { - assert("Unhandled containment for binary hardware intrinsic with immediate operand"); + assert(!"Unhandled containment for binary hardware intrinsic with immediate operand"); break; } } @@ -5643,7 +5664,7 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node) default: { - assert("Unhandled containment for ternary hardware intrinsic with immediate operand"); + assert(!"Unhandled containment for ternary hardware intrinsic with immediate operand"); break; } } diff --git a/src/coreclr/src/jit/morph.cpp b/src/coreclr/src/jit/morph.cpp index d74e851be899..e172a9c21db5 100644 --- a/src/coreclr/src/jit/morph.cpp +++ b/src/coreclr/src/jit/morph.cpp @@ -13354,9 +13354,10 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) /* Check for "op1 - cns2" , we change it to "op1 + (-cns2)" */ noway_assert(op2); - if (op2->IsCnsIntOrI()) + if (op2->IsCnsIntOrI() && !op2->IsIconHandle()) { - /* Negate the constant and change the node to be "+" */ + // Negate the constant and change the node to be "+", + // except when `op2` is a const byref. op2->AsIntConCommon()->SetIconValue(-op2->AsIntConCommon()->IconValue()); op2->AsIntConRef().gtFieldSeq = FieldSeqStore::NotAField(); @@ -13386,6 +13387,56 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) /* No match - exit */ } + + // Skip optimization if non-NEG operand is constant. + // Both op1 and op2 are not constant because it was already checked above. + if (opts.OptimizationEnabled() && fgGlobalMorph && + (((op1->gtFlags & GTF_EXCEPT) == 0) || ((op2->gtFlags & GTF_EXCEPT) == 0))) + { + // a - -b = > a + b + // SUB(a, (NEG(b)) => ADD(a, b) + + if (!op1->OperIs(GT_NEG) && op2->OperIs(GT_NEG)) + { + // tree: SUB + // op1: a + // op2: NEG + // op2Child: b + + GenTree* op2Child = op2->AsOp()->gtOp1; // b + oper = GT_ADD; + tree->SetOper(oper, GenTree::PRESERVE_VN); + tree->AsOp()->gtOp2 = op2Child; + + DEBUG_DESTROY_NODE(op2); + + op2 = op2Child; + } + + // -a - -b = > b - a + // SUB(NEG(a), (NEG(b)) => SUB(b, a) + + if (op1->OperIs(GT_NEG) && op2->OperIs(GT_NEG)) + { + // tree: SUB + // op1: NEG + // op1Child: a + // op2: NEG + // op2Child: b + + GenTree* op1Child = op1->AsOp()->gtOp1; // a + GenTree* op2Child = op2->AsOp()->gtOp1; // b + tree->AsOp()->gtOp1 = op2Child; + tree->AsOp()->gtOp2 = op1Child; + + DEBUG_DESTROY_NODE(op1); + DEBUG_DESTROY_NODE(op2); + + op1 = op2Child; + op2 = op1Child; + } + } + break; #ifdef TARGET_ARM64 @@ -13554,6 +13605,57 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) } } } + + if (opts.OptimizationEnabled() && fgGlobalMorph && + (((op1->gtFlags & GTF_EXCEPT) == 0) || ((op2->gtFlags & GTF_EXCEPT) == 0))) + { + // - a + b = > b - a + // ADD((NEG(a), b) => SUB(b, a) + + // Skip optimization if non-NEG operand is constant. + if (op1->OperIs(GT_NEG) && !op2->OperIs(GT_NEG) && + !(op2->IsCnsIntOrI() && varTypeIsIntegralOrI(typ))) + { + // tree: ADD + // op1: NEG + // op2: b + // op1Child: a + + GenTree* op1Child = op1->AsOp()->gtOp1; // a + oper = GT_SUB; + tree->SetOper(oper, GenTree::PRESERVE_VN); + tree->AsOp()->gtOp1 = op2; + tree->AsOp()->gtOp2 = op1Child; + + DEBUG_DESTROY_NODE(op1); + + op1 = op2; + op2 = op1Child; + } + + // a + -b = > a - b + // ADD(a, (NEG(b)) => SUB(a, b) + + if (!op1->OperIs(GT_NEG) && op2->OperIs(GT_NEG)) + { + // a is non cosntant because it was already canonicalized to have + // variable on the left and constant on the right. + + // tree: ADD + // op1: a + // op2: NEG + // op2Child: b + + GenTree* op2Child = op2->AsOp()->gtOp1; // a + oper = GT_SUB; + tree->SetOper(oper, GenTree::PRESERVE_VN); + tree->AsOp()->gtOp2 = op2Child; + + DEBUG_DESTROY_NODE(op2); + + op2 = op2Child; + } + } } /* See if we can fold GT_MUL by const nodes */ else if (oper == GT_MUL && op2->IsCnsIntOrI() && !optValnumCSE_phase) diff --git a/src/coreclr/src/jit/utils.cpp b/src/coreclr/src/jit/utils.cpp index de1fd4a880b2..133b49f701a1 100644 --- a/src/coreclr/src/jit/utils.cpp +++ b/src/coreclr/src/jit/utils.cpp @@ -846,9 +846,6 @@ void ConfigMethodRange::InitRanges(const WCHAR* rangeStr, unsigned capacity) //------------------------------------------------------------------------ // Dump: dump hash ranges to stdout // -// Arguments: -// hash -- hash value to check - void ConfigMethodRange::Dump() { if (m_inited != 1) @@ -866,7 +863,14 @@ void ConfigMethodRange::Dump() printf("\n", m_lastRange); for (unsigned i = 0; i < m_lastRange; i++) { - printf("%i [%u-%u]\n", i, m_ranges[i].m_low, m_ranges[i].m_high); + if (m_ranges[i].m_low == m_ranges[i].m_high) + { + printf("%i [0x%08x]\n", i, m_ranges[i].m_low); + } + else + { + printf("%i [0x%08x-0x%08x]\n", i, m_ranges[i].m_low, m_ranges[i].m_high); + } } } diff --git a/src/coreclr/src/md/compiler/classfactory.cpp b/src/coreclr/src/md/compiler/classfactory.cpp index 1506cb00e277..46b9775e4401 100644 --- a/src/coreclr/src/md/compiler/classfactory.cpp +++ b/src/coreclr/src/md/compiler/classfactory.cpp @@ -23,9 +23,6 @@ #include "mscoree.h" #include "corhost.h" -//********** Locals. ********************************************************** -HINSTANCE GetModuleInst(); - // @telesto - why does Telesto export any Co-classes at all? // This map contains the list of coclasses which are exported from this module. diff --git a/src/coreclr/src/md/staticmd/stdafx.h b/src/coreclr/src/md/staticmd/stdafx.h index ab95ea1f3d62..65812f46ffa6 100644 --- a/src/coreclr/src/md/staticmd/stdafx.h +++ b/src/coreclr/src/md/staticmd/stdafx.h @@ -8,7 +8,3 @@ #include "intrinsic.h" // Functions to make intrinsic. - - -// Helper function returns the instance handle of this module. -HINSTANCE GetModuleInst(); diff --git a/src/coreclr/src/pal/inc/pal.h b/src/coreclr/src/pal/inc/pal.h index 19e64091018c..8aa0fe32f2e2 100644 --- a/src/coreclr/src/pal/inc/pal.h +++ b/src/coreclr/src/pal/inc/pal.h @@ -504,15 +504,6 @@ PALAPI PAL_UnregisterModule( IN HINSTANCE hInstance); -PALIMPORT -BOOL -PALAPI -PAL_GetPALDirectoryW( - OUT LPWSTR lpDirectoryName, - IN OUT UINT* cchDirectoryName); - -#define PAL_GetPALDirectory PAL_GetPALDirectoryW - PALIMPORT VOID PALAPI diff --git a/src/coreclr/src/pal/src/include/pal/stackstring.hpp b/src/coreclr/src/pal/src/include/pal/stackstring.hpp index 30aa6fa379c7..38c4b84b6672 100644 --- a/src/coreclr/src/pal/src/include/pal/stackstring.hpp +++ b/src/coreclr/src/pal/src/include/pal/stackstring.hpp @@ -253,10 +253,6 @@ typedef StackString PathWCharString; #endif // Some Helper Definitions -BOOL -PAL_GetPALDirectoryW( - PathWCharString& lpDirectoryName); - DWORD GetCurrentDirectoryA( PathCharString& lpBuffer); diff --git a/src/coreclr/src/pal/src/init/pal.cpp b/src/coreclr/src/pal/src/init/pal.cpp index 488ff6a4d79b..708d369f1dd1 100644 --- a/src/coreclr/src/pal/src/init/pal.cpp +++ b/src/coreclr/src/pal/src/init/pal.cpp @@ -776,8 +776,7 @@ exit : Abstract: A replacement for PAL_Initialize when loading CoreCLR. Instead of taking a command line (which CoreCLR - instances aren't given anyway) the path into which the CoreCLR is installed is supplied instead. This is - cached so that PAL_GetPALDirectoryW can return it later. + instances aren't given anyway) the path into which the CoreCLR is installed is supplied instead. This routine also makes sure the psuedo dynamic libraries PALRT and mscorwks have their initialization methods called. diff --git a/src/coreclr/src/pal/src/misc/miscpalapi.cpp b/src/coreclr/src/pal/src/misc/miscpalapi.cpp index 090261187813..06129210ef9c 100644 --- a/src/coreclr/src/pal/src/misc/miscpalapi.cpp +++ b/src/coreclr/src/pal/src/misc/miscpalapi.cpp @@ -43,115 +43,6 @@ SET_DEFAULT_DEBUG_CHANNEL(MISC); static const char URANDOM_DEVICE_NAME[]="/dev/urandom"; -/*++ - -Function : - - PAL_GetPALDirectoryW - - Returns the fully qualified path name - where the PALL DLL was loaded from. - - On failure it returns FALSE and sets the - proper LastError code. - ---*/ -BOOL -PAL_GetPALDirectoryW(PathWCharString& lpDirectoryName) -{ - LPCWSTR lpFullPathAndName = NULL; - LPCWSTR lpEndPoint = NULL; - BOOL bRet = FALSE; - - PERF_ENTRY(PAL_GetPALDirectoryW); - - MODSTRUCT *module = LOADGetPalLibrary(); - if (!module) - { - SetLastError(ERROR_INTERNAL_ERROR); - goto EXIT; - } - lpFullPathAndName = module->lib_name; - if (lpFullPathAndName == NULL) - { - SetLastError(ERROR_INTERNAL_ERROR); - goto EXIT; - } - lpEndPoint = PAL_wcsrchr( lpFullPathAndName, '/' ); - if ( lpEndPoint ) - { - /* The path that we return is required to have - the trailing slash on the end.*/ - lpEndPoint++; - - - if(!lpDirectoryName.Set(lpFullPathAndName,lpEndPoint - lpFullPathAndName)) - { - ASSERT( "The buffer was not large enough.\n" ); - SetLastError( ERROR_INSUFFICIENT_BUFFER ); - goto EXIT; - } - - bRet = TRUE; - } - else - { - ASSERT( "Unable to determine the path.\n" ); - /* Error path, should not be executed. */ - SetLastError( ERROR_INTERNAL_ERROR ); - } - -EXIT: - PERF_EXIT(PAL_GetPALDirectoryW); - return bRet; -} - -/*++ - -Function : - - PAL_GetPALDirectoryW - - Returns the fully qualified path name - where the PALL DLL was loaded from. - - On failure it returns FALSE and sets the - proper LastError code. - ---*/ -PALIMPORT -BOOL -PALAPI -PAL_GetPALDirectoryW( OUT LPWSTR lpDirectoryName, IN OUT UINT* cchDirectoryName ) -{ - PathWCharString directory; - BOOL bRet; - PERF_ENTRY(PAL_GetPALDirectoryW); - ENTRY( "PAL_GetPALDirectoryW( %p, %d )\n", lpDirectoryName, *cchDirectoryName ); - - bRet = PAL_GetPALDirectoryW(directory); - - if (bRet) { - - if (directory.GetCount() > *cchDirectoryName) - { - SetLastError( ERROR_INSUFFICIENT_BUFFER ); - bRet = FALSE; - } - else - { - PAL_wcscpy(lpDirectoryName, directory.GetString()); - } - - *cchDirectoryName = directory.GetCount(); - } - - LOGEXIT( "PAL_GetPALDirectoryW returns BOOL %d.\n", bRet); - PERF_EXIT(PAL_GetPALDirectoryW); - return bRet; - -} - VOID PALAPI PAL_Random( diff --git a/src/coreclr/src/pal/tests/palsuite/CMakeLists.txt b/src/coreclr/src/pal/tests/palsuite/CMakeLists.txt index 722a32a3fa59..4f0d615deb49 100644 --- a/src/coreclr/src/pal/tests/palsuite/CMakeLists.txt +++ b/src/coreclr/src/pal/tests/palsuite/CMakeLists.txt @@ -800,7 +800,6 @@ _add_executable(paltests miscellaneous/SetLastError/test1/test.cpp miscellaneous/_i64tow/test1/test1.cpp pal_specific/PAL_errno/test1/PAL_errno.cpp - pal_specific/PAL_GetPALDirectoryW/test1/PAL_GetPALDirectoryW.cpp # pal_specific/PAL_GetUserTempDirectoryW/test1/PAL_GetUserTempDirectoryW.cpp #pal_specific/PAL_get_stderr/test1/PAL_get_stderr.cpp #pal_specific/PAL_get_stdin/test1/PAL_get_stdin.cpp diff --git a/src/coreclr/src/pal/tests/palsuite/compilableTests.txt b/src/coreclr/src/pal/tests/palsuite/compilableTests.txt index 40e1d573e572..49b99c59c665 100644 --- a/src/coreclr/src/pal/tests/palsuite/compilableTests.txt +++ b/src/coreclr/src/pal/tests/palsuite/compilableTests.txt @@ -695,7 +695,6 @@ miscellaneous/SetEnvironmentVariableW/test4/paltest_setenvironmentvariablew_test miscellaneous/SetLastError/test1/paltest_setlasterror_test1 miscellaneous/_i64tow/test1/paltest_i64tow_test1 pal_specific/PAL_errno/test1/paltest_pal_errno_test1 -pal_specific/PAL_GetPALDirectoryW/test1/paltest_pal_getpaldirectoryw_test1 pal_specific/PAL_GetUserTempDirectoryW/test1/paltest_pal_getusertempdirectoryw_test1 pal_specific/PAL_Initialize_Terminate/test1/paltest_pal_initialize_terminate_test1 pal_specific/PAL_Initialize_Terminate/test2/paltest_pal_initialize_terminate_test2 diff --git a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetPALDirectoryW/test1/PAL_GetPALDirectoryW.cpp b/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetPALDirectoryW/test1/PAL_GetPALDirectoryW.cpp deleted file mode 100644 index 21a1bb3f0aa5..000000000000 --- a/src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetPALDirectoryW/test1/PAL_GetPALDirectoryW.cpp +++ /dev/null @@ -1,77 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -/*============================================================= -** -** Source: pal_getpaldirectoryw.c -** -** Purpose: Positive test the PAL_GetPALDirectoryW API. -** Call this API to retrieve a fully-qualified -** directory name where the PAL DLL is loaded from. -** -** -**============================================================*/ -#define UNICODE -#include - -PALTEST(pal_specific_PAL_GetPALDirectoryW_test1_paltest_pal_getpaldirectoryw_test1, "pal_specific/PAL_GetPALDirectoryW/test1/paltest_pal_getpaldirectoryw_test1") -{ - int err; - BOOL bValue; - DWORD dwFileAttribute; - WCHAR *wpDirectoryName = NULL; - char *pDirectoryName = NULL; - - /*Initialize the PAL environment*/ - err = PAL_Initialize(argc, argv); - if(0 != err) - { - return FAIL; - } - - /*allocate momory to store the directory name*/ - wpDirectoryName = (WCHAR*)malloc(MAX_PATH*sizeof(WCHAR)); - if(NULL == wpDirectoryName) - { - Fail("\nFailed to allocate memory for storing directory name!\n"); - } - - UINT size = MAX_PATH; - /*retrieve the machine configuration directory*/ - bValue = PAL_GetPALDirectoryW(wpDirectoryName, &size); - if(FALSE == bValue) - { - free(wpDirectoryName); - Fail("Failed to call PAL_GetPALDirectoryW API, " - "error code =%u\n", GetLastError()); - } - - - /*convert wide char string to a standard one*/ - pDirectoryName = convertC(wpDirectoryName); - if(0 == strlen(pDirectoryName)) - { - free(wpDirectoryName); - free(pDirectoryName); - Fail("The retrieved directory name string is empty!\n"); - } - - /*free the memory*/ - free(pDirectoryName); - - /*retrieve the attribute of a file or directory*/ - dwFileAttribute = GetFileAttributesW(wpDirectoryName); - - /*free the memory*/ - free(wpDirectoryName); - - /*check if the attribute indicates a directory*/ - if(FILE_ATTRIBUTE_DIRECTORY != - (dwFileAttribute & FILE_ATTRIBUTE_DIRECTORY)) - { - Fail("The retrieved directory name is not a valid directory!\n"); - } - - PAL_Terminate(); - return PASS; -} diff --git a/src/coreclr/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt b/src/coreclr/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt index 37c7d6ed8e01..6533c5bc9cc5 100644 --- a/src/coreclr/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt +++ b/src/coreclr/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt @@ -111,7 +111,6 @@ miscellaneous/MessageBoxW/test1/paltest_messageboxw_test1 miscellaneous/MessageBoxW/test2/paltest_messageboxw_test2 miscellaneous/wsprintfW/test2/paltest_wsprintfw_test2 miscellaneous/wsprintfW/test7/paltest_wsprintfw_test7 -pal_specific/PAL_GetPALDirectoryW/test1/paltest_pal_getpaldirectoryw_test1 pal_specific/PAL_GetUserTempDirectoryW/test1/paltest_pal_getusertempdirectoryw_test1 pal_specific/PAL_get_stderr/test1/paltest_pal_get_stderr_test1 pal_specific/PAL_get_stdin/test1/paltest_pal_get_stdin_test1 diff --git a/src/coreclr/src/scripts/genEventing.py b/src/coreclr/src/scripts/genEventing.py index a7919768c3ab..09b0c3d4b84a 100644 --- a/src/coreclr/src/scripts/genEventing.py +++ b/src/coreclr/src/scripts/genEventing.py @@ -274,9 +274,9 @@ def generateClrallEvents(eventNodes,allTemplates): clrallEvents.append("EventPipeEventEnabled" + eventName + "()") if os.name == 'posix': - clrallEvents.append("|| (XplatEventLogger::IsEventLoggingEnabled() && EventXplatEnabled" + eventName + "());}\n\n") + clrallEvents.append(" || (XplatEventLogger::IsEventLoggingEnabled() && EventXplatEnabled" + eventName + "());}\n\n") else: - clrallEvents.append(";}\n\n") + clrallEvents.append(" || EventXplatEnabled" + eventName + "();}\n\n") #generate FireEtw functions fnptype = [] fnbody = [] diff --git a/src/coreclr/src/tools/ILVerification/ILImporter.Verify.cs b/src/coreclr/src/tools/ILVerification/ILImporter.Verify.cs index 787afb52578b..6540aafca606 100644 --- a/src/coreclr/src/tools/ILVerification/ILImporter.Verify.cs +++ b/src/coreclr/src/tools/ILVerification/ILImporter.Verify.cs @@ -201,11 +201,9 @@ public ILImporter(MethodDesc method, MethodIL methodIL) } } - public Action ReportVerificationError - { - set; - private get; - } + public Action ReportVerificationError { set; private get; } + + public bool SanityChecks { set; private get; } public void Verify() { @@ -509,9 +507,9 @@ void VerificationError(VerifierError error) if (_currentBasicBlock != null) _currentBasicBlock.IncrementErrorCount(); - var args = new ErrorArgument[] - { - new ErrorArgument("Offset", _currentInstructionOffset) + var args = new ErrorArgument[] + { + new ErrorArgument("Offset", _currentInstructionOffset) }; ReportVerificationError(args, error); } @@ -566,7 +564,7 @@ bool Check(bool cond, VerifierError error, StackValue found, StackValue expected void CheckIsNumeric(StackValue value) { - if (!Check(StackValueKind.Int32 <= value.Kind && value.Kind <= StackValueKind.Float, + if (!Check(StackValueKind.Int32 <= value.Kind && value.Kind <= StackValueKind.Float, VerifierError.ExpectedNumericType, value)) { AbortBasicBlockVerification(); @@ -601,14 +599,14 @@ void CheckIsByRef(StackValue value) void CheckIsArray(StackValue value) { - Check((value.Kind == StackValueKind.ObjRef) && ((value.Type == null) || value.Type.IsSzArray), + Check((value.Kind == StackValueKind.ObjRef) && ((value.Type == null) || value.Type.IsSzArray), VerifierError.ExpectedArray /* , value */); } - void CheckIsAssignable(StackValue src, StackValue dst) + void CheckIsAssignable(StackValue src, StackValue dst, VerifierError error = VerifierError.StackUnexpected) { if (!IsAssignable(src, dst)) - VerificationError(VerifierError.StackUnexpected, src, dst); + VerificationError(error, src, dst); } private void CheckIsValidLeaveTarget(BasicBlock src, BasicBlock target) @@ -647,7 +645,7 @@ private void CheckIsValidLeaveTarget(BasicBlock src, BasicBlock target) ref var targetRegion = ref _exceptionRegions[target.TryIndex.Value].ILRegion; // Target is not enclosing source - if (targetRegion.TryOffset > srcRegion.TryOffset || + if (targetRegion.TryOffset > srcRegion.TryOffset || src.StartOffset >= targetRegion.TryOffset + targetRegion.TryLength) { // Target is not first instruction @@ -687,8 +685,8 @@ private void CheckIsValidLeaveTarget(BasicBlock src, BasicBlock target) ref var targetRegion = ref _exceptionRegions[target.TryIndex.Value].ILRegion; // If target is not associated try block, and not enclosing srcRegion - if (target.TryIndex != src.HandlerIndex && - (targetRegion.TryOffset > srcRegion.HandlerOffset || + if (target.TryIndex != src.HandlerIndex && + (targetRegion.TryOffset > srcRegion.HandlerOffset || targetRegion.TryOffset + targetRegion.TryLength < srcRegion.HandlerOffset)) { // If target is not first instruction of try, or not a direct sibling @@ -771,7 +769,7 @@ bool IsValidBranchTarget(BasicBlock src, BasicBlock target, bool isFallthrough, ref var srcRegion = ref _exceptionRegions[src.TryIndex.Value].ILRegion; ref var targetRegion = ref _exceptionRegions[target.TryIndex.Value].ILRegion; // If target is inside source region - if (srcRegion.TryOffset <= targetRegion.TryOffset && + if (srcRegion.TryOffset <= targetRegion.TryOffset && target.StartOffset < srcRegion.TryOffset + srcRegion.TryLength) { // Only branching to first instruction of try-block is valid @@ -919,7 +917,7 @@ bool IsValidBranchTarget(BasicBlock src, BasicBlock target, bool isFallthrough, } /// - /// Checks whether the given enclosed try block is a direct child try-region of + /// Checks whether the given enclosed try block is a direct child try-region of /// the given enclosing try block. /// /// The block enclosing the try block given by . @@ -1008,11 +1006,11 @@ static string TypeToStringForIsAssignable(TypeDesc type) case TypeFlags.Char: return "Char"; case TypeFlags.SByte: case TypeFlags.Byte: return "Byte"; - case TypeFlags.Int16: + case TypeFlags.Int16: case TypeFlags.UInt16: return "Short"; case TypeFlags.Int32: case TypeFlags.UInt32: return "Int32"; - case TypeFlags.Int64: + case TypeFlags.Int64: case TypeFlags.UInt64: return "Long"; case TypeFlags.Single: return "Single"; case TypeFlags.Double: return "Double"; @@ -1302,6 +1300,12 @@ void StartImportingBasicBlock(BasicBlock basicBlock) var exceptionType = ResolveTypeToken(r.ILRegion.ClassToken); Check(!exceptionType.IsByRef, VerifierError.CatchByRef); basicBlock.EntryStack[0] = StackValue.CreateObjRef(exceptionType); + + if (SanityChecks && basicBlock.EntryStack[0] != StackValue.CreateObjRef(GetWellKnownType(WellKnownType.Object))) + { + CheckIsAssignable(basicBlock.EntryStack[0], StackValue.CreateObjRef(GetWellKnownType(WellKnownType.Exception)), + VerifierError.ThrowOrCatchOnlyExceptionType); + } } } else @@ -1606,21 +1610,21 @@ void ImportCall(ILOpcode opcode, int token) { // Rules for non-virtual call to a non-final virtual method (ECMA III.3.19: Verifiability of 'call'): - // Define: + // Define: // The "this" pointer is considered to be "possibly written" if // 1. Its address have been taken (LDARGA 0) anywhere in the method. // (or) // 2. It has been stored to (STARG.0) anywhere in the method. // A non-virtual call to a non-final virtual method is only allowed if - // 1. The this pointer passed to the callee is an instance of a boxed value type. + // 1. The this pointer passed to the callee is an instance of a boxed value type. // (or) // 2. The this pointer passed to the callee is the current method's this pointer. // (and) The current method's this pointer is not "possibly written". - // Thus the rule is that if you assign to this ANYWHERE you can't make "base" calls to - // virtual methods. (Luckily this does not affect .ctors, since they are not virtual). - // This is stronger than is strictly needed, but implementing a laxer rule is significantly + // Thus the rule is that if you assign to this ANYWHERE you can't make "base" calls to + // virtual methods. (Luckily this does not affect .ctors, since they are not virtual). + // This is stronger than is strictly needed, but implementing a laxer rule is significantly // harder and more error prone. if (method.IsVirtual && !method.IsFinal && !actualThis.IsBoxedValueType) { @@ -1636,7 +1640,7 @@ void ImportCall(ILOpcode opcode, int token) Check(!IsByRefLike(declaredThis), VerifierError.TailByRef, declaredThis); // Tail calls on constrained calls should be illegal too: - // when instantiated at a value type, a constrained call may pass the address of a stack allocated value + // when instantiated at a value type, a constrained call may pass the address of a stack allocated value Check(constrained == null, VerifierError.TailByRef); } } @@ -1832,7 +1836,7 @@ void PropagateThisState(BasicBlock current, BasicBlock next) { if (next.IsThisInitialized && !_isThisInitialized) { - // Next block has 'this' initialized, but current state has not + // Next block has 'this' initialized, but current state has not // therefore next block must be reverified with 'this' uninitialized if (next.State == BasicBlock.ImportState.WasVerified && next.ErrorCount == 0) next.State = BasicBlock.ImportState.Unmarked; @@ -2218,6 +2222,12 @@ void ImportThrow() CheckIsObjRef(value); + if (SanityChecks && value != StackValue.CreateObjRef(GetWellKnownType(WellKnownType.Object))) + { + CheckIsAssignable(value, StackValue.CreateFromType(GetWellKnownType(WellKnownType.Exception)), + VerifierError.ThrowOrCatchOnlyExceptionType); + } + EmptyTheStack(); } @@ -2250,7 +2260,7 @@ void ImportBox(int token) Check(!IsByRefLike(targetType), VerifierError.BoxByRef, targetType); - Check(type.IsPrimitive || targetType.Kind == StackValueKind.ObjRef || + Check(type.IsPrimitive || targetType.Kind == StackValueKind.ObjRef || type.IsGenericParameter || type.IsValueType, VerifierError.ExpectedValClassObjRefVariable); Check(type.CheckConstraints(), VerifierError.UnsatisfiedBoxOperand); diff --git a/src/coreclr/src/tools/ILVerification/Strings.resx b/src/coreclr/src/tools/ILVerification/Strings.resx index 82f096b8eb49..726cf6dd46c0 100644 --- a/src/coreclr/src/tools/ILVerification/Strings.resx +++ b/src/coreclr/src/tools/ILVerification/Strings.resx @@ -171,6 +171,9 @@ ByRef not allowed as catch type. + + The type caught or thrown must be derived from System.Exception. + Code size is zero. diff --git a/src/coreclr/src/tools/ILVerification/Verifier.cs b/src/coreclr/src/tools/ILVerification/Verifier.cs index db15494289a0..032c386c84fd 100644 --- a/src/coreclr/src/tools/ILVerification/Verifier.cs +++ b/src/coreclr/src/tools/ILVerification/Verifier.cs @@ -179,7 +179,10 @@ private IEnumerable VerifyMethod(EcmaModule module, MethodIL try { - var importer = new ILImporter(method, methodIL); + var importer = new ILImporter(method, methodIL) + { + SanityChecks = _verifierOptions.SanityChecks + }; importer.ReportVerificationError = (args, code) => { @@ -321,5 +324,6 @@ private void ThrowMissingSystemModule() public class VerifierOptions { public bool IncludeMetadataTokensInErrorMessages { get; set; } + public bool SanityChecks { get; set; } } } diff --git a/src/coreclr/src/tools/ILVerification/VerifierError.cs b/src/coreclr/src/tools/ILVerification/VerifierError.cs index 331d0a88544e..4be09b1ce021 100644 --- a/src/coreclr/src/tools/ILVerification/VerifierError.cs +++ b/src/coreclr/src/tools/ILVerification/VerifierError.cs @@ -145,6 +145,7 @@ public enum VerifierError DelegateCtorSigO, // Unrecognized delegate .ctor signature; expected Object. //E_RA_PTR_TO_STACK "Mkrefany on TypedReference, ArgHandle, or ArgIterator." CatchByRef, // ByRef not allowed as catch type. + ThrowOrCatchOnlyExceptionType, // The type caught or thrown must be derived from System.Exception. LdvirtftnOnStatic, // ldvirtftn on static. CallVirtOnStatic, // callvirt on static. InitLocals, // initlocals must be set for verifiable methods with one or more local variables. @@ -189,6 +190,6 @@ public enum VerifierError //IDS_E_GLOBAL "" //IDS_E_MDTOKEN "[mdToken=0x%x]" InterfaceImplHasDuplicate, // InterfaceImpl has a duplicate - InterfaceMethodNotImplemented // Class implements interface but not method + InterfaceMethodNotImplemented // Class implements interface but not method } } diff --git a/src/coreclr/src/tools/ILVerify/Program.cs b/src/coreclr/src/tools/ILVerify/Program.cs index b9fbf35d8276..a5b380778cfa 100644 --- a/src/coreclr/src/tools/ILVerify/Program.cs +++ b/src/coreclr/src/tools/ILVerify/Program.cs @@ -46,6 +46,7 @@ public class Options public string[] InputFilePath { get; set; } public string[] Reference { get; set; } public string SystemModule { get; set; } + public bool SanityChecks { get; set; } public string[] Include { get; set; } public FileInfo IncludeFile { get; set; } public string[] Exclude { get; set; } @@ -63,6 +64,7 @@ public static RootCommand RootCommand() command.AddArgument(new Argument("input-file-path", "Input file(s)") { Arity = new ArgumentArity(1, Int32.MaxValue) }); command.AddOption(new Option(new[] { "--reference", "-r" }, "Reference metadata from the specified assembly")); command.AddOption(new Option(new[] { "--system-module", "-s" }, "System module name (default: mscorlib)")); + command.AddOption(new Option(new[] { "--sanity-checks", "-c" }, "Check for valid constructs that are likely mistakes")); command.AddOption(new Option(new[] { "--include", "-i" }, "Use only methods/types/namespaces, which match the given regular expression(s)")); command.AddOption(new Option(new[] { "--include-file" }, "Same as --include, but the regular expression(s) are declared line by line in the specified file.").ExistingOnly()); command.AddOption(new Option(new[] { "--exclude", "-e" }, "Skip methods/types/namespaces, which match the given regular expression(s)")); @@ -144,7 +146,11 @@ private Program(Options options) private int Run() { - _verifier = new Verifier(this, GetVerifierOptions()); + _verifier = new Verifier(this, new VerifierOptions + { + IncludeMetadataTokensInErrorMessages = _options.Tokens, + SanityChecks = _options.SanityChecks + }); _verifier.SetSystemModuleName(new AssemblyName(_options.SystemModule ?? "mscorlib")); int numErrors = 0; @@ -164,11 +170,6 @@ private int Run() } } - private VerifierOptions GetVerifierOptions() - { - return new VerifierOptions { IncludeMetadataTokensInErrorMessages = _options.Tokens }; - } - private void PrintVerifyMethodsResult(VerificationResult result, EcmaModule module, string pathOrModuleName) { Write("[IL]: Error ["); @@ -257,7 +258,7 @@ private static void PrintMethod(EcmaMethod method) } } } - catch + catch { Write("Error while getting method signature"); } @@ -409,7 +410,7 @@ private string GetQualifiedClassName(MetadataReader metadataReader, TypeDefiniti /// /// This method returns the fully qualified method name by concatenating assembly, type and method name. - /// This method exists to avoid additional assembly resolving, which might be triggered by calling + /// This method exists to avoid additional assembly resolving, which might be triggered by calling /// MethodDesc.ToString(). /// private string GetQualifiedMethodName(MetadataReader metadataReader, MethodDefinitionHandle methodHandle) diff --git a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs index 10b4af9a61c2..4d0840836efd 100644 --- a/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs +++ b/src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs @@ -100,6 +100,11 @@ public class RuntimeFunction /// public int StartAddress { get; } + /// + /// The relative virtual address to the end of the code block + /// + public int EndAddress { get; } + /// /// The size of the code block in bytes /// @@ -107,7 +112,16 @@ public class RuntimeFunction /// The EndAddress field in the runtime functions section is conditional on machine type /// Size is -1 for images without the EndAddress field /// - public int Size { get; } + public int Size + { + get + { + EnsureInitialized(); + return _size; + } + } + + private int _size = -1; /// /// The relative virtual address to the unwind info @@ -171,41 +185,54 @@ public RuntimeFunction( int codeOffset, ReadyToRunMethod method, BaseUnwindInfo unwindInfo, - BaseGcInfo gcInfo) + Func gcInfo) { _readyToRunReader = readyToRunReader; + Id = id; StartAddress = startRva; + EndAddress = endRva; UnwindRVA = unwindRva; Method = method; UnwindInfo = unwindInfo; + CodeOffset = codeOffset; + method.GetGcInfo = gcInfo; + } + + private void EnsureInitialized() + { + if (_size < 0) + { + _size = GetSize(); + } + } - if (endRva != -1) + private int GetSize() + { + if (EndAddress != -1) { - Size = endRva - startRva; + return EndAddress - StartAddress; } - else if (unwindInfo is x86.UnwindInfo) + else if (UnwindInfo is x86.UnwindInfo) { - Size = (int)((x86.UnwindInfo)unwindInfo).FunctionLength; + return (int)((x86.UnwindInfo)UnwindInfo).FunctionLength; } - else if (unwindInfo is Arm.UnwindInfo) + else if (UnwindInfo is Arm.UnwindInfo) { - Size = (int)((Arm.UnwindInfo)unwindInfo).FunctionLength; + return (int)((Arm.UnwindInfo)UnwindInfo).FunctionLength; } - else if (unwindInfo is Arm64.UnwindInfo) + else if (UnwindInfo is Arm64.UnwindInfo) { - Size = (int)((Arm64.UnwindInfo)unwindInfo).FunctionLength; + return (int)((Arm64.UnwindInfo)UnwindInfo).FunctionLength; } - else if (gcInfo != null) + else if (Method.GcInfo != null) { - Size = gcInfo.CodeLength; + return Method.GcInfo.CodeLength; } else { - Size = -1; + return -1; } - CodeOffset = codeOffset; - method.GcInfo = gcInfo; } } @@ -273,7 +300,19 @@ private void EnsureRuntimeFunctions() /// public int EntryPointRuntimeFunctionId { get; set; } - public BaseGcInfo GcInfo { get; set; } + public Func GetGcInfo { get; set; } + + public BaseGcInfo GcInfo + { + get + { + EnsureInitialized(); + return _gcInfo; + } + } + + private BaseGcInfo _gcInfo; + private ReadyToRunReader _readyToRunReader; private List _fixupCells; @@ -404,6 +443,14 @@ public ReadyToRunMethod( SignatureString = sb.ToString(); } + private void EnsureInitialized() + { + if (_gcInfo == null && GetGcInfo != null) + { + _gcInfo = GetGcInfo(); + } + } + private void EnsureFixupCells() { if (_fixupCells != null) @@ -460,7 +507,7 @@ private void ParseRuntimeFunctions() int runtimeFunctionSize = _readyToRunReader.CalculateRuntimeFunctionSize(); int runtimeFunctionOffset = _readyToRunReader.CompositeReader.GetOffset(_readyToRunReader.ReadyToRunHeader.Sections[ReadyToRunSectionType.RuntimeFunctions].RelativeVirtualAddress); int curOffset = runtimeFunctionOffset + runtimeFunctionId * runtimeFunctionSize; - BaseGcInfo gcInfo = null; + Func gcInfo = default(Func); int codeOffset = 0; for (int i = 0; i < RuntimeFunctionCount; i++) { @@ -485,7 +532,7 @@ private void ParseRuntimeFunctions() unwindInfo = new Amd64.UnwindInfo(_readyToRunReader.Image, unwindOffset); if (i == 0) { - gcInfo = new Amd64.GcInfo(_readyToRunReader.Image, unwindOffset + unwindInfo.Size, _readyToRunReader.Machine, _readyToRunReader.ReadyToRunHeader.MajorVersion); + gcInfo = new Func(() => new Amd64.GcInfo(_readyToRunReader.Image, unwindOffset + unwindInfo.Size, _readyToRunReader.Machine, _readyToRunReader.ReadyToRunHeader.MajorVersion)); } } else if (_readyToRunReader.Machine == Machine.I386) @@ -493,7 +540,7 @@ private void ParseRuntimeFunctions() unwindInfo = new x86.UnwindInfo(_readyToRunReader.Image, unwindOffset); if (i == 0) { - gcInfo = new x86.GcInfo(_readyToRunReader.Image, unwindOffset, _readyToRunReader.Machine, _readyToRunReader.ReadyToRunHeader.MajorVersion); + gcInfo = new Func(() => new x86.GcInfo(_readyToRunReader.Image, unwindOffset, _readyToRunReader.Machine, _readyToRunReader.ReadyToRunHeader.MajorVersion)); } } else if (_readyToRunReader.Machine == Machine.ArmThumb2) @@ -501,7 +548,7 @@ private void ParseRuntimeFunctions() unwindInfo = new Arm.UnwindInfo(_readyToRunReader.Image, unwindOffset); if (i == 0) { - gcInfo = new Amd64.GcInfo(_readyToRunReader.Image, unwindOffset + unwindInfo.Size, _readyToRunReader.Machine, _readyToRunReader.ReadyToRunHeader.MajorVersion); // Arm and Arm64 use the same GcInfo format as x64 + gcInfo = new Func(() => new Amd64.GcInfo(_readyToRunReader.Image, unwindOffset + unwindInfo.Size, _readyToRunReader.Machine, _readyToRunReader.ReadyToRunHeader.MajorVersion)); // Arm and Arm64 use the same GcInfo format as x6 } } else if (_readyToRunReader.Machine == Machine.Arm64) @@ -509,7 +556,7 @@ private void ParseRuntimeFunctions() unwindInfo = new Arm64.UnwindInfo(_readyToRunReader.Image, unwindOffset); if (i == 0) { - gcInfo = new Amd64.GcInfo(_readyToRunReader.Image, unwindOffset + unwindInfo.Size, _readyToRunReader.Machine, _readyToRunReader.ReadyToRunHeader.MajorVersion); + gcInfo = new Func(() => new Amd64.GcInfo(_readyToRunReader.Image, unwindOffset + unwindInfo.Size, _readyToRunReader.Machine, _readyToRunReader.ReadyToRunHeader.MajorVersion)); } } diff --git a/src/coreclr/src/tools/aot/crossgen2/CommandLineOptions.cs b/src/coreclr/src/tools/aot/crossgen2/CommandLineOptions.cs index 1c8bcd4e63ed..7fc55e36aaf6 100644 --- a/src/coreclr/src/tools/aot/crossgen2/CommandLineOptions.cs +++ b/src/coreclr/src/tools/aot/crossgen2/CommandLineOptions.cs @@ -53,6 +53,7 @@ internal class CommandLineOptions public string SingleMethodTypeName; public string SingleMethodName; + public int SingleMethodIndex; public IReadOnlyList SingleMethodGenericArg; public IReadOnlyList CodegenOptions; @@ -107,6 +108,7 @@ public CommandLineOptions(string[] args) syntax.DefineOption("singlemethodtypename", ref SingleMethodTypeName, SR.SingleMethodTypeName); syntax.DefineOption("singlemethodname", ref SingleMethodName, SR.SingleMethodMethodName); + syntax.DefineOption("singlemethodindex", ref SingleMethodIndex, SR.SingleMethodIndex); syntax.DefineOptionList("singlemethodgenericarg", ref SingleMethodGenericArg, SR.SingleMethodGenericArgs); syntax.DefineOption("parallelism", ref Parallelism, SR.ParalellismOption); diff --git a/src/coreclr/src/tools/aot/crossgen2/Program.cs b/src/coreclr/src/tools/aot/crossgen2/Program.cs index 86122bec482f..751e10b19087 100644 --- a/src/coreclr/src/tools/aot/crossgen2/Program.cs +++ b/src/coreclr/src/tools/aot/crossgen2/Program.cs @@ -634,7 +634,50 @@ private MethodDesc CheckAndParseSingleMethodModeArguments(CompilerTypeSystemCont TypeDesc owningType = FindType(context, _commandLineOptions.SingleMethodTypeName); // TODO: allow specifying signature to distinguish overloads - MethodDesc method = owningType.GetMethod(_commandLineOptions.SingleMethodName, null); + MethodDesc method = null; + bool printMethodList = false; + int curIndex = 0; + foreach (var searchMethod in owningType.GetMethods()) + { + if (searchMethod.Name != _commandLineOptions.SingleMethodName) + continue; + + curIndex++; + if (_commandLineOptions.SingleMethodIndex != 0) + { + if (curIndex == _commandLineOptions.SingleMethodIndex) + { + method = searchMethod; + break; + } + } + else + { + if (method == null) + { + method = searchMethod; + } + else + { + printMethodList = true; + } + } + } + + if (printMethodList) + { + curIndex = 0; + foreach (var searchMethod in owningType.GetMethods()) + { + if (searchMethod.Name != _commandLineOptions.SingleMethodName) + continue; + + curIndex++; + Console.WriteLine($"{curIndex} - {searchMethod}"); + } + throw new CommandLineException(SR.SingleMethodIndexNeeded); + } + if (method == null) throw new CommandLineException(string.Format(SR.MethodNotFoundOnType, _commandLineOptions.SingleMethodName, _commandLineOptions.SingleMethodTypeName)); @@ -666,6 +709,20 @@ private static bool DumpReproArguments(CodeGenerationFailedException ex) Console.Write($"--singlemethodtypename \"{formatter.FormatName(failingMethod.OwningType, true)}\""); Console.Write($" --singlemethodname {failingMethod.Name}"); + { + int curIndex = 0; + foreach (var searchMethod in failingMethod.OwningType.GetMethods()) + { + if (searchMethod.Name != failingMethod.Name) + continue; + + curIndex++; + if (searchMethod == failingMethod.GetMethodDefinition()) + { + Console.Write($" --singlemethodindex {curIndex}"); + } + } + } for (int i = 0; i < failingMethod.Instantiation.Length; i++) Console.Write($" --singlemethodgenericarg \"{formatter.FormatName(failingMethod.Instantiation[i], true)}\""); diff --git a/src/coreclr/src/tools/aot/crossgen2/Properties/Resources.resx b/src/coreclr/src/tools/aot/crossgen2/Properties/Resources.resx index 687e7818f337..6020c7a61f97 100644 --- a/src/coreclr/src/tools/aot/crossgen2/Properties/Resources.resx +++ b/src/coreclr/src/tools/aot/crossgen2/Properties/Resources.resx @@ -226,7 +226,10 @@ Single method compilation: generic arguments to the method - Single method compilation: generic arguments to the method + Single method compilation: method name + + + Single method compilation: Index of method if there are multiple with the same name Single method compilation: name of the owning type @@ -252,6 +255,9 @@ Both method name and type name are required parameters for single method mode + + There are multiple methods with the same name. Specify --singlemethodindex [index] with the correct index. + Type '{0}' not found diff --git a/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj b/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj index 2d41acad35a5..ad11c3afa816 100644 --- a/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj +++ b/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj @@ -59,7 +59,7 @@ x64 unix - win + win $(TargetOSComponent)_$(TargetArchitecture)_$(TargetArchitecture) $(TargetOSComponent)_$(TargetArchitecture)_$(CrossHostArch) @@ -88,7 +88,7 @@ - + .a - .lib + .lib diff --git a/src/coreclr/src/tools/crossgen/CMakeLists.txt b/src/coreclr/src/tools/crossgen/CMakeLists.txt index 4af88ce4dc1f..eff97b01a882 100644 --- a/src/coreclr/src/tools/crossgen/CMakeLists.txt +++ b/src/coreclr/src/tools/crossgen/CMakeLists.txt @@ -57,8 +57,8 @@ target_link_libraries(crossgen if(CLR_CMAKE_HOST_UNIX) target_link_libraries(crossgen mscorrc - coreclrpal palrt + coreclrpal ) else() target_link_libraries(crossgen diff --git a/src/coreclr/src/tools/crossgen/crossgen.cpp b/src/coreclr/src/tools/crossgen/crossgen.cpp index 803ea5aff6e7..61faeb761a6b 100644 --- a/src/coreclr/src/tools/crossgen/crossgen.cpp +++ b/src/coreclr/src/tools/crossgen/crossgen.cpp @@ -398,14 +398,8 @@ void ComputeTPAListFromPlatformAssembliesPath(LPCWSTR pwzPlatformAssembliesPaths } } -extern HMODULE g_hThisInst; - int _cdecl wmain(int argc, __in_ecount(argc) WCHAR **argv) { -#ifndef TARGET_UNIX - g_hThisInst = WszGetModuleHandle(NULL); -#endif - ///////////////////////////////////////////////////////////////////////// // // Parse the arguments diff --git a/src/coreclr/src/tools/r2rdump/TextDumper.cs b/src/coreclr/src/tools/r2rdump/TextDumper.cs index dc0608b991ab..682abd7c05f6 100644 --- a/src/coreclr/src/tools/r2rdump/TextDumper.cs +++ b/src/coreclr/src/tools/r2rdump/TextDumper.cs @@ -155,12 +155,13 @@ internal override void DumpMethod(ReadyToRunMethod method) if (_options.GC && method.GcInfo != null) { + BaseGcInfo gcInfo = method.GcInfo; _writer.WriteLine("GC info:"); - _writer.Write(method.GcInfo); + _writer.Write(gcInfo); if (_options.Raw) { - DumpBytes(method.GcInfo.Offset, (uint)method.GcInfo.Size, "", false); + DumpBytes(gcInfo.Offset, (uint)gcInfo.Size, "", false); } } SkipLine(); @@ -226,7 +227,8 @@ internal override void DumpDisasm(RuntimeFunction rtf, int imageOffset) _writer.WriteLine(); } - if (!_options.HideTransitions && rtf.Method.GcInfo?.Transitions != null && rtf.Method.GcInfo.Transitions.TryGetValue(codeOffset, out List transitionsForOffset)) + BaseGcInfo gcInfo = (_options.HideTransitions ? null : rtf.Method?.GcInfo); + if (gcInfo != null && gcInfo.Transitions.TryGetValue(codeOffset, out List transitionsForOffset)) { string[] formattedTransitions = new string[transitionsForOffset.Count]; for (int transitionIndex = 0; transitionIndex < formattedTransitions.Length; transitionIndex++) diff --git a/src/coreclr/src/utilcode/ccomprc.cpp b/src/coreclr/src/utilcode/ccomprc.cpp index a3d669bcb949..1b38edf419e8 100644 --- a/src/coreclr/src/utilcode/ccomprc.cpp +++ b/src/coreclr/src/utilcode/ccomprc.cpp @@ -18,7 +18,7 @@ __attribute__((visibility("default"))) DECLARE_NATIVE_STRING_RESOURCE_TABLE(NATI #include // External prototypes. -extern HINSTANCE GetModuleInst(); +extern void* GetClrModuleBase(); //***************************************************************************** // Do the mapping from an langId to an hinstance node @@ -677,7 +677,7 @@ HRESULT CCompRC::LoadLibraryThrows(HRESOURCEDLL * pHInst) #ifdef CROSSGEN_COMPILE // The resources are embeded into the .exe itself for crossgen - *pHInst = GetModuleInst(); + *pHInst = (HINSTANCE)GetClrModuleBase(); #else #ifdef SELF_NO_HOST @@ -688,7 +688,7 @@ HRESULT CCompRC::LoadLibraryThrows(HRESOURCEDLL * pHInst) // Try first in the same directory as this dll. - hr = GetCORSystemDirectoryInternaL(rcPath); + hr = GetClrModuleDirectory(rcPath); if (FAILED(hr)) return hr; diff --git a/src/coreclr/src/utilcode/clrhost.cpp b/src/coreclr/src/utilcode/clrhost.cpp index 5aa3a35c2e3f..188418fccdfa 100644 --- a/src/coreclr/src/utilcode/clrhost.cpp +++ b/src/coreclr/src/utilcode/clrhost.cpp @@ -12,7 +12,30 @@ #include "clrnt.h" #include "contract.h" -HINSTANCE g_hmodCoreCLR; +#if HOST_WINDOWS +extern "C" IMAGE_DOS_HEADER __ImageBase; +#else +static void* pImageBase = NULL; +#endif + +void* GetClrModuleBase() +{ + LIMITED_METHOD_CONTRACT; + +#if HOST_WINDOWS + return (void*)&__ImageBase; +#else // HOST_WINDOWS + // PAL_GetSymbolModuleBase defers to dladdr, which is typically a hash lookup through symbols. + // It should be fairly fast, however it may take a loader lock, so we will cache the result. + void* pRet = VolatileLoadWithoutBarrier(&pImageBase); + if (!pRet) + { + pImageBase = pRet = (void*)PAL_GetSymbolModuleBase((void*)GetClrModuleBase); + } + + return pRet; +#endif // HOST_WINDOWS +} thread_local int t_CantAllocCount; @@ -89,39 +112,15 @@ int RFS_HashStack () #endif // FAILPOINTS_ENABLED - - -//----------------------------------------------------------------------------------- -// This is the approved way to get a module handle to mscorwks.dll (or coreclr.dll). -// Never call GetModuleHandle(mscorwks) yourself as this will break side-by-side inproc. -// -// This function is safe to call before or during CRT initialization. It can not -// legally return NULL (it only does so in the case of a broken build invariant.) -// -// TODO puCLR SxS utilcode work: Since this is never supposed to return NULL, it should -// not be present in SELF_NO_HOST builds of utilcode where there isn't necessarily a -// CLR in the process. We should also ASSERT that GetModuleHandleA isn't returning -// NULL below - we've probably been getting away with this in SELF_NO_HOST cases like -// mscordbi.dll. -//----------------------------------------------------------------------------------- -HMODULE GetCLRModule () +DWORD GetClrModulePathName(SString& buffer) { - //! WARNING: At the time this function is invoked, the C Runtime has NOT been fully initialized, let alone the CLR. - //! So don't put in a runtime contract and don't invoke other functions in the CLR (not even _ASSERTE!) - - STATIC_CONTRACT_NOTHROW; - STATIC_CONTRACT_SUPPORTS_DAC; // DAC can call in here since we initialize the SxS callbacks in ClrDataAccess::Initialize. - - // You got here because the dll that included this copy of utilcode.lib. - // did not set g_hmodCoreCLR. The most likely cause is that you're running - // a dll (other than coreclr.dll) that links to utilcode.lib. - _ASSERTE(g_hmodCoreCLR != NULL); - - return g_hmodCoreCLR; +#ifdef HOST_WINDOWS + return WszGetModuleFileName((HINSTANCE)GetClrModuleBase(), buffer); +#else + return WszGetModuleFileName(PAL_GetPalHostModule(), buffer); +#endif } - - #if defined(SELF_NO_HOST) HMODULE CLRLoadLibrary(LPCWSTR lpLibFileName) diff --git a/src/coreclr/src/utilcode/ex.cpp b/src/coreclr/src/utilcode/ex.cpp index 56c1b552eead..7b15e4a98a24 100644 --- a/src/coreclr/src/utilcode/ex.cpp +++ b/src/coreclr/src/utilcode/ex.cpp @@ -31,6 +31,9 @@ GVAL_IMPL_INIT(HRESULT, g_hrFatalError, S_OK); // and it will do nothing. void GetLastThrownObjectExceptionFromThread(Exception **ppException); +// Helper function to get pointer to clr module base +void* GetClrModuleBase(); + Exception *Exception::g_OOMException = NULL; // avoid global constructors @@ -1269,7 +1272,7 @@ static DWORD MarkAsThrownByUsWorker(UINT numArgs, /*out*/ ULONG_PTR exceptionArg exceptionArgs[0] = arg0; #if !defined(FEATURE_UTILCODE_NO_DEPENDENCIES) - exceptionArgs[INSTANCE_TAGGED_SEH_PARAM_ARRAY_SIZE - 1] = (ULONG_PTR) (GetCLRModule()); + exceptionArgs[INSTANCE_TAGGED_SEH_PARAM_ARRAY_SIZE - 1] = (ULONG_PTR)GetClrModuleBase(); #endif // !defined(FEATURE_UTILCODE_NO_DEPENDENCIES) return INSTANCE_TAGGED_SEH_PARAM_ARRAY_SIZE; @@ -1317,7 +1320,7 @@ BOOL WasThrownByUs(const EXCEPTION_RECORD *pcER, DWORD dwExceptionCode) return FALSE; } #if!defined(FEATURE_UTILCODE_NO_DEPENDENCIES) - if ( ((ULONG_PTR)(GetCLRModule())) != pcER->ExceptionInformation[INSTANCE_TAGGED_SEH_PARAM_ARRAY_SIZE - 1] ) + if ((ULONG_PTR)GetClrModuleBase() != pcER->ExceptionInformation[INSTANCE_TAGGED_SEH_PARAM_ARRAY_SIZE - 1] ) { return FALSE; } diff --git a/src/coreclr/src/utilcode/longfilepathwrappers.cpp b/src/coreclr/src/utilcode/longfilepathwrappers.cpp index 365d91b61d87..3afc611c3b21 100644 --- a/src/coreclr/src/utilcode/longfilepathwrappers.cpp +++ b/src/coreclr/src/utilcode/longfilepathwrappers.cpp @@ -765,65 +765,6 @@ FindFirstFileExWrapper( } #endif // HOST_WINDOWS - -#ifdef HOST_WINDOWS - -#if ! defined(DACCESS_COMPILE) && !defined(SELF_NO_HOST) -extern HINSTANCE g_hThisInst; -#endif// ! defined(DACCESS_COMPILE) && !defined(SELF_NO_HOST) - -BOOL PAL_GetPALDirectoryWrapper(SString& pbuffer) -{ - - HRESULT hr = S_OK; - - PathString pPath; - DWORD dwPath; - HINSTANCE hinst = NULL; - -#if ! defined(DACCESS_COMPILE) && !defined(SELF_NO_HOST) - hinst = g_hThisInst; -#endif// ! defined(DACCESS_COMPILE) && !defined(SELF_NO_HOST) - -#ifndef CROSSGEN_COMPILE - _ASSERTE(hinst != NULL); -#endif - - dwPath = WszGetModuleFileName(hinst, pPath); - - if(dwPath == 0) - { - hr = HRESULT_FROM_GetLastErrorNA(); - } - else - { - hr = CopySystemDirectory(pPath, pbuffer); - } - - return (hr == S_OK); -} - -#else - -BOOL PAL_GetPALDirectoryWrapper(SString& pbuffer) -{ - BOOL retval = FALSE; - COUNT_T size = MAX_LONGPATH; - - if(!(retval = PAL_GetPALDirectoryW(pbuffer.OpenUnicodeBuffer(size - 1), &size))) - { - pbuffer.CloseBuffer(0); - retval = PAL_GetPALDirectoryW(pbuffer.OpenUnicodeBuffer(size - 1), &size); - } - - pbuffer.CloseBuffer(size); - - return retval; -} - -#endif // HOST_WINDOWS - - //Implementation of LongFile Helpers const WCHAR LongFile::DirectorySeparatorChar = W('\\'); const WCHAR LongFile::AltDirectorySeparatorChar = W('/'); diff --git a/src/coreclr/src/utilcode/makepath.cpp b/src/coreclr/src/utilcode/makepath.cpp index 374cda432dba..4bf8787242a1 100644 --- a/src/coreclr/src/utilcode/makepath.cpp +++ b/src/coreclr/src/utilcode/makepath.cpp @@ -151,11 +151,9 @@ void MakePath ( } -// Returns the directory for HMODULE. So, if HMODULE was for "C:\Dir1\Dir2\Filename.DLL", -// then this would return "C:\Dir1\Dir2\" (note the trailing backslash). -HRESULT GetHModuleDirectory( - __in HMODULE hMod, - SString& wszPath) +// Returns the directory for clr module. So, if path was for "C:\Dir1\Dir2\Filename.DLL", +// then this would return "C:\Dir1\Dir2\" (note the trailing backslash).HRESULT GetClrModuleDirectory(SString& wszPath) +HRESULT GetClrModuleDirectory(SString& wszPath) { CONTRACTL { @@ -165,16 +163,14 @@ HRESULT GetHModuleDirectory( } CONTRACTL_END; - DWORD dwRet = WszGetModuleFileName(hMod, wszPath); + DWORD dwRet = GetClrModulePathName(wszPath); - if (dwRet == 0) + if (dwRet == 0) { // Some other error. return HRESULT_FROM_GetLastError(); } - CopySystemDirectory(wszPath, wszPath); - - + CopySystemDirectory(wszPath, wszPath); return S_OK; } diff --git a/src/coreclr/src/utilcode/stresslog.cpp b/src/coreclr/src/utilcode/stresslog.cpp index 7d5562bef51f..7d01fc09ca6b 100644 --- a/src/coreclr/src/utilcode/stresslog.cpp +++ b/src/coreclr/src/utilcode/stresslog.cpp @@ -141,7 +141,7 @@ void StressLog::Leave(CRITSEC_COOKIE) { /*********************************************************************************/ void StressLog::Initialize(unsigned facilities, unsigned level, unsigned maxBytesPerThread, - unsigned maxBytesTotal, HMODULE hMod) + unsigned maxBytesTotal, void* moduleBase) { STATIC_CONTRACT_LEAF; @@ -173,18 +173,14 @@ void StressLog::Initialize(unsigned facilities, unsigned level, unsigned maxByt GetSystemTimeAsFileTime (&theLog.startTime); theLog.startTimeStamp = getTimeStamp(); + theLog.moduleOffset = (SIZE_T)moduleBase; #ifndef HOST_UNIX - theLog.moduleOffset = (SIZE_T)hMod; // HMODULES are base addresses. - #ifdef _DEBUG HMODULE hModNtdll = GetModuleHandleA("ntdll.dll"); theLog.RtlCaptureStackBackTrace = reinterpret_cast( GetProcAddress(hModNtdll, "RtlCaptureStackBackTrace")); #endif // _DEBUG - -#else // !HOST_UNIX - theLog.moduleOffset = (SIZE_T)PAL_GetSymbolModuleBase((void *)StressLog::Initialize); #endif // !HOST_UNIX #if !defined (STRESS_LOG_READONLY) && defined(HOST_WINDOWS) diff --git a/src/coreclr/src/utilcode/util.cpp b/src/coreclr/src/utilcode/util.cpp index d9cdedbd7f4f..c034ae193185 100644 --- a/src/coreclr/src/utilcode/util.cpp +++ b/src/coreclr/src/utilcode/util.cpp @@ -2951,20 +2951,18 @@ LPWSTR *SegmentCommandLine(LPCWSTR lpCmdLine, DWORD *pNumArgs) //====================================================================== // This function returns true, if it can determine that the instruction pointer // refers to a code address that belongs in the range of the given image. -// @TODO: Merge with IsIPInModule from vm\util.hpp - -BOOL IsIPInModule(HMODULE_TGT hModule, PCODE ip) +BOOL IsIPInModule(PTR_VOID pModuleBaseAddress, PCODE ip) { STATIC_CONTRACT_LEAF; SUPPORTS_DAC; struct Param { - HMODULE_TGT hModule; + PTR_VOID pModuleBaseAddress; PCODE ip; BOOL fRet; } param; - param.hModule = hModule; + param.pModuleBaseAddress = pModuleBaseAddress; param.ip = ip; param.fRet = FALSE; @@ -2972,7 +2970,7 @@ BOOL IsIPInModule(HMODULE_TGT hModule, PCODE ip) #ifdef HOST_WINDOWS PAL_TRY(Param *, pParam, ¶m) { - PTR_BYTE pBase = dac_cast(pParam->hModule); + PTR_BYTE pBase = dac_cast(pParam->pModuleBaseAddress); PTR_IMAGE_DOS_HEADER pDOS = NULL; PTR_IMAGE_NT_HEADERS pNT = NULL; diff --git a/src/coreclr/src/vm/.vscode/c_cpp_properties.json b/src/coreclr/src/vm/.vscode/c_cpp_properties.json index 86adb9feee34..6cf89552d9d2 100644 --- a/src/coreclr/src/vm/.vscode/c_cpp_properties.json +++ b/src/coreclr/src/vm/.vscode/c_cpp_properties.json @@ -3,7 +3,7 @@ { "name": "Win32-Debug", "includePath": [ - "../../../../artifacts/obj/coreclr/Windows_NT.x64.Debug/src/vm/dac", + "../../../../artifacts/obj/coreclr/windows.x64.Debug/src/vm/dac", "../../src/vm/dac", "../../src/vm", "../../src/pal/prebuilt/inc", @@ -16,8 +16,8 @@ "../../src/md/inc", "../../src/classlibnative/bcltype", "../../src/classlibnative/inc", - "../../../../artifacts/obj/coreclr/Windows_NT.x64.Debug/src/inc", - "../../../../artifacts/obj/coreclr/Windows_NT.x64.Debug/src/inc/etw", + "../../../../artifacts/obj/coreclr/windows.x64.Debug/src/inc", + "../../../../artifacts/obj/coreclr/windows.x64.Debug/src/inc/etw", "../../src/vm/amd64" ], "defines": [ diff --git a/src/coreclr/src/vm/ClrEtwAll.man b/src/coreclr/src/vm/ClrEtwAll.man index f7fdca03d6b8..cf3666a9abc6 100644 --- a/src/coreclr/src/vm/ClrEtwAll.man +++ b/src/coreclr/src/vm/ClrEtwAll.man @@ -227,6 +227,7 @@ + @@ -2356,6 +2357,28 @@ + +