From db4baaaef026afbf5a634c932912a54b1e3b9dde Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:35:26 -0700 Subject: [PATCH] [release/8.0-staging] Update dotnet-pgo.md (#103926) * Update dotnet-pgo.md Updates the instructions on how to install and use dotnet-pgo. * Update docs/design/features/dotnet-pgo.md --------- Co-authored-by: Steve Pfister Co-authored-by: Jan Kotas --- docs/design/features/dotnet-pgo.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/docs/design/features/dotnet-pgo.md b/docs/design/features/dotnet-pgo.md index 319b5b99db284..a2262708bf9bb 100644 --- a/docs/design/features/dotnet-pgo.md +++ b/docs/design/features/dotnet-pgo.md @@ -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 @@ -37,14 +29,14 @@ set DOTNET_TC_QuickJitForLoops=1 set DOTNET_TC_CallCountThreshold=10000 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_TC_QuickJitForLoops= set DOTNET_TC_CallCountThreshold= 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 ```