Skip to content

Commit

Permalink
Merge pull request #104925 from carlossanlop/release/6.0-staging
Browse files Browse the repository at this point in the history
[manual] Merge release/6.0-staging into release/6.0
  • Loading branch information
carlossanlop committed Jul 16, 2024
2 parents 67b32df + 2913386 commit ec9cf12
Show file tree
Hide file tree
Showing 99 changed files with 6,210 additions and 5,791 deletions.
14 changes: 3 additions & 11 deletions docs/design/features/dotnet-pgo.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
# dotnet-pgo Spec
Utilize trace data for improving application performance

NOTE: This documentation page contains information on some features that are still work-in-progress.

## Intro

The dotnet-pgo tool is a cross-platform CLI global tool that enables conversion of traces of .NET Core applications collected via dotnet-trace, ETW, perfview, perfcollect, LTTNG to be used to improve the performance of an application or library.

## Installing dotnet-pgo

The first step is to install the dotnet-pgo CLI global tool.

```cmd
$ dotnet tool install --global dotnet-pgo
You can invoke the tool using the following command: dotnet-pgo
Tool 'dotnet-pgo' (version '6.0.47001') was successfully installed.
```
The only way to use dotnet-pgo is to build it in the runtime repo. To learn how to build the runtime, consult the [how to build](https://github.com/dotnet/runtime/tree/main/docs/workflow/building/coreclr) docs for Windows, macOS, or Linux.

## Using dotnet-pgo to optimize an application

Expand All @@ -37,14 +29,14 @@ set COMPLUS_TC_QuickJitForLoops=1
set COMPLUS_TC_CallCountThreshold=10000
set COMPLUS_ReadyToRun=0
dotnet-trace collect --providers Microsoft-Windows-DotNETRuntime:0x1E000080018:4 -- bin\Release\net6.0\pgotest.exe
dotnet-trace collect --providers Microsoft-Windows-DotNETRuntime:0x1E000080018:4 -- bin\Release\net{version-number-goes-here}.0\pgotest.exe
set COMPLUS_TieredPGO=
set COMPLUS_TC_QuickJitForLoops=
set COMPLUS_TC_CallCountThreshold=
set COMPLUS_ReadyToRun=
dotnet-pgo create-mibc --trace trace.nettrace --output trace.mibc
${YOUR-REPO-ROOT}\artifacts\bin\coreclr\{OS}.{ARCHITECTURE}.{CONFIGURATION}\dotnet-pgo create-mibc --trace trace.nettrace --output trace.mibc
dotnet publish --runtime win-x64 -p:PublishReadyToRun=true -p:ReadyToRunOptimizationData=trace.mibc
```
Expand Down
8 changes: 4 additions & 4 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="6.0.0-rtm.24269.3">
<Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="6.0.0-rtm.24315.1">
<Uri>https://github.com/dotnet/icu</Uri>
<Sha>def3524876b6b84a72e8ed02db6077f9c0ce8a75</Sha>
<Sha>20d255e341e98186edf70b24aa52fdd81797cc51</Sha>
</Dependency>
<Dependency Name="System.Net.MsQuic.Transport" Version="6.0.0-servicing.22205.1">
<Uri>https://github.com/dotnet/msquic</Uri>
Expand Down Expand Up @@ -242,9 +242,9 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>d50065944d8b41d804448a7056351481d583ad3d</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="6.0.0-alpha.0.24271.2">
<Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="6.0.0-alpha.0.24362.1">
<Uri>https://github.com/dotnet/hotreload-utils</Uri>
<Sha>6f095cd6901ed48a469289f7f4f91d30a420d1ad</Sha>
<Sha>279b1ac2439ff27e32eb574a4b8e0d1087c09c8e</Sha>
</Dependency>
<Dependency Name="System.Runtime.Numerics.TestData" Version="6.0.0-beta.24271.2">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
Expand Down
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<MicrosoftNETTestSdkVersion>17.4.0-preview-20220707-01</MicrosoftNETTestSdkVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>6.0.0-prerelease.24224.2</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>6.0.0-prerelease.24224.2</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>6.0.0-alpha.0.24271.2</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>6.0.0-alpha.0.24362.1</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
<XUnitVersion>2.4.2-pre.9</XUnitVersion>
<XUnitRunnerVisualStudioVersion>2.4.2</XUnitRunnerVisualStudioVersion>
<CoverletCollectorVersion>1.3.0</CoverletCollectorVersion>
Expand All @@ -162,7 +162,7 @@
<MicrosoftNETILLinkTasksVersion>6.0.100-1.21459.1</MicrosoftNETILLinkTasksVersion>
<MicrosoftNETILLinkAnalyzerPackageVersion>$(MicrosoftNETILLinkTasksVersion)</MicrosoftNETILLinkAnalyzerPackageVersion>
<!-- ICU -->
<MicrosoftNETCoreRuntimeICUTransportVersion>6.0.0-rtm.24269.3</MicrosoftNETCoreRuntimeICUTransportVersion>
<MicrosoftNETCoreRuntimeICUTransportVersion>6.0.0-rtm.24315.1</MicrosoftNETCoreRuntimeICUTransportVersion>
<!-- MsQuic -->
<SystemNetMsQuicTransportVersion>6.0.0-servicing.22205.1</SystemNetMsQuicTransportVersion>
<!-- Mono LLVM -->
Expand Down
3 changes: 0 additions & 3 deletions eng/pipelines/common/build-coreclr-and-libraries-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ parameters:
container: ''
testGroup: ''
crossBuild: false
crossrootfsDir: ''
timeoutInMinutes: ''
signBinaries: false
stagedBuild: false
Expand All @@ -27,7 +26,6 @@ jobs:
container: ${{ parameters.container }}
testGroup: ${{ parameters.testGroup }}
crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}
timeoutInminutes: ${{ parameters.timeoutInMinutes }}
signBinaries: ${{ parameters.signBinaries }}
stagedBuild: ${{ parameters.stagedBuild }}
Expand All @@ -46,7 +44,6 @@ jobs:
container: ${{ parameters.container }}
testGroup: ${{ parameters.testGroup }}
crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}
timeoutInminutes: ${{ parameters.timeoutInMinutes }}
variables: ${{ parameters.variables }}
pool: ${{ parameters.pool }}
Expand Down
64 changes: 48 additions & 16 deletions eng/pipelines/common/global-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ parameters:
osSubgroup: ''
container: ''
crossBuild: false
crossrootfsDir: ''
variables: []
targetRid: ''
timeoutInMinutes: ''
Expand All @@ -29,9 +28,11 @@ parameters:
enableRichCodeNavigation: false
richCodeNavigationLanguage: 'csharp'
richCodeNavigationEnvironment: 'production'
templatePath: 'templates'
preBuildSteps: []

jobs:
- template: /eng/common/templates/job/job.yml
- template: /eng/common/${{ parameters.templatePath }}/job/job.yml
parameters:
name: ${{ format('build_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.nameSuffix) }}
displayName: ${{ format('Build {0}{1} {2} {3} {4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.nameSuffix) }}
Expand Down Expand Up @@ -64,6 +65,8 @@ jobs:

- name: _osParameter
value: -os ${{ parameters.osGroup }}
- name: _archParameter
value: -arch ${{ parameters.archType }}

- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_musl')) }}:
- name: _osParameter
Expand Down Expand Up @@ -143,7 +146,7 @@ jobs:
path: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles'

- ${{ if eq(parameters.buildingOnSourceBuildImage, true) }}:
- template: /eng/common/templates/steps/source-build.yml
- template: /eng/common/${{ parameters.templatePath }}/steps/source-build.yml
parameters:
platform:
buildScript: $(_sclEnableCommand) $(Build.SourcesDirectory)$(dir)build$(scriptExt)
Expand All @@ -170,12 +173,36 @@ jobs:
- script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force
displayName: Install native dependencies

- ${{ if ne(parameters.preBuildSteps,'') }}:
- ${{ each preBuildStep in parameters.preBuildSteps }}:
- ${{ if ne(preBuildStep.template, '') }}:
- template: ${{ preBuildStep.template }}
parameters:
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
archType: ${{ parameters.archType }}
buildConfig: ${{ parameters.buildConfig }}
runtimeFlavor: ${{ parameters.runtimeFlavor }}
runtimeVariant: ${{ parameters.runtimeVariant }}
helixQueues: ${{ parameters.helixQueues }}
targetRid: ${{ parameters.targetRid }}
nameSuffix: ${{ parameters.nameSuffix }}
platform: ${{ parameters.platform }}
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
${{ if ne(preBuildStep.forwardedParameters, '') }}:
${{ each parameter in preBuildStep.forwardedParameters }}:
${{ parameter }}: ${{ parameters[parameter] }}
${{ if ne(preBuildStep.parameters, '') }}:
${{ insert }}: ${{ preBuildStep.parameters }}
- ${{ else }}:
- ${{ preBuildStep }}

# Build
- ${{ if eq(parameters.buildingOnSourceBuildImage, false) }}:
- script: $(_sclEnableCommand) $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg) $(_cxx11Parameter) $(_richCodeNavigationParam) $(_buildDarwinFrameworksParameter)
displayName: Build product
${{ if eq(parameters.useContinueOnErrorDuringBuild, true) }}:
continueOnError: ${{ parameters.shouldContinueOnError }}
- template: /eng/pipelines/common/templates/global-build-step.yml
parameters:
buildArgs: ${{ parameters.buildArgs }}
useContinueOnErrorDuringBuild: ${{ parameters.useContinueOnErrorDuringBuild }}
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}

- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS', 'Android') }}:
- script: |
Expand Down Expand Up @@ -209,11 +236,16 @@ jobs:
- ${{ else }}:
- ${{ postBuildStep }}

- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/'
PublishLocation: Container
ArtifactName: Logs_Build_${{ parameters.osGroup }}_${{ parameters.osSubGroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
continueOnError: true
condition: always()
- template: /eng/pipelines/common/templates/publish-build-artifacts.yml
parameters:
isOfficialBuild: ${{ parameters.isOfficialBuild }}
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/'
PublishLocation: Container
${{ if notin(parameters.osGroup, 'browser', 'wasi') }}:
ArtifactName: Logs_Build_Attempt$(System.JobAttempt)_${{ parameters.osGroup }}_${{ parameters.osSubGroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
${{ if in(parameters.osGroup, 'browser', 'wasi') }}:
ArtifactName: Logs_Build_Attempt$(System.JobAttempt)_${{ parameters.osGroup }}_${{ parameters.archType }}_${{ parameters.hostedOs }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
continueOnError: true
condition: always()
9 changes: 7 additions & 2 deletions eng/pipelines/common/macos-sign-with-entitlements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ steps:
includeRootFolder: true
replaceExistingArchive: true

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
- task: EsrpCodeSigning@5
displayName: 'ESRP CodeSigning'
inputs:
ConnectedServiceName: 'ESRP CodeSigning'
ConnectedServiceName: 'DotNet-Engineering-Services_KeyVault'
AppRegistrationClientId: '28ec6507-2167-4eaa-a294-34408cf5dd0e'
AppRegistrationTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47'
AuthAKVName: 'EngKeyVault'
AuthCertName: 'DotNetCore-ESRP-AuthCert'
AuthSignCertName: 'DotNetCore-ESRP-AuthSignCert'
FolderPath: '$(Build.ArtifactStagingDirectory)/'
Pattern: 'mac_entitled_to_sign.zip'
UseMinimatch: true
Expand Down
Loading

0 comments on commit ec9cf12

Please sign in to comment.