Skip to content

fix(pgo): re-key the profiles to the symbol names dev has had since #1099 - #1128

Merged
Hona merged 2 commits into
devfrom
perf/profiles-rekeyed-after-1099
Nov 25, 2026
Merged

Hona merged 2 commits into
devfrom
perf/profiles-rekeyed-after-1099

Conversation

@Hona

@Hona Hona commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Re-keys the two committed profiles onto the symbol names dev has had since #1099. Profile files only; no code.

Why

#1099 added a dependency to two crate manifests (crates/win-install, features/updater). cargo derives a crate's symbol hash from its dependencies' hashes, so those two crates and the crates that depend on them got new symbol names: five crates on Windows, the app crate among them. A profile names each function by its symbol, so since #1099 the profiles have named none of those functions and their code has been built without a profile: 3,736 of the 15,457 functions with counts on Windows (24 %), 4,452 of 15,499 on Apple silicon. The launch path's own code is in the app crate.

What changes

Target Functions with counts Kept Renamed Dropped (their code changed) Gone
Windows x64 15,457 15,411 3,736 37 9
Apple silicon 15,499 15,445 4,452 41 13

A count is kept only when its re-keyed name exists in the new build with the same control-flow hash.

dev has changed no manifest, lock or toolchain path between the instrumented build and this head.

What it does not do

A re-key moves counts; it gives none to a function whose code changed since the training. Those need a new training run, which follows on its own.

Runs

  • CI on this head (05be0f8fc2): guardrails and all six builds green (macOS, Windows x64 and arm64, Linux x64 and arm64).
  • Starts-only on this head's Windows x64 build (the three app starts: plugins, session, launcher): 6 of 6 in 33.8 s; first frame drawn, 17 built-in plugins, the launcher, a session's timeline, a prompt accepted; all three runs exit 0, no crash dump.
  • The library of this build is 72,192 bytes smaller than the same dev built with the old profile (155,384,832 against 155,457,024 bytes). That is a size, not a timing.
  • Not run before the merge: the same-tree launch pair (the old profile against this one, files in memory and not). It is queued and runs after; a stale profile is the known-worse state, so this fixes forward. What is known so far: the published build that shipped with the stale names was not slower at launch than the one before it (26 and 24 alternating pairs), with 17 commits of code between them, so no launch gain is claimed here until that pair is read.
  • dev between this head and the merge: two docs commits; no manifest, lock, toolchain or profile path.
  • macOS: CI compile only. Linux uses no profile.

Hona added 2 commits November 25, 2026 14:08
#1099 added a dependency to crates/win-install and features/updater. cargo derives a crate's symbol hash from its dependencies' hashes, so those two crates and the crates that depend on them (the app crate among them) got new symbol names, and the committed profiles no longer named their functions. Counts moved onto the new names from an instrumented build of dev (#1113): Windows 15,411 of 15,457 functions kept (3,736 renamed; 37 dropped: their code changed; 9 gone); Apple silicon 15,445 of 15,499 (4,452 renamed; 41 dropped; 13 gone). No code changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant