Enabling PGO for Windows releases
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- node.js, powershell
- 領域
- build-system, ci-cd, release
調査の方向性
まず、issue に示されている Jenkins job のドラフトと現在の release コマンドを確認し、続いて pgo.ps1 と vcbuild.bat の PGO 引数を調査します。ドラフトの job を検証の基準として使用し、release ビルドが nightly で 3 つの PGO ステップを完了できる一方、nightly ビルドと canary ビルドでは非 PGO パスが維持されることを確認してください。
索引モデルが issue の本文から書いたものです。
説明
I want to start a discussion about enabling PGO for release builds on Windows. Along with LTO (enabled since v26.3), it will further improve Node.js performance on Windows. While LTO builds took 3-3.5 hours initially, recent changes have reduced them to around 2 hours. Enabling PGO will double that time (2 builds are needed plus running workload scripts in between), but overall it will be a bit longer than what LTO took last week. Additionally, I would only enable PGO for release builds, so nightly and canary builds would be unaffected. I feel confident in enabling this because I've already tested it thoroughly in a draft job.
Since Jenkins changes are only visible after they are made, I want to share what I plan to change here before doing it. What we currently have is this:
vcbuild.bat build-release %ARCH% upload
and I would change it to this:
if not exist pgo.ps1 goto :no-pgo
if not "%DISTTYPE%"=="release" goto :no-pgo
echo === PGO Build: Step 1 - Build instrumented binary ===
@REM In first PGO build, make x64 binary to generate profdata (Eventually we want to add ARM64 machines for this)
call vcbuild.bat build-release x64 pgo-generate
if errorlevel 1 exit /b %errorlevel%
echo === PGO Build: Step 2 - Run workload and collect profiles ===
powershell -NoProfile -ExecutionPolicy Bypass -File pgo.ps1 -PgoGenNode Release\node.exe -PhaseOnly
if errorlevel 1 exit /b %errorlevel%
echo --- Cleaning instrumented build ---
git clean -fdx -e node.profdata
if errorlevel 1 exit /b %errorlevel%
echo === PGO Build: Step 3 - Build optimized binary ===
call vcbuild.bat build-release %ARCH% pgo-use upload
exit /b %errorlevel%
:no-pgo
echo === Non-PGO Build ===
vcbuild.bat build-release %ARCH% upload
The script checks whether the Node.js being built has PGO enabled, and if so, it uses it for release builds. This way, if/when we backport PGO to LTS versions, they will pick it up for releases without any further changes in Jenkins.
As I've already stated, I tested this and feel confident about enabling it, but please feel free to share any concerns you might have about these changes.
- 主要言語
- Jinja
- スター
- 541
- フォーク
- 185
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 6
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nodejs/build のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
platform:ppc
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
incident platform:arm
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
似ている issue
-
core dependencies
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
-
bug github_actions
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
registrystack/registry-stack#1393 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Name consistency オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eellak/triplestore#65 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100