diff --git a/docs/design/features/OsrDetailsAndDebugging.md b/docs/design/features/OsrDetailsAndDebugging.md index 1b1303eccb402d..60d697473c147b 100644 --- a/docs/design/features/OsrDetailsAndDebugging.md +++ b/docs/design/features/OsrDetailsAndDebugging.md @@ -338,7 +338,7 @@ Note if a Tier0 method is recursive and has loops there can be some interesting ### Seeing which OSR methods are created -* `DOTNET_DumpJittedMethods=1` will specially mark OSR methods with the inspiring IL offsets. +* `DOTNET_JitDisasmSummary=1` will specially mark OSR methods with the inspiring IL offsets. For example, running a libraries test with some stressful OSR settings, there ended up being 699 OSR methods jitted out of 160675 total methods. Grepping for OSR in the dump output, the last few lines were: diff --git a/eng/Signing.props b/eng/Signing.props index b4fb10e90e4a8f..f76a7aa22c2481 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -1,5 +1,4 @@ - - + + + + + @@ -31,8 +37,6 @@ - - @@ -61,33 +65,4 @@ - - - - - false - - - - - - - - - - - - - - - - diff --git a/eng/Versions.props b/eng/Versions.props index 69cae7c3f38ef3..ab111c3909e6ef 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -7,7 +7,7 @@ 0 0 7.0.100 - 6.0.8 + 6.0.9 rc 2 1.1.2-beta1.22403.2 - 7.0.0-preview-20220721.1 + 7.0.0-preview-20220822.1 7.0.100-1.22423.4 $(MicrosoftNETILLinkTasksVersion) diff --git a/eng/pipelines/common/evaluate-default-paths.yml b/eng/pipelines/common/evaluate-default-paths.yml index 7198ecd5540c1e..358027fe7152b6 100644 --- a/eng/pipelines/common/evaluate-default-paths.yml +++ b/eng/pipelines/common/evaluate-default-paths.yml @@ -113,7 +113,8 @@ jobs: - src/mono/wasm/host/* - src/mono/wasm/runtime/* - src/mono/wasm/templates/* - - src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/* + - src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/* + - src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/* - src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/* - src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/* - src/mono/nuget/Microsoft.NETCore.BrowserDebugHost.Transport/* diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index 83a0efd39874f0..a5a6231d70dcf0 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -135,12 +135,12 @@ jobs: pool: # Public Linux Build Pool ${{ if and(or(in(parameters.osGroup, 'Linux', 'FreeBSD', 'Android', 'Tizen'), eq(parameters.jobParameters.hostedOs, 'Linux')), eq(variables['System.TeamProject'], 'public')) }}: - name: NetCore1ESPool-Public + name: NetCore1ESPool-Svc-Public demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open # Official Build Linux Pool ${{ if and(or(in(parameters.osGroup, 'Linux', 'FreeBSD', 'Browser', 'Android', 'Tizen'), eq(parameters.jobParameters.hostedOs, 'Linux')), ne(variables['System.TeamProject'], 'public')) }}: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 # OSX Build Pool (we don't have on-prem OSX BuildPool @@ -149,12 +149,12 @@ jobs: # Official Build Windows Pool ${{ if and(eq(parameters.osGroup, 'windows'), ne(variables['System.TeamProject'], 'public')) }}: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals windows.vs2022.amd64 # Public Windows Build Pool ${{ if and(or(eq(parameters.osGroup, 'windows'), eq(parameters.jobParameters.hostedOs, 'windows')), eq(variables['System.TeamProject'], 'public')) }}: - name: NetCore1ESPool-Public + name: NetCore1ESPool-Svc-Public demands: ImageOverride -equals windows.vs2022.amd64.open diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index a226e0fd35e759..930580eae47391 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -261,25 +261,12 @@ jobs: targetFolder: $(buildProductRootFolderPath)/sharedFramework overWrite: true - # Sign diagnostic files on Windows - ${{ if and(eq(parameters.osGroup, 'windows'), eq(parameters.signBinaries, true)) }}: - - powershell: >- - eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 $(officialBuildIdArg) - /p:DiagnosticsFilesRoot="$(buildProductRootFolderPath)" - /p:SignDiagnostics=true - /p:DotNetSignType=$(SignType) - -noBl - /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfig)/SignDiagnostics.binlog - -projects $(Build.SourcesDirectory)\eng\empty.csproj - displayName: Sign Diagnostic Binaries - - - task: PublishPipelineArtifact@1 - displayName: Publish Signing Logs - inputs: - targetPath: '$(Build.SourcesDirectory)/artifacts/log/' - artifactName: ${{ format('SignLogs_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} - continueOnError: true - condition: always() + - template: /eng/pipelines/coreclr/templates/sign-diagnostic-files.yml + parameters: + basePath: $(buildProductRootFolderPath) + isOfficialBuild: ${{ parameters.signBinaries }} + timeoutInMinutes: 30 # Builds using gcc are not tested, and clrTools unitests do not publish the build artifacts - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, 'clrTools'), ne(parameters.disableClrTest, true)) }}: @@ -300,6 +287,7 @@ jobs: archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} + isOfficialBuild: ${{ parameters.signBinaries }} ${{ if eq(parameters.archType, 'arm') }}: hostArchType: x86 ${{ else }}: diff --git a/eng/pipelines/coreclr/templates/crossdac-build.yml b/eng/pipelines/coreclr/templates/crossdac-build.yml index 9bc3125f6a050b..31154ec5487986 100644 --- a/eng/pipelines/coreclr/templates/crossdac-build.yml +++ b/eng/pipelines/coreclr/templates/crossdac-build.yml @@ -1,5 +1,6 @@ parameters: archType: '' + isOfficialBuild: false osGroup: '' osSubgroup: '' hostArchType: '' @@ -52,6 +53,12 @@ steps: displayName: Gather CrossDac Artifacts + - template: /eng/pipelines/coreclr/templates/sign-diagnostic-files.yml + parameters: + basePath: $(crossDacArtifactPath) + isOfficialBuild: ${{ parameters.isOfficialBuild }} + timeoutInMinutes: 30 + - ${{ if eq(parameters.osGroup, 'Linux') }}: - task: CopyFiles@2 displayName: Gather runtime for CrossDac diff --git a/eng/pipelines/coreclr/templates/crossdac-pack.yml b/eng/pipelines/coreclr/templates/crossdac-pack.yml index 40e375bb9375c4..fc3ef404c171a9 100644 --- a/eng/pipelines/coreclr/templates/crossdac-pack.yml +++ b/eng/pipelines/coreclr/templates/crossdac-pack.yml @@ -54,19 +54,6 @@ jobs: - ${{ parameters.runtimeFlavor }}_${{ parameters.runtimeVariant }}_product_build_${{ platform }}_${{ parameters.buildConfig }} steps: - # Install MicroBuild for signing the package - - ${{ if eq(parameters.isOfficialBuild, true) }}: - - template: /eng/pipelines/common/restore-internal-tools.yml - - - task: MicroBuildSigningPlugin@2 - displayName: Install MicroBuild plugin for Signing - inputs: - signType: $(SignType) - zipSources: false - feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json - continueOnError: false - condition: and(succeeded(), in(variables['SignType'], 'real', 'test')) - - task: DownloadBuildArtifacts@0 displayName: Download CrossDac artifacts inputs: @@ -77,16 +64,6 @@ jobs: - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset crossdacpack -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) $(crossDacArgs) -ci displayName: Build crossdac packaging - # Sign diagnostic files - - ${{ if eq(parameters.isOfficialBuild, true) }}: - - powershell: >- - eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 $(officialBuildIdArg) - /p:PackagesFolder="$(Build.SourcesDirectory)/artifacts/packages/$(buildConfig)" - /p:SignDiagnosticsPackages=true - /p:DotNetSignType=$(SignType) - -projects $(Build.SourcesDirectory)\eng\empty.csproj - displayName: Sign CrossDac package and contents - # Save packages using the prepare-signed-artifacts format. - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml parameters: diff --git a/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml b/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml new file mode 100644 index 00000000000000..7b020552ad5cb4 --- /dev/null +++ b/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml @@ -0,0 +1,80 @@ +parameters: + basePath: '' + isOfficialBuild: '' + timeoutInMinutes: '' + +steps: +- ${{ if and(eq(parameters.isOfficialBuild, true), ne(variables['Build.Reason'], 'PullRequest')) }}: + - task: UseDotNet@2 + displayName: Install .NET 6 SDK for signing. + inputs: + packageType: 'sdk' + version: '6.0.x' + installationPath: '$(Agent.TempDirectory)/dotnet' + + - task: EsrpCodeSigning@1 + displayName: Sign Diagnostic Binaries + inputs: + ConnectedServiceName: 'dotnetesrp-diagnostics-dnceng' + FolderPath: ${{ parameters.basePath }} + Pattern: | + **/mscordaccore*.dll + **/mscordbi*.dll + UseMinimatch: true + signConfigType: 'inlineSignParams' + inlineOperation: >- + [ + { + "keyCode": "CP-471322", + "operationCode": "SigntoolSign", + "parameters": { + "OpusName": "Microsoft", + "OpusInfo": "http://www.microsoft.com", + "PageHash": "/NPH", + "FileDigest": "/fd sha256", + "TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" + }, + "toolName": "sign", + "toolVersion": "1.0" + }, + { + "KeyCode": "CP-471322", + "OperationCode": "SigntoolVerify", + "Parameters": {}, + "ToolName": "sign", + "ToolVersion": "1.0" + } + ] + SessionTimeout: ${{ parameters.timeoutInMinutes }} + MaxConcurrency: '50' + MaxRetryAttempts: '5' + env: + DOTNET_MULTILEVEL_LOOKUP: 0 + DOTNET_ROOT: '$(Agent.TempDirectory)/dotnet' + DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR: '$(Agent.TempDirectory)/dotnet' + + - powershell: | + $filesToSign = $(Get-ChildItem -Recurse ${{ parameters.basePath }} -Include mscordaccore*.dll, mscordbi*.dll) + foreach ($file in $filesToSign) { + $signingCert = $(Get-AuthenticodeSignature $file).SignerCertificate + if ($signingCert -eq $null) + { + throw "File $file does not contain a signature." + } + + if ($signingCert.Subject -ne "CN=.NET DAC, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" ` + -or $signingCert.Issuer -ne "CN=Microsoft Code Signing PCA 2010, O=Microsoft Corporation, L=Redmond, S=Washington, C=US") + { + throw "File $file not in expected trust chain." + } + + $certEKU = $signingCert.Extensions.Where({ $_.Oid.FriendlyName -eq "Enhanced Key Usage" }) | Select -First 1 + + if ($certEKU.EnhancedKeyUsages.Where({ $_.Value -eq "1.3.6.1.4.1.311.84.4.1" }).Count -ne 1) + { + throw "Signature for $file does not contain expected EKU." + } + + Write-Host "$file is correctly signed." + } + displayName: Validate diagnostic signatures diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index ca2ec8777146d6..887e7747dc34bc 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -33,7 +33,7 @@ jobs: - job: EnterpriseLinuxTests timeoutInMinutes: 120 pool: - name: NetCore1ESPool-Public + name: NetCore1ESPool-Svc-Public demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open steps: - bash: | diff --git a/eng/pipelines/libraries/stress/http.yml b/eng/pipelines/libraries/stress/http.yml index 6a270c0a60a7af..e7190d71f88d4d 100644 --- a/eng/pipelines/libraries/stress/http.yml +++ b/eng/pipelines/libraries/stress/http.yml @@ -30,7 +30,7 @@ jobs: variables: DUMPS_SHARE_MOUNT_ROOT: "/dumps-share" pool: - name: NetCore1ESPool-Public + name: NetCore1ESPool-Svc-Public demands: ImageOverride -equals 1es-ubuntu-1804-open steps: @@ -96,7 +96,7 @@ jobs: variables: DUMPS_SHARE_MOUNT_ROOT: "C:/dumps-share" pool: - name: NetCore1ESPool-Public + name: NetCore1ESPool-Svc-Public demands: ImageOverride -equals 1es-windows-2022-open steps: diff --git a/eng/pipelines/libraries/stress/ssl.yml b/eng/pipelines/libraries/stress/ssl.yml index 856627aac2ba10..9c0e67acdd431f 100644 --- a/eng/pipelines/libraries/stress/ssl.yml +++ b/eng/pipelines/libraries/stress/ssl.yml @@ -29,7 +29,7 @@ jobs: displayName: Docker Linux timeoutInMinutes: 120 pool: - name: NetCore1ESPool-Public + name: NetCore1ESPool-Svc-Public demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open steps: @@ -54,7 +54,7 @@ jobs: displayName: Docker NanoServer timeoutInMinutes: 120 pool: - name: NetCore1ESPool-Public + name: NetCore1ESPool-Svc-Public demands: ImageOverride -equals 1es-windows-2022-open steps: diff --git a/eng/pipelines/mono/templates/workloads-build.yml b/eng/pipelines/mono/templates/workloads-build.yml index 19a56febb53ab4..2dc0cc8a3ae7f4 100644 --- a/eng/pipelines/mono/templates/workloads-build.yml +++ b/eng/pipelines/mono/templates/workloads-build.yml @@ -63,7 +63,8 @@ jobs: IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-*.nupkg IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.tvos-*.nupkg IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.tvossimulator-*.nupkg - IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Workload.Mono.ToolChain.Manifest*.nupkg + IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Workload.Mono.ToolChain.net6.Manifest*.nupkg + IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Workload.Mono.ToolChain.net7.Manifest*.nupkg IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Runtime.MonoTargets.Sdk*.nupkg IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Runtime.MonoAOTCompiler.Task*.nupkg IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Runtime.WebAssembly.Sdk*.nupkg diff --git a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml b/eng/pipelines/official/jobs/prepare-signed-artifacts.yml index 8b250869d444ed..016b799e0099fc 100644 --- a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml +++ b/eng/pipelines/official/jobs/prepare-signed-artifacts.yml @@ -9,7 +9,7 @@ jobs: displayName: Prepare Signed Artifacts dependsOn: ${{ parameters.dependsOn }} pool: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals 1es-windows-2022 # Double the default timeout. timeoutInMinutes: 240 diff --git a/eng/pipelines/official/stages/publish.yml b/eng/pipelines/official/stages/publish.yml index 1061c783f2ab57..86aaa49a8bae31 100644 --- a/eng/pipelines/official/stages/publish.yml +++ b/eng/pipelines/official/stages/publish.yml @@ -19,7 +19,7 @@ stages: publishUsingPipelines: true dependsOn: PrepareSignedArtifacts pool: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals 1es-windows-2022 # Stages-based publishing entry point diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets index 7df09a51810648..b4187faf8f6dda 100644 --- a/eng/testing/tests.wasm.targets +++ b/eng/testing/tests.wasm.targets @@ -155,8 +155,11 @@ /> + + diff --git a/src/coreclr/jit/codegencommon.cpp b/src/coreclr/jit/codegencommon.cpp index f4c0a37ce224bb..45cbd8ac6c0737 100644 --- a/src/coreclr/jit/codegencommon.cpp +++ b/src/coreclr/jit/codegencommon.cpp @@ -1887,31 +1887,9 @@ void CodeGen::genGenerateMachineCode() if (compiler->fgHaveProfileData()) { - const char* pgoKind; - switch (compiler->fgPgoSource) - { - case ICorJitInfo::PgoSource::Static: - pgoKind = "Static"; - break; - case ICorJitInfo::PgoSource::Dynamic: - pgoKind = "Dynamic"; - break; - case ICorJitInfo::PgoSource::Blend: - pgoKind = "Blend"; - break; - case ICorJitInfo::PgoSource::Text: - pgoKind = "Textual"; - break; - case ICorJitInfo::PgoSource::Sampling: - pgoKind = "Sample-based"; - break; - default: - pgoKind = "Unknown"; - break; - } - - printf("; with %s PGO: edge weights are %s, and fgCalledCount is " FMT_WT "\n", pgoKind, - compiler->fgHaveValidEdgeWeights ? "valid" : "invalid", compiler->fgCalledCount); + printf("; with %s: edge weights are %s, and fgCalledCount is " FMT_WT "\n", + compiler->compGetPgoSourceName(), compiler->fgHaveValidEdgeWeights ? "valid" : "invalid", + compiler->fgCalledCount); } if (compiler->fgPgoFailReason != nullptr) diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp index e73052a780f60f..dd0e41fe9852da 100644 --- a/src/coreclr/jit/compiler.cpp +++ b/src/coreclr/jit/compiler.cpp @@ -34,9 +34,7 @@ extern ICorJitHost* g_jitHost; #define COLUMN_FLAGS (COLUMN_KINDS + 32) #endif -#if defined(DEBUG) unsigned Compiler::jitTotalMethodCompiled = 0; -#endif // defined(DEBUG) #if defined(DEBUG) LONG Compiler::jitNestingLevel = 0; @@ -4082,8 +4080,9 @@ bool Compiler::compRsvdRegCheck(FrameLayoutState curState) // const char* Compiler::compGetTieringName(bool wantShortName) const { - const bool tier0 = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER0); - const bool tier1 = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER1); + const bool tier0 = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER0); + const bool tier1 = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER1); + const bool instrumenting = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_BBINSTR); if (!opts.compMinOptsIsSet) { @@ -4097,13 +4096,13 @@ const char* Compiler::compGetTieringName(bool wantShortName) const if (tier0) { - return "Tier0"; + return instrumenting ? "Instrumented Tier0" : "Tier0"; } else if (tier1) { if (opts.jitFlags->IsSet(JitFlags::JIT_FLAG_OSR)) { - return "Tier1-OSR"; + return instrumenting ? "Instrumented Tier1-OSR" : "Tier1-OSR"; } else { @@ -4149,6 +4148,31 @@ const char* Compiler::compGetTieringName(bool wantShortName) const } } +//------------------------------------------------------------------------ +// compGetPgoSourceName: get a string describing PGO source +// +// Returns: +// String describing describing PGO source (e.g. Dynamic, Static, etc) +// +const char* Compiler::compGetPgoSourceName() const +{ + switch (fgPgoSource) + { + case ICorJitInfo::PgoSource::Static: + return "Static PGO"; + case ICorJitInfo::PgoSource::Dynamic: + return "Dynamic PGO"; + case ICorJitInfo::PgoSource::Blend: + return "Blend PGO"; + case ICorJitInfo::PgoSource::Text: + return "Textual PGO"; + case ICorJitInfo::PgoSource::Sampling: + return "Sample-based PGO"; + default: + return ""; + } +} + //------------------------------------------------------------------------ // compGetStressMessage: get a string describing jitstress capability // for this method @@ -5106,9 +5130,31 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl compJitTelemetry.NotifyEndOfCompilation(); #endif -#if defined(DEBUG) - ++Compiler::jitTotalMethodCompiled; -#endif // defined(DEBUG) + unsigned methodsCompiled = (unsigned)InterlockedIncrement((LONG*)&Compiler::jitTotalMethodCompiled); + + if (JitConfig.JitDisasmSummary() && !compIsForInlining()) + { + char osrBuffer[20] = {0}; + if (opts.IsOSR()) + { + // Tiering name already includes "OSR", we just want the IL offset + sprintf_s(osrBuffer, 20, " @0x%x", info.compILEntry); + } + +#ifdef DEBUG + const char* fullName = info.compFullName; +#else + const char* fullName = eeGetMethodFullName(info.compMethodHnd); +#endif + + char debugPart[128] = {0}; + INDEBUG(sprintf_s(debugPart, 128, ", hash=0x%08x%s", info.compMethodHash(), compGetStressMessage())); + + const bool hasProf = fgHaveProfileData(); + printf("%4d: JIT compiled %s [%s%s%s%s, IL size=%u, code size=%u%s]\n", methodsCompiled, fullName, + compGetTieringName(), osrBuffer, hasProf ? " with " : "", hasProf ? compGetPgoSourceName() : "", + info.compILCodeSize, *methodCodeSize, debugPart); + } compFunctionTraceEnd(*methodCodePtr, *methodCodeSize, false); JITDUMP("Method code size: %d\n", (unsigned)(*methodCodeSize)); @@ -6710,24 +6756,6 @@ int Compiler::compCompileHelper(CORINFO_MODULE_HANDLE classPtr, } #ifdef DEBUG - if ((JitConfig.DumpJittedMethods() == 1) && !compIsForInlining()) - { - enum - { - BUFSIZE = 20 - }; - char osrBuffer[BUFSIZE] = {0}; - if (opts.IsOSR()) - { - // Tiering name already includes "OSR", we just want the IL offset - // - sprintf_s(osrBuffer, BUFSIZE, " @0x%x", info.compILEntry); - } - - printf("Compiling %4d %s::%s, IL size = %u, hash=0x%08x %s%s%s\n", Compiler::jitTotalMethodCompiled, - info.compClassName, info.compMethodName, info.compILCodeSize, info.compMethodHash(), - compGetTieringName(), osrBuffer, compGetStressMessage()); - } if (compIsForInlining()) { compGenTreeID = impInlineInfo->InlinerCompiler->compGenTreeID; diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index 3291aca767c382..d1b52ab79e9474 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -4145,9 +4145,7 @@ class Compiler regNumber getCallArgIntRegister(regNumber floatReg); regNumber getCallArgFloatRegister(regNumber intReg); -#if defined(DEBUG) static unsigned jitTotalMethodCompiled; -#endif #ifdef DEBUG static LONG jitNestingLevel; @@ -9472,6 +9470,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX } const char* compGetTieringName(bool wantShortName = false) const; + const char* compGetPgoSourceName() const; const char* compGetStressMessage() const; codeOptimize compCodeOpt() const diff --git a/src/coreclr/jit/jitconfig.cpp b/src/coreclr/jit/jitconfig.cpp index 6fdbad427fe8a4..cd65af36f106e9 100644 --- a/src/coreclr/jit/jitconfig.cpp +++ b/src/coreclr/jit/jitconfig.cpp @@ -44,14 +44,15 @@ void JitConfigValues::MethodSet::initialize(const WCHAR* list, ICorJitHost* host bool isQuoted = false; // true while parsing inside a quote "this-is-a-quoted-region" MethodName currentName; // Buffer used while parsing the current entry - currentName.m_next = nullptr; - currentName.m_methodNameStart = -1; - currentName.m_methodNameLen = -1; - currentName.m_methodNameWildcardAtEnd = false; - currentName.m_classNameStart = -1; - currentName.m_classNameLen = -1; - currentName.m_classNameWildcardAtEnd = false; - currentName.m_numArgs = -1; + currentName.m_next = nullptr; + currentName.m_methodNameStart = -1; + currentName.m_methodNameLen = -1; + currentName.m_methodNameWildcardAtStart = false; + currentName.m_methodNameWildcardAtEnd = false; + currentName.m_classNameStart = -1; + currentName.m_classNameLen = -1; + currentName.m_classNameWildcardAtEnd = false; + currentName.m_numArgs = -1; enum State { @@ -202,21 +203,31 @@ void JitConfigValues::MethodSet::initialize(const WCHAR* list, ICorJitHost* host } // Is the first character a wildcard? - if (m_list[currentName.m_methodNameStart] == WILD_CHAR) + if (m_list[currentName.m_methodNameStart] == WILD_CHAR && currentName.m_methodNameLen == 1) { // The method name is a full wildcard; mark it as such. currentName.m_methodNameStart = -1; currentName.m_methodNameLen = -1; } - // Is there a wildcard at the end of the method name? - // - else if (m_list[currentName.m_methodNameStart + currentName.m_methodNameLen - 1] == WILD_CHAR) + else { - // i.e. class:foo*, will match any method that starts with "foo" - - // Remove the trailing WILD_CHAR from method name - currentName.m_methodNameLen--; // backup for WILD_CHAR - currentName.m_methodNameWildcardAtEnd = true; + // Is there a wildcard at the start of the method name? + if (m_list[currentName.m_methodNameStart] == WILD_CHAR) + { + // i.e. class:*foo, will match any method that ends with "foo" + // Remove the leading WILD_CHAR from method name + currentName.m_methodNameStart++; + currentName.m_methodNameLen--; + currentName.m_methodNameWildcardAtStart = true; + } + // Is there a wildcard at the end of the method name? + if (m_list[currentName.m_methodNameStart + currentName.m_methodNameLen - 1] == WILD_CHAR) + { + // i.e. class:foo*, will match any method that starts with "foo" + // Remove the trailing WILD_CHAR from method name + currentName.m_methodNameLen--; // backup for WILD_CHAR + currentName.m_methodNameWildcardAtEnd = true; + } } // should we expect an ARG_LIST? @@ -309,11 +320,35 @@ void JitConfigValues::MethodSet::destroy(ICorJitHost* host) m_names = nullptr; } -static bool matchesName(const char* const name, int nameLen, bool wildcardAtEnd, const char* const s2) +// strstr that is length-limited, this implementation is not intended to be used on hot paths +static size_t strnstr(const char* pSrc, size_t srcSize, const char* needle, size_t needleSize) +{ + if (srcSize < needleSize) + { + return -1; + } + + for (size_t srcPos = 0; srcPos <= srcSize - needleSize; srcPos++) + { + if (strncmp(pSrc + srcPos, needle, needleSize) == 0) + { + return srcPos; + } + } + return -1; +} + +static bool matchesName( + const char* const name, int nameLen, bool wildcardAtStart, bool wildcardAtEnd, const char* const s2) { - // 's2' must start with 'nameLen' characters of 'name' - if (strncmp(name, s2, nameLen) != 0) + if (wildcardAtStart && (int)strnstr(s2, strlen(s2), name, nameLen) == -1) + { + return false; + } + + if (!wildcardAtStart && strncmp(name, s2, nameLen) != 0) { + // 's2' must start with 'nameLen' characters of 'name' return false; } @@ -346,12 +381,14 @@ bool JitConfigValues::MethodSet::contains(const char* methodName, if (name->m_methodNameStart != -1) { const char* expectedMethodName = &m_list[name->m_methodNameStart]; - if (!matchesName(expectedMethodName, name->m_methodNameLen, name->m_methodNameWildcardAtEnd, methodName)) + if (!matchesName(expectedMethodName, name->m_methodNameLen, name->m_methodNameWildcardAtStart, + name->m_methodNameWildcardAtEnd, methodName)) { // C++ embeds the class name into the method name; deal with that here. const char* colon = strchr(methodName, ':'); if (colon != nullptr && colon[1] == ':' && - matchesName(expectedMethodName, name->m_methodNameLen, name->m_methodNameWildcardAtEnd, methodName)) + matchesName(expectedMethodName, name->m_methodNameLen, name->m_methodNameWildcardAtStart, + name->m_methodNameWildcardAtEnd, methodName)) { int classLen = (int)(colon - methodName); if (name->m_classNameStart == -1 || @@ -367,8 +404,7 @@ bool JitConfigValues::MethodSet::contains(const char* methodName, // If m_classNameStart is valid, check for a mismatch if (className == nullptr || name->m_classNameStart == -1 || - matchesName(&m_list[name->m_classNameStart], name->m_classNameLen, name->m_classNameWildcardAtEnd, - className)) + matchesName(&m_list[name->m_classNameStart], name->m_classNameLen, false, false, className)) { return true; } @@ -379,8 +415,8 @@ bool JitConfigValues::MethodSet::contains(const char* methodName, if (nsSep != nullptr && nsSep != className) { const char* onlyClass = nsSep[-1] == '.' ? nsSep : &nsSep[1]; - if (matchesName(&m_list[name->m_classNameStart], name->m_classNameLen, name->m_classNameWildcardAtEnd, - onlyClass)) + if (matchesName(&m_list[name->m_classNameStart], name->m_classNameLen, false, + name->m_classNameWildcardAtEnd, onlyClass)) { return true; } diff --git a/src/coreclr/jit/jitconfig.h b/src/coreclr/jit/jitconfig.h index 12d327d292b399..90f3daf9f63174 100644 --- a/src/coreclr/jit/jitconfig.h +++ b/src/coreclr/jit/jitconfig.h @@ -20,6 +20,7 @@ class JitConfigValues MethodName* m_next; int m_methodNameStart; int m_methodNameLen; + bool m_methodNameWildcardAtStart; bool m_methodNameWildcardAtEnd; int m_classNameStart; int m_classNameLen; diff --git a/src/coreclr/jit/jitconfigvalues.h b/src/coreclr/jit/jitconfigvalues.h index 3e6df61b1f71fd..efd5adf017c7d3 100644 --- a/src/coreclr/jit/jitconfigvalues.h +++ b/src/coreclr/jit/jitconfigvalues.h @@ -26,15 +26,14 @@ CONFIG_INTEGER(DiffableDasm, W("JitDiffableDasm"), 0) // Make the disas CONFIG_INTEGER(JitDasmWithAddress, W("JitDasmWithAddress"), 0) // Print the process address next to each instruction of // the disassembly CONFIG_INTEGER(DisplayLoopHoistStats, W("JitLoopHoistStats"), 0) // Display JIT loop hoisting statistics -CONFIG_INTEGER(DisplayLsraStats, W("JitLsraStats"), 0) // Display JIT Linear Scan Register Allocator statistics - // If set to "1", display the stats in textual format. - // If set to "2", display the stats in csv format. - // If set to "3", display the stats in summarize format. - // Recommended to use with JitStdOutFile flag. -CONFIG_STRING(JitLsraOrdering, W("JitLsraOrdering")) // LSRA heuristics ordering -CONFIG_INTEGER(DumpJittedMethods, W("DumpJittedMethods"), 0) // Prints all jitted methods to the console -CONFIG_INTEGER(EnablePCRelAddr, W("JitEnablePCRelAddr"), 1) // Whether absolute addr be encoded as PC-rel offset by - // RyuJIT where possible +CONFIG_INTEGER(DisplayLsraStats, W("JitLsraStats"), 0) // Display JIT Linear Scan Register Allocator statistics + // If set to "1", display the stats in textual format. + // If set to "2", display the stats in csv format. + // If set to "3", display the stats in summarize format. + // Recommended to use with JitStdOutFile flag. +CONFIG_STRING(JitLsraOrdering, W("JitLsraOrdering")) // LSRA heuristics ordering +CONFIG_INTEGER(EnablePCRelAddr, W("JitEnablePCRelAddr"), 1) // Whether absolute addr be encoded as PC-rel offset by + // RyuJIT where possible CONFIG_INTEGER(JitAssertOnMaxRAPasses, W("JitAssertOnMaxRAPasses"), 0) CONFIG_INTEGER(JitBreakEmitOutputInstr, W("JitBreakEmitOutputInstr"), -1) CONFIG_INTEGER(JitBreakMorphTree, W("JitBreakMorphTree"), 0xffffffff) @@ -257,6 +256,8 @@ CONFIG_INTEGER(EnableIncompleteISAClass, W("EnableIncompleteISAClass"), 0) // En CONFIG_METHODSET(JitDisasm, W("JitDisasm")) #endif // !defined(DEBUG) +CONFIG_INTEGER(JitDisasmSummary, W("JitDisasmSummary"), 0) // Prints all jitted methods to the console + CONFIG_INTEGER(RichDebugInfo, W("RichDebugInfo"), 0) // If 1, keep rich debug info and report it back to the EE #ifdef DEBUG diff --git a/src/installer/prepare-artifacts.proj b/src/installer/prepare-artifacts.proj index 3eed860616f28a..f2b108bf4217a9 100644 --- a/src/installer/prepare-artifacts.proj +++ b/src/installer/prepare-artifacts.proj @@ -12,7 +12,7 @@ - + $(ArtifactsObjDir)TempWorkingDir\$([System.Guid]::NewGuid())\ - + $(ProductionVersion) $(ProductVersion) @@ -101,14 +101,14 @@ Lines="$(ProductVersionTxtContents)" Overwrite="true" Encoding="ASCII" /> - + - + @@ -247,7 +247,7 @@ --> @@ -278,7 +278,7 @@ - + toDispose) // No further changes to _state.Disposables, are allowed. _disposed = true; - // ResolvedServices is never cleared for singletons because there might be a compilation running in background - // trying to get a cached singleton service. If it doesn't find it - // it will try to create a new one which will result in an ObjectDisposedException. + } - return _disposables; + if (IsRootScope && !RootProvider.IsDisposed()) + { + // If this ServiceProviderEngineScope instance is a root scope, disposing this instance will need to dispose the RootProvider too. + // Otherwise the RootProvider will never get disposed and will leak. + // Note, if the RootProvider get disposed first, it will automatically dispose all attached ServiceProviderEngineScope objects. + RootProvider.Dispose(); } + + // ResolvedServices is never cleared for singletons because there might be a compilation running in background + // trying to get a cached singleton service. If it doesn't find it + // it will try to create a new one which will result in an ObjectDisposedException. + return _disposables; } } } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs index f66f36b3cf6ed2..dd9b1af11a55a0 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs @@ -89,6 +89,8 @@ internal ServiceProvider(ICollection serviceDescriptors, Serv /// The service that was produced. public object? GetService(Type serviceType) => GetService(serviceType, Root); + internal bool IsDisposed() => _disposed; + /// public void Dispose() { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderEngineScopeTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderEngineScopeTests.cs index d43752db21eba7..e801497236f0b9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderEngineScopeTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderEngineScopeTests.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; using Microsoft.Extensions.DependencyInjection.Specification.Fakes; using Xunit; @@ -17,5 +18,16 @@ public void DoubleDisposeWorks() serviceProviderEngineScope.Dispose(); serviceProviderEngineScope.Dispose(); } + + [Fact] + public void RootEngineScopeDisposeTest() + { + var services = new ServiceCollection(); + ServiceProvider sp = services.BuildServiceProvider(); + var s = sp.GetRequiredService(); + ((IDisposable)s).Dispose(); + + Assert.Throws(() => sp.GetRequiredService()); + } } } diff --git a/src/mono/mono/mini/aot-compiler.c b/src/mono/mono/mini/aot-compiler.c index db6f3435edd886..107507498be330 100644 --- a/src/mono/mono/mini/aot-compiler.c +++ b/src/mono/mono/mini/aot-compiler.c @@ -12737,7 +12737,12 @@ compile_asm (MonoAotCompile *acfg) if (ld_binary_name == NULL) { ld_binary_name = LD_NAME; } - g_string_append_printf (str, "%s%s %s", tool_prefix, ld_binary_name, LD_OPTIONS); + if (acfg->aot_opts.tool_prefix) + g_string_append_printf (str, "\"%s%s\" %s", tool_prefix, ld_binary_name, LD_OPTIONS); + else if (acfg->aot_opts.llvm_only) + g_string_append_printf (str, "%s", acfg->aot_opts.clangxx); + else + g_string_append_printf (str, "\"%s%s\" %s", tool_prefix, ld_binary_name, LD_OPTIONS); #else if (ld_binary_name == NULL) { ld_binary_name = "ld"; diff --git a/src/mono/mono/mini/simd-intrinsics.c b/src/mono/mono/mini/simd-intrinsics.c index 4ce3b622a47679..376f2b69386ceb 100644 --- a/src/mono/mono/mini/simd-intrinsics.c +++ b/src/mono/mono/mini/simd-intrinsics.c @@ -718,6 +718,13 @@ emit_hardware_intrinsics ( if (!info) goto support_probe_complete; id = info->id; + +#ifdef TARGET_ARM64 + if (!(cfg->compile_aot && cfg->full_aot && !cfg->interp) && !intrin_group->jit_supported) { + goto support_probe_complete; + } +#endif + // Hardware intrinsics are LLVM-only. if (!COMPILE_LLVM (cfg) && !intrin_group->jit_supported) goto support_probe_complete; @@ -986,7 +993,7 @@ is_element_type_primitive (MonoType *vector_type) static MonoInst* emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **args) -{ +{ if (!COMPILE_LLVM (cfg)) return NULL; diff --git a/src/mono/nuget/Directory.Build.props b/src/mono/nuget/Directory.Build.props index c37b14a0dfd3fa..5b2f04660da82c 100644 --- a/src/mono/nuget/Directory.Build.props +++ b/src/mono/nuget/Directory.Build.props @@ -12,10 +12,6 @@ true - - - 7.0.0 - $(PackageVersion) diff --git a/src/mono/nuget/Directory.Build.targets b/src/mono/nuget/Directory.Build.targets index 32e2e4251e792f..c3af51a7f58b05 100644 --- a/src/mono/nuget/Directory.Build.targets +++ b/src/mono/nuget/Directory.Build.targets @@ -1,5 +1,13 @@ + + + + $(ProductVersion) + $(PackageVersion) + + + diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.json.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.json.in index b5f29300b4db94..716cd56d9a607f 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.json.in +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.json.in @@ -30,10 +30,10 @@ "abstract": true, "description": "Android Mono AOT Workload", "packs": [ - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-x86", - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-x64", - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm", - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm64" + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x86", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-arm", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-arm64" ], "extends": [ "microsoft-net-runtime-android-net6" ], "platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ] @@ -90,8 +90,8 @@ "packs": [ "Microsoft.NETCore.App.Runtime.Mono.net6.osx-arm64", "Microsoft.NETCore.App.Runtime.Mono.net6.osx-x64", - "Microsoft.NETCore.App.Runtime.osx-arm64", - "Microsoft.NETCore.App.Runtime.osx-x64" + "Microsoft.NETCore.App.Runtime.net6.osx-arm64", + "Microsoft.NETCore.App.Runtime.net6.osx-x64" ], "extends": [ "microsoft-net-runtime-mono-tooling-net6" ], "platforms": [ "osx-arm64", "osx-x64" ] @@ -141,49 +141,49 @@ "kind": "Sdk", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NET.Runtime.MonoAOTCompiler.Task" + "any": "Microsoft.NET.Runtime.MonoAOTCompiler.Task" } }, "Microsoft.NET.Runtime.MonoTargets.Sdk.net6": { "kind": "Sdk", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NET.Runtime.MonoTargets.Sdk" + "any": "Microsoft.NET.Runtime.MonoTargets.Sdk" } }, "Microsoft.NET.Runtime.WebAssembly.Sdk.net6": { "kind": "Sdk", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NET.Runtime.WebAssembly.Sdk" + "any": "Microsoft.NET.Runtime.WebAssembly.Sdk" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.android-arm": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.android-arm64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.android-x64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-x64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.android-x86": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-x86" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-x86" } }, "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x86": { @@ -230,77 +230,77 @@ "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.maccatalyst-x64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.osx-arm64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.osx-x64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-x64" } }, "Microsoft.NETCore.App.Runtime.net6.osx-arm64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" } }, "Microsoft.NETCore.App.Runtime.net6.osx-x64": { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.osx-x64" + "any": "Microsoft.NETCore.App.Runtime.osx-x64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.ios-arm" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm" + "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.ios-arm64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.iossimulator-arm64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.iossimulator-x64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.iossimulator-x86" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" } }, "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvos-arm64": { @@ -315,21 +315,21 @@ "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.tvos-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.tvos-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.tvossimulator-arm64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net6.tvossimulator-x64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64" } }, "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.maccatalyst-arm64": { @@ -418,35 +418,35 @@ "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.browser-wasm" + "any": "Microsoft.NETCore.App.Runtime.Mono.browser-wasm" } }, "Microsoft.NETCore.App.Runtime.net6.win-x64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-x64" + "any": "Microsoft.NETCore.App.Runtime.win-x64" } }, "Microsoft.NETCore.App.Runtime.net6.win-x86" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-x86" + "any": "Microsoft.NETCore.App.Runtime.win-x86" } }, "Microsoft.NETCore.App.Runtime.net6.win-arm" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-arm" + "any": "Microsoft.NETCore.App.Runtime.win-arm" } }, "Microsoft.NETCore.App.Runtime.net6.win-arm64" : { "kind": "framework", "version": "${PackageVersionNet6}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-arm64" + "any": "Microsoft.NETCore.App.Runtime.win-arm64" } } } diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.targets.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.targets.in index 2a6fb0ae431349..ed240a9ced181b 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.targets.in +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.targets.in @@ -97,13 +97,6 @@ - - - - - - - <_MonoWorkloadTargetsMobile>true <_MonoWorkloadRuntimePackPackageVersion>$(_RuntimePackInWorkloadVersion6) diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in index 5575ebc9f4eda1..cbd3cacb453e55 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in @@ -17,9 +17,9 @@ "wasm-experimental": { "description": ".NET WebAssembly experimental tooling", "packs": [ - "Microsoft.NET.Runtime.WebAssembly.Templates", - "Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm", - "Microsoft.NETCore.App.Runtime.Mono.perftrace.browser-wasm" + "Microsoft.NET.Runtime.WebAssembly.Templates.net7", + "Microsoft.NETCore.App.Runtime.Mono.multithread.net7.browser-wasm", + "Microsoft.NETCore.App.Runtime.Mono.perftrace.net7.browser-wasm" ], "extends": [ "wasm-tools" ], "platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ] @@ -151,53 +151,56 @@ "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NET.Runtime.MonoAOTCompiler.Task" + "any": "Microsoft.NET.Runtime.MonoAOTCompiler.Task" } }, "Microsoft.NET.Runtime.MonoTargets.Sdk.net7": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NET.Runtime.MonoTargets.Sdk" + "any": "Microsoft.NET.Runtime.MonoTargets.Sdk" } }, "Microsoft.NET.Runtime.WebAssembly.Sdk.net7": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NET.Runtime.WebAssembly.Sdk" + "any": "Microsoft.NET.Runtime.WebAssembly.Sdk" } }, - "Microsoft.NET.Runtime.WebAssembly.Templates": { + "Microsoft.NET.Runtime.WebAssembly.Templates.net7": { "kind": "template", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NET.Runtime.WebAssembly.Templates" + } }, "Microsoft.NETCore.App.Runtime.Mono.net7.android-arm": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.android-arm64": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.android-x64": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-x64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.android-x86": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.android-x86" + "any": "Microsoft.NETCore.App.Runtime.Mono.android-x86" } }, "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-x86": { @@ -244,35 +247,35 @@ "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.maccatalyst-x64": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.osx-arm64": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.osx-x64": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-x64" } }, "Microsoft.NETCore.App.Runtime.net7.osx-arm64": { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" } }, "Microsoft.NETCore.App.Runtime.net7.osx-x64": { @@ -286,21 +289,21 @@ "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm" + "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.ios-arm64" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.iossimulator-arm64" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.iossimulator-x64" : { @@ -314,7 +317,7 @@ "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" } }, "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvos-arm64": { @@ -329,21 +332,21 @@ "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.tvos-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.tvos-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.tvossimulator-arm64" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64" + "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net7.tvossimulator-x64" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64" + "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64" } }, "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.maccatalyst-arm64": { @@ -432,43 +435,49 @@ "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.browser-wasm" + "any": "Microsoft.NETCore.App.Runtime.Mono.browser-wasm" } }, - "Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm" : { + "Microsoft.NETCore.App.Runtime.Mono.multithread.net7.browser-wasm" : { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm" + } }, - "Microsoft.NETCore.App.Runtime.Mono.perftrace.browser-wasm" : { + "Microsoft.NETCore.App.Runtime.Mono.perftrace.net7.browser-wasm" : { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.perftrace.browser-wasm" + } }, "Microsoft.NETCore.App.Runtime.net7.win-x64" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-x64" + "any": "Microsoft.NETCore.App.Runtime.win-x64" } }, "Microsoft.NETCore.App.Runtime.net7.win-x86" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-x86" + "any": "Microsoft.NETCore.App.Runtime.win-x86" } }, "Microsoft.NETCore.App.Runtime.net7.win-arm" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-arm" + "any": "Microsoft.NETCore.App.Runtime.win-arm" } }, "Microsoft.NETCore.App.Runtime.net7.win-arm64" : { "kind": "framework", "version": "${PackageVersion}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.win-arm64" + "any": "Microsoft.NETCore.App.Runtime.win-arm64" } } } diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.targets.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.targets.in index fd8e9cbe658e39..8063ce6554016e 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.targets.in +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.targets.in @@ -94,13 +94,6 @@ - - - - - - - <_MonoWorkloadTargetsMobile>true <_MonoWorkloadRuntimePackPackageVersion>$(_RuntimePackInWorkloadVersion7) @@ -110,8 +103,8 @@ $(_MonoWorkloadRuntimePackPackageVersion) - Microsoft.NETCore.App.Runtime.Mono.multithread.**RID** - Microsoft.NETCore.App.Runtime.Mono.perftrace.**RID** + Microsoft.NETCore.App.Runtime.Mono.multithread.net7.**RID** + Microsoft.NETCore.App.Runtime.Mono.perftrace.net7.**RID** diff --git a/src/mono/wasm/README.md b/src/mono/wasm/README.md index f8e2344fbf3295..ee88413c8c0790 100644 --- a/src/mono/wasm/README.md +++ b/src/mono/wasm/README.md @@ -203,7 +203,7 @@ Bumping Emscripten version involves these steps: * bump docker images in https://github.com/dotnet/icu, update emscripten files in eng/patches/ * update version number in docs * update `Microsoft.NET.Runtime.Emscripten..Node.win-x64` package name, version and sha hash in https://github.com/dotnet/runtime/blob/main/eng/Version.Details.xml and in https://github.com/dotnet/runtime/blob/main/eng/Versions.props. the sha is the commit hash in https://github.com/dotnet/emsdk and the package version can be found at https://dev.azure.com/dnceng/public/_packaging?_a=feed&feed=dotnet6 -* update packages in the workload manifest https://github.com/dotnet/runtime/blob/main/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.json.in +* update packages in the workload manifest https://github.com/dotnet/runtime/blob/main/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in ## Upgrading NPM packages In folder `src\mono\wasm\runtime\` diff --git a/src/workloads/workloads.csproj b/src/workloads/workloads.csproj index c2250ab18ecbb1..93df927b5a346a 100644 --- a/src/workloads/workloads.csproj +++ b/src/workloads/workloads.csproj @@ -37,38 +37,56 @@ - - - - - - - - - - - - - - - - + <_ComponentResources Include="microsoft-net-runtime-mono-tooling-net6" Title=".NET 6.0 Shared Mobile Build Tools" + Description="Shared build tasks for mobile platform development."/> + <_ComponentResources Include="wasm-tools-net6" Title=".NET 6.0 WebAssembly Build Tools" + Description="Build tools for net6.0 WebAssembly ahead-of-time (AoT) compilation and native linking."/> + <_ComponentResources Include="microsoft-net-runtime-android-net6" Title=".NET 6.0 Android Build Tools" + Description="Build tools for net6.0 Android compilation and native linking."/> + <_ComponentResources Include="microsoft-net-runtime-android-aot-net6" Title=".NET 6.0 Android Build Tools (AoT)" + Description="Build tools for net6.0 Android ahead-of-time (AoT) compilation and native linking."/> + <_ComponentResources Include="microsoft-net-runtime-ios-net6" Title=".NET 6.0 iOS Build Tools" + Description="Build tools for net6.0 iOS compilation and native linking."/> + <_ComponentResources Include="microsoft-net-runtime-tvos-net" Title=".NET 6.0 tvOS Build Tools" + Description="Build tools for net6.0 tvOS compilation and native linking."/> + <_ComponentResources Include="microsoft-net-runtime-maccatalyst-net6" Title=".NET 6.0 Mac Catalyst Build Tools" + Description="Build tools for net6.0 Mac Catalyst compilation and native linking."/> + <_ComponentResources Include="runtimes-ios-net6" Title=".NET 6.0 iOS Runtimes" + Description=".NET 6.0 runtime components for iOS execution."/> + <_ComponentResources Include="runtimes-tvos-net6" Title=".NET 6.0 tvOS Build Tools" + Description=".NET 6.0 runtime components for tvOS execution."/> + <_ComponentResources Include="runtimes-maccatalyst-net6" Title=".NET 6.0 Mac Catalyst Build Tools" + Description=".NET 6.0 runtime components for Mac Catalyst execution."/> + <_ComponentResources Include="runtimes-windows-net6" Title=".NET 6.0 Windows Runtimes" + Description=".NET 6.0 runtime components for Windows execution."/> + +