1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 09:34:49 +09:00

Update dotnet-pgo.md (#103923)

Updates the instructions on how to install and use dotnet-pgo.

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
This commit is contained in:
Steve Pfister 2024-06-24 18:33:54 -04:00 committed by GitHub
parent e6a0fd6e7f
commit dfa7dc5cc1
Signed by: github
GPG key ID: B5690EEEBB952194

View file

@ -1,21 +1,13 @@
# dotnet-pgo Spec # dotnet-pgo Spec
Utilize trace data for improving application performance Utilize trace data for improving application performance
NOTE: This documentation page contains information on some features that are still work-in-progress.
## Intro ## 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. 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 ## Installing dotnet-pgo
The first step is to install the dotnet-pgo CLI global tool. 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.
```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.
```
## Using dotnet-pgo to optimize an application ## Using dotnet-pgo to optimize an application
@ -37,14 +29,14 @@ set DOTNET_TC_QuickJitForLoops=1
set DOTNET_TC_CallCountThreshold=10000 set DOTNET_TC_CallCountThreshold=10000
set DOTNET_ReadyToRun=0 set DOTNET_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 DOTNET_TieredPGO= set DOTNET_TieredPGO=
set DOTNET_TC_QuickJitForLoops= set DOTNET_TC_QuickJitForLoops=
set DOTNET_TC_CallCountThreshold= set DOTNET_TC_CallCountThreshold=
set DOTNET_ReadyToRun= set DOTNET_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 dotnet publish --runtime win-x64 -p:PublishReadyToRun=true -p:ReadyToRunOptimizationData=trace.mibc
``` ```