WIP: perf(build): the runtime's own files built with a play profile of their own (RX_PGO_RT, off unless set) #1986

Draft
siantm wants to merge 7 commits from siantm/Longshot:perf/build-pgo-rt into main
Contributor

Summary

The hot lifted pieces (RX_PGO) and the renderer (RX_VK_PGO, the shipped profile) are built with a play profile; the
runtime's own files (host/*.c: the OS layer under every game thread, the input, the sound, the threads' waits) are
plain -O2 with none. This adds RX_PGO_RT, off unless set:

  • RX_PGO_RT=gen: host/*.c (and on Linux the executable's four host/posix files; the renderer's own copy of
    win32_posix.c keeps its flags) compile counting their branches with atomic adds (-fprofile-update=atomic: every
    game thread runs them), and host/pgo_rt.c is in the executable, so a run with HOS_PGO set to a file name writes
    their counters through that name's .reset and .dump files as an RX_PGO=gen run does (with the hot pieces' too
    when both are set; their adds stay plain, as on main).
  • RX_PGO_RT set to a merged profile file: they are built with that profile. It is read once and every compile reads
    a copy of its bytes, build/rt_profile/<hash>.profdata; the hash sits beside the flag
    (-DLONGSHOT_RT_PROFILE_SHA1), so the object key follows the profile's contents, not its path or a later merge. After
    the compile the build says how many runtime files have counts that apply, and for each file clang noted how many of
    its functions (from clang's "of N functions, M mismatched / K without data" notes: a file whose every function is out
    of date has none); it stops when no counts apply anywhere. Each object keeps the notes of its compile beside it
    (.rtfit, in the object cache too), and is reused only with them, so a build that reuses objects from one that
    stopped early still checks them. The object's stamp is removed before the object or its notes are replaced, so a
    build stopped in between leaves no older key that vouches for them.
  • The profile is read only when the runtime's files are compiled: the renderer alone (RX_VK_ONLY) and the release's
    third-party objects never open it.

What changes for the existing counting builds: host/pgo_rt.c, the writer RX_PGO=gen (and the renderer's copy for
RX_VK_PGO=gen) already use, now clears and copies the counters word by word with atomic stores and loads, writes
<file>.tmp, checks every write, moves it into place and only then deletes <file>.dump (a failure is said once and
tried again while the marker stays); its marker names have no length limit; a failed allocation or thread start is said
and cleaned up. A counting build (RX_PGO=gen too) stops on a clang older than 19, whose llvm-profdata reads neither
raw format the writer writes. Nothing else changes: no object of a build without these switches, not the lifted code,
not the renderer's objects. It is compile-only (left out of the lift key in make_game.py and dev.py), and dev.py packs pack with it set builds the game. docs/dev/developing.md gets "Record the runtime's play profile" (count,
runtime, record, merge, build; PowerShell, the queue, files under work/, RX_PGO=gen left unset since its dump holds
the game's counters), docs/dev/reference/build.md its row, and HOS_PGO's row in gpu/vk/switches.def names it.
Left for a separate change, already on main for RX_PGO=gen: on Linux, host/posix/win32_posix.c reads the process
affinity in a constructor that the writer's thread, started from another constructor, can race.

From the local branch exp/x86-asm-sync (RX_PGO_RT of 4eed88f7, with 8c5ecbe9's fix of the profile-key test folded
in: the test admitting the RT define; on main that fix has nothing of its own to fix, so it is not a separate PR). Not ported: the branch also gave the renderer this profile and rewrote
host/pgo_rt.c (both modules on HOS_PGO with a .vk file, a write at exit, clang's own profile runtime); that would
change main's RX_VK_PGO=gen and RX_PGO=gen recordings, and RX_VK_PGO_FILE already records the renderer.

Read first: rt_profile_flags, rt_fit, rt_profile_report, compile_one's rt lines, cache_put and the lines that use rt_fl, host_built and counting in
nx2/build.py; host/pgo_rt.c; tests/test_rt_profile_build.py (new).

Testing

Tested: Windows 11, i7-9700, RTX 4060, llvm-mingw clang 23.1.5, Python 3.14.7 (the Builder's). In the game: an
RX_PGO_RT=gen build of 1cc32eb0 recorded a runtime profile in one 90 s market run (HOS_PGO reset once loaded, dumped
before the stop, llvm-profdata merge); the head built with it reported "80 of the 80 runtime files have counts in the
profile", started and played the market in all seven of its runs (Measurements). Game-free checks:
The branch is on main @ 9dd41326 (unchanged since round 2, so nothing was rebased). Round 1's commits are cafc77c0,
72999edf (its tests) and 716505fb (its fix); round 2's 8d1972d2 (failing tests) and 1cc32eb0 (fix). On top of them come
ea90b759 (this round's failing test) and d429a14a (its fix, the head). In hidden consoles of their own, through the
PC's job queue (fb2-1986r3-1, light, at most two checks at once, 20 minutes a check), with the Vulkan headers
(RX_CPM):

  • python -I -B tests/test_rt_profile_build.py at d429a14a: "Ran 14 tests", OK. New this round:
    • WarmRetry, another profile stopped before its stamp: through build.main with a fake compiler, a build with
      profile A, then one with profile B stopped where it stamps a runtime object it compiled (the object and its notes
      are B's by then), then A again. Every runtime object and its .rtfit notes are A's again, and the report finds A's
      counts in every runtime file. The fake compiler now writes its object as clang does, to a file of its own moved
      into place, so the object the cache shares by a hard link stays the cache's.
    • Unchanged: WarmRetry's warm retry after an unrelated failed build (folder and cache), the report's function
      counts, the job plans, the clang check, the routes, and the Windows round trip (1,000,000 calls on four threads
      after a reset counted exactly, a blocked write, UTF-8 folder and manifest, the profile used).
  • The same file at ea90b759 (the test before this round's fix): 1 failure of 14, the new case. Its last build reuses
    the two objects B had replaced, by A's old stamp, with B's notes: "77 of the 79 runtime files have counts", "no
    counts apply" for those two.
  • python -I -B tests/test_profile_path_key.py at d429a14a: "Ran 2 tests", OK.
  • tests/run_all.py --strict at d429a14a over the checks that cut compile_one / cache_put or read the build's
    compile path: 15 passed, 3 failed. test_compiler_failure, test_third_party_objects, test_mem_gate_leases,
    test_split_giants, test_build_hash_cache, test_host_depfiles, test_renderer_depfiles, test_link_skip,
    test_hot_pieces_split, test_header_ext_deps, test_build_long_paths, test_a64_helper_build_flags,
    test_vk_pgo, test_switches_removed and test_exclusive_marks pass. test_compile_retry_jobs,
    test_compile_stops_on_exception and test_failed_compile_keeps_objects fail on main @ 9dd41326 too, in the same
    job (main's own vk_jobs NameError in their cut of main()).
  • run_all.py --strict --changed origin/main was not run on the head (it ran in round 2 on an earlier state).

Still to test:

  • Windows 11, this PC: the head built without the profile against the head with it in the game, the like-for-like pair
    for the renderer, which main is not (Measurements) (by hand)
  • Linux: an RX_PGO_RT=gen build links and writes its counters (host/pgo_rt.c's ELF path, as for RX_PGO=gen),
    and the game-free round trip with the POSIX shim added to tests/test_rt_profile_build.py (a later round; by hand)
  • Windows 11, this PC: clean build and link times and the executable's size for the merge base, the head unset and the
    head with a recorded profile (a later round; by hand)

Measurements

Verdict: in play, no difference shown, no loss seen. In Castle Town's market, six runs a side, the build with a
recorded runtime profile had a median calm-stretch game time of 12.58 ms a frame against main's 12.68 (0.7 % less), with
each side's runs spread over the other's (12.02 to 12.98 against 12.11 to 13.06). Six runs a side cannot separate a
difference that small from the scene's spread. The switch ships off.

In play: Castle Town's market, main against this PR with a runtime profile, six runs a side

Setup: Windows 11, i7-9700, RTX 4060, run alone on the PC on 2026-11-22, 18:52 to 19:27 UTC; Castle Town's market (child,
crowded), plain runs of 60 s, frame cap off, output 2560x1440 at the desktop's 2560x1440 at 60 Hz (pinned with
HOS_OUTPUT_RES), programs loaded when the game makes them (RX_VK_LOAD=create); a warm-up run a side, then
M P P M M P P M M P P M, the GPU cooled to 70 °C before each run (at its full 2,745 to 2,760 MHz over every measured
stretch). M = main @ 9dd41326. P = this PR with RX_PGO_RT set to a runtime profile: the profile recorded in one 90 s
market run of a counting build of 1cc32eb0 (RX_PGO_RT=gen), the build with it reporting d429a14a (1cc32eb0 and
d429a14a have the same host code; they differ only in nx2/build.py's stamp order and its test). The profile build
reported "80 of the 80 runtime files have counts in the profile", and its executable differs from the same head built
without the profile. Every run's log: no game window in front line, no commit-limit line, no frame held unchanged.
Calm-stretch game time: the measured 60 s in six 10 s windows, each window whose median game time is more than 20 % above
the run's lowest dropped (a burst), then the median game time of the frames left; blocked: the game thread's wait over
the same frames.

What else differs between the two sides: main's executable and this head's built without the profile differ only in
their version stamps (30 bytes), so the executable's code differs by the profile alone. The renderer (longshot_vk.dll)
is this head's in P, which adds the RX_PGO_RT row to the switch table (gpu/vk/switches.def); the head built without
the profile was not run in the game.

Market, six runs a side, median (range) Before: main @ 9dd41326 After: this PR @ d429a14a, RX_PGO_RT profile
calm-stretch game ms a frame 12.68 (12.11 to 13.06) 12.58 (12.02 to 12.98)
whole-run game ms a frame 13.06 (12.11 to 13.29) 12.58 (12.02 to 12.98)
game thread blocked, ms a frame 10.77 (10.34 to 11.00) 10.38 (10.10 to 10.94)
fps 67.05 (61.62 to 71.56) 70.49 (66.88 to 72.37)
p99 frame ms 44.13 (21.70 to 51.87) 23.10 (21.25 to 46.92)

Each run (run order M1 P2 P3 M4 M5 P6 P7 M8 M9 P10 P11 M12):

run  fps    p99 ms  game ms  calm ms  bursts  blocked ms
M1   61.74  51.87   13.11    12.71    2       10.73
M4   67.16  43.53   13.05    13.05    0       10.94
M5   71.07  22.51   12.11    12.11    0       10.50
M8   61.62  50.14   13.29    12.64    2       10.81
M9   71.56  21.70   12.48    12.48    0       10.34
M12  66.94  44.72   13.06    13.06    0       11.00
P2   66.88  46.92   12.98    12.98    0       10.94
P3   72.37  22.26   12.37    12.37    0       10.14
P6   71.32  23.52   12.77    12.77    0       10.10
P7   70.57  22.67   12.02    12.02    0       10.52
P10  70.08  45.34   12.91    12.91    0       10.23
P11  70.41  21.25   12.39    12.39    0       10.57

Reading: the whole-run game time differs more than the calm-stretch one because two of main's runs (M1, M8) each had
two burst windows; one burst run more or fewer is within what six runs a side give. p99 falls in two groups on both sides
(about 22 or about 45 ms): four of main's six runs are in the high group against two of this PR's six, a split six runs
a side do not show to differ. The fps median follows those runs.
An earlier 3-a-side run (2026-11-22, 03:13 to 03:40 UTC) is withdrawn: one of its runs rendered an 800x600 output after the
desktop changed, and another had the game window brought to the front. Clean build time and size, and Linux, are not
measured.

Game-free checks

Setup: Windows 11, i7-9700, llvm-mingw clang 23.1.5; the checks in Testing, through the PC's job queue, at this round's
test commit and at the fix, in one job

Before: main @ 9dd41326 with this PR to 1cc32eb0 and this round's test (ea90b759) After: this PR @ d429a14a
tests/test_rt_profile_build.py fails (1 of 14: after a build with another profile stopped before its stamp, the build with the first profile reuses the two replaced objects and their notes: 77 of 79 files reported with counts) passes (14 tests)
tests/test_profile_path_key.py - passes (2 tests)

Risks

Off (unset), every flag and object key is as on main: rt_fl is empty and counting is RX_PGO=gen as before. Set,
it changes only developers' builds of host/*.c: a counting build is slower (never measure it); a profile build has
one in-game comparison so far, not decided (Measurements); keep the switch off until it is decided. RX_PGO=gen and RX_VK_PGO=gen recordings go through the changed writer (atomic
clear and copy, the dump written whole before its marker goes), and an RX_PGO=gen build now refuses a clang older
than 19. Players notice nothing: no build they get sets these. A revert is enough.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.
## Summary The hot lifted pieces (`RX_PGO`) and the renderer (`RX_VK_PGO`, the shipped profile) are built with a play profile; the runtime's own files (`host/*.c`: the OS layer under every game thread, the input, the sound, the threads' waits) are plain `-O2` with none. This adds `RX_PGO_RT`, off unless set: - `RX_PGO_RT=gen`: `host/*.c` (and on Linux the executable's four `host/posix` files; the renderer's own copy of `win32_posix.c` keeps its flags) compile counting their branches with atomic adds (`-fprofile-update=atomic`: every game thread runs them), and `host/pgo_rt.c` is in the executable, so a run with `HOS_PGO` set to a file name writes their counters through that name's `.reset` and `.dump` files as an `RX_PGO=gen` run does (with the hot pieces' too when both are set; their adds stay plain, as on `main`). - `RX_PGO_RT` set to a merged profile file: they are built with that profile. It is read once and every compile reads a copy of its bytes, `build/rt_profile/<hash>.profdata`; the hash sits beside the flag (`-DLONGSHOT_RT_PROFILE_SHA1`), so the object key follows the profile's contents, not its path or a later merge. After the compile the build says how many runtime files have counts that apply, and for each file clang noted how many of its functions (from clang's "of N functions, M mismatched / K without data" notes: a file whose every function is out of date has none); it stops when no counts apply anywhere. Each object keeps the notes of its compile beside it (`.rtfit`, in the object cache too), and is reused only with them, so a build that reuses objects from one that stopped early still checks them. The object's stamp is removed before the object or its notes are replaced, so a build stopped in between leaves no older key that vouches for them. - The profile is read only when the runtime's files are compiled: the renderer alone (`RX_VK_ONLY`) and the release's third-party objects never open it. What changes for the existing counting builds: `host/pgo_rt.c`, the writer `RX_PGO=gen` (and the renderer's copy for `RX_VK_PGO=gen`) already use, now clears and copies the counters word by word with atomic stores and loads, writes `<file>.tmp`, checks every write, moves it into place and only then deletes `<file>.dump` (a failure is said once and tried again while the marker stays); its marker names have no length limit; a failed allocation or thread start is said and cleaned up. A counting build (`RX_PGO=gen` too) stops on a clang older than 19, whose `llvm-profdata` reads neither raw format the writer writes. Nothing else changes: no object of a build without these switches, not the lifted code, not the renderer's objects. It is compile-only (left out of the lift key in `make_game.py` and dev.py), and `dev.py packs pack` with it set builds the game. `docs/dev/developing.md` gets "Record the runtime's play profile" (count, runtime, record, merge, build; PowerShell, the queue, files under `work/`, `RX_PGO=gen` left unset since its dump holds the game's counters), `docs/dev/reference/build.md` its row, and `HOS_PGO`'s row in `gpu/vk/switches.def` names it. Left for a separate change, already on `main` for `RX_PGO=gen`: on Linux, `host/posix/win32_posix.c` reads the process affinity in a constructor that the writer's thread, started from another constructor, can race. From the local branch `exp/x86-asm-sync` (`RX_PGO_RT` of 4eed88f7, with 8c5ecbe9's fix of the profile-key test folded in: the test admitting the RT define; on main that fix has nothing of its own to fix, so it is not a separate PR). Not ported: the branch also gave the renderer this profile and rewrote `host/pgo_rt.c` (both modules on `HOS_PGO` with a `.vk` file, a write at exit, clang's own profile runtime); that would change main's `RX_VK_PGO=gen` and `RX_PGO=gen` recordings, and `RX_VK_PGO_FILE` already records the renderer. Read first: `rt_profile_flags`, `rt_fit`, `rt_profile_report`, `compile_one`'s `rt` lines, `cache_put` and the lines that use `rt_fl`, `host_built` and `counting` in `nx2/build.py`; `host/pgo_rt.c`; `tests/test_rt_profile_build.py` (new). ## Testing **Tested:** Windows 11, i7-9700, RTX 4060, llvm-mingw clang 23.1.5, Python 3.14.7 (the Builder's). In the game: an `RX_PGO_RT=gen` build of 1cc32eb0 recorded a runtime profile in one 90 s market run (`HOS_PGO` reset once loaded, dumped before the stop, `llvm-profdata merge`); the head built with it reported "80 of the 80 runtime files have counts in the profile", started and played the market in all seven of its runs (Measurements). Game-free checks: The branch is on `main` @ 9dd41326 (unchanged since round 2, so nothing was rebased). Round 1's commits are cafc77c0, 72999edf (its tests) and 716505fb (its fix); round 2's 8d1972d2 (failing tests) and 1cc32eb0 (fix). On top of them come ea90b759 (this round's failing test) and d429a14a (its fix, the head). In hidden consoles of their own, through the PC's job queue (fb2-1986r3-1, light, at most two checks at once, 20 minutes a check), with the Vulkan headers (`RX_CPM`): - `python -I -B tests/test_rt_profile_build.py` at d429a14a: "Ran 14 tests", OK. New this round: - WarmRetry, another profile stopped before its stamp: through `build.main` with a fake compiler, a build with profile A, then one with profile B stopped where it stamps a runtime object it compiled (the object and its notes are B's by then), then A again. Every runtime object and its `.rtfit` notes are A's again, and the report finds A's counts in every runtime file. The fake compiler now writes its object as clang does, to a file of its own moved into place, so the object the cache shares by a hard link stays the cache's. - Unchanged: WarmRetry's warm retry after an unrelated failed build (folder and cache), the report's function counts, the job plans, the clang check, the routes, and the Windows round trip (1,000,000 calls on four threads after a reset counted exactly, a blocked write, UTF-8 folder and manifest, the profile used). - The same file at ea90b759 (the test before this round's fix): 1 failure of 14, the new case. Its last build reuses the two objects B had replaced, by A's old stamp, with B's notes: "77 of the 79 runtime files have counts", "no counts apply" for those two. - `python -I -B tests/test_profile_path_key.py` at d429a14a: "Ran 2 tests", OK. - `tests/run_all.py --strict` at d429a14a over the checks that cut `compile_one` / `cache_put` or read the build's compile path: 15 passed, 3 failed. `test_compiler_failure`, `test_third_party_objects`, `test_mem_gate_leases`, `test_split_giants`, `test_build_hash_cache`, `test_host_depfiles`, `test_renderer_depfiles`, `test_link_skip`, `test_hot_pieces_split`, `test_header_ext_deps`, `test_build_long_paths`, `test_a64_helper_build_flags`, `test_vk_pgo`, `test_switches_removed` and `test_exclusive_marks` pass. `test_compile_retry_jobs`, `test_compile_stops_on_exception` and `test_failed_compile_keeps_objects` fail on `main` @ 9dd41326 too, in the same job (main's own `vk_jobs` NameError in their cut of `main()`). - `run_all.py --strict --changed origin/main` was not run on the head (it ran in round 2 on an earlier state). **Still to test:** - Windows 11, this PC: the head built without the profile against the head with it in the game, the like-for-like pair for the renderer, which `main` is not (Measurements) (by hand) - Linux: an `RX_PGO_RT=gen` build links and writes its counters (`host/pgo_rt.c`'s ELF path, as for `RX_PGO=gen`), and the game-free round trip with the POSIX shim added to `tests/test_rt_profile_build.py` (a later round; by hand) - Windows 11, this PC: clean build and link times and the executable's size for the merge base, the head unset and the head with a recorded profile (a later round; by hand) ## Measurements **Verdict:** in play, no difference shown, no loss seen. In Castle Town's market, six runs a side, the build with a recorded runtime profile had a median calm-stretch game time of 12.58 ms a frame against `main`'s 12.68 (0.7 % less), with each side's runs spread over the other's (12.02 to 12.98 against 12.11 to 13.06). Six runs a side cannot separate a difference that small from the scene's spread. The switch ships off. **In play: Castle Town's market, `main` against this PR with a runtime profile, six runs a side** Setup: Windows 11, i7-9700, RTX 4060, run alone on the PC on 2026-11-22, 18:52 to 19:27 UTC; Castle Town's market (child, crowded), plain runs of 60 s, frame cap off, output 2560x1440 at the desktop's 2560x1440 at 60 Hz (pinned with `HOS_OUTPUT_RES`), programs loaded when the game makes them (`RX_VK_LOAD=create`); a warm-up run a side, then M P P M M P P M M P P M, the GPU cooled to 70 °C before each run (at its full 2,745 to 2,760 MHz over every measured stretch). M = `main` @ 9dd41326. P = this PR with `RX_PGO_RT` set to a runtime profile: the profile recorded in one 90 s market run of a counting build of 1cc32eb0 (`RX_PGO_RT=gen`), the build with it reporting d429a14a (1cc32eb0 and d429a14a have the same host code; they differ only in `nx2/build.py`'s stamp order and its test). The profile build reported "80 of the 80 runtime files have counts in the profile", and its executable differs from the same head built without the profile. Every run's log: no `game window in front` line, no commit-limit line, no frame held unchanged. Calm-stretch game time: the measured 60 s in six 10 s windows, each window whose median game time is more than 20 % above the run's lowest dropped (a burst), then the median game time of the frames left; blocked: the game thread's wait over the same frames. What else differs between the two sides: `main`'s executable and this head's built without the profile differ only in their version stamps (30 bytes), so the executable's code differs by the profile alone. The renderer (`longshot_vk.dll`) is this head's in P, which adds the `RX_PGO_RT` row to the switch table (`gpu/vk/switches.def`); the head built without the profile was not run in the game. | Market, six runs a side, median (range) | Before: main @ 9dd41326 | After: this PR @ d429a14a, `RX_PGO_RT` profile | |---|---|---| | calm-stretch game ms a frame | 12.68 (12.11 to 13.06) | 12.58 (12.02 to 12.98) | | whole-run game ms a frame | 13.06 (12.11 to 13.29) | 12.58 (12.02 to 12.98) | | game thread blocked, ms a frame | 10.77 (10.34 to 11.00) | 10.38 (10.10 to 10.94) | | fps | 67.05 (61.62 to 71.56) | 70.49 (66.88 to 72.37) | | p99 frame ms | 44.13 (21.70 to 51.87) | 23.10 (21.25 to 46.92) | Each run (run order M1 P2 P3 M4 M5 P6 P7 M8 M9 P10 P11 M12): ``` run fps p99 ms game ms calm ms bursts blocked ms M1 61.74 51.87 13.11 12.71 2 10.73 M4 67.16 43.53 13.05 13.05 0 10.94 M5 71.07 22.51 12.11 12.11 0 10.50 M8 61.62 50.14 13.29 12.64 2 10.81 M9 71.56 21.70 12.48 12.48 0 10.34 M12 66.94 44.72 13.06 13.06 0 11.00 P2 66.88 46.92 12.98 12.98 0 10.94 P3 72.37 22.26 12.37 12.37 0 10.14 P6 71.32 23.52 12.77 12.77 0 10.10 P7 70.57 22.67 12.02 12.02 0 10.52 P10 70.08 45.34 12.91 12.91 0 10.23 P11 70.41 21.25 12.39 12.39 0 10.57 ``` Reading: the whole-run game time differs more than the calm-stretch one because two of `main`'s runs (M1, M8) each had two burst windows; one burst run more or fewer is within what six runs a side give. p99 falls in two groups on both sides (about 22 or about 45 ms): four of `main`'s six runs are in the high group against two of this PR's six, a split six runs a side do not show to differ. The fps median follows those runs. An earlier 3-a-side run (2026-11-22, 03:13 to 03:40 UTC) is withdrawn: one of its runs rendered an 800x600 output after the desktop changed, and another had the game window brought to the front. Clean build time and size, and Linux, are not measured. **Game-free checks** Setup: Windows 11, i7-9700, llvm-mingw clang 23.1.5; the checks in Testing, through the PC's job queue, at this round's test commit and at the fix, in one job | | Before: main @ 9dd41326 with this PR to 1cc32eb0 and this round's test (ea90b759) | After: this PR @ d429a14a | |---|---|---| | `tests/test_rt_profile_build.py` | fails (1 of 14: after a build with another profile stopped before its stamp, the build with the first profile reuses the two replaced objects and their notes: 77 of 79 files reported with counts) | passes (14 tests) | | `tests/test_profile_path_key.py` | - | passes (2 tests) | ## Risks Off (unset), every flag and object key is as on `main`: `rt_fl` is empty and `counting` is `RX_PGO=gen` as before. Set, it changes only developers' builds of `host/*.c`: a counting build is slower (never measure it); a profile build has one in-game comparison so far, not decided (Measurements); keep the switch off until it is decided. `RX_PGO=gen` and `RX_VK_PGO=gen` recordings go through the changed writer (atomic clear and copy, the dump written whole before its marker goes), and an `RX_PGO=gen` build now refuses a clang older than 19. Players notice nothing: no build they get sets these. A revert is enough. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [ ] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). - [ ] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold.
perf(build): the runtime's own files built with a play profile of their own (RX_PGO_RT, off unless set)
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
66df764957
The hot lifted pieces (RX_PGO) and the renderer (RX_VK_PGO) are built with a play profile; the runtime's own files
(host/*.c: the OS layer under every game thread) are plain -O2. RX_PGO_RT=gen compiles them counting their branches
(the same flags as the other two counting builds) with host/pgo_rt.c in the executable, so a run with HOS_PGO=<file>
writes their counters exactly as an RX_PGO=gen run does; RX_PGO_RT=<file> builds them with the merged profile. Its
contents' hash sits beside the flag (-DLONGSHOT_RT_PROFILE_SHA1), so the object key follows the profile and not its
path, as for the other two. Off unless set: no object of a build without it changes.

The renderer keeps main's own profile (RX_VK_PGO and the shipped one); RX_PGO_RT reaches no renderer file. It is
compile-only (make_game.py's and dev.py's COMPILE_ONLY_ENV) and a dev.py pack with it builds the game.

Ported from the local branch exp/x86-asm-sync (4eed88f7's RX_PGO_RT, with 8c5ecbe9's fix of the profile-key test
folded in: the hash built inline beside the flag, the test admitting the RT define). Not ported: that branch applied
the profile to the renderer too and replaced host/pgo_rt.c's writer (both images on HOS_PGO, a .vk file, a write at
exit, clang's profile runtime), which would change main's RX_VK_PGO=gen and RX_PGO=gen recordings; main's writer
and RX_VK_PGO_FILE already do the renderer's.

tests/test_rt_profile_build.py: the flags, the keys, the lift key and the pack route, and on Windows the loop itself
(a file counted beside host/pgo_rt.c, a HOS_PGO dump, llvm-profdata merge, the file built with it with clang's
out-of-date and unprofiled warnings as errors). tests/test_profile_path_key.py knows the third profile.

Assisted-by: Claude Code
Member

Possibly related, for context:

  • PR #1976 WIP: feat(build): the build says how well the play profile fits the hot pieces — Related build-side PGO/profile work; possible build.py overlap
Possibly related, for context: - PR #1976 WIP: feat(build): the build says how well the play profile fits the hot pieces — Related build-side PGO/profile work; possible build.py overlap
BeanBot left a comment

Recommendation: Request changes. A stale runtime profile can stop a renderer-only build, and the new recording path can lose counts when game threads update them concurrently. Fix those paths and verify that a real game build consumes a usable profile before judging the performance gain.

Adds a developer-only build option to record and apply branch profiles for the executable’s host runtime. It reuses the existing writer and object cache, which keeps the build integration small. The cost is a new recording workflow and a recompile of the host jobs whenever the selected profile changes. The default build keeps its existing optimization flags.

@fix will do (16)

  1. L1 nx2/build.py:1816: The builder opens RX_PGO_RT for any standalone invocation, before it filters out jobs the command will never build. (more on the line)
  2. L2 nx2/build.py:1300: The generated counters use Clang’s default non-atomic updates. (more on the line)
  3. L3 nx2/build.py:1316: The cache key hashes one read of the mutable profile, but parallel Clang jobs reopen the original path later. (more on the line)
  4. L4 host/pgo_rt.c:118: The watcher deletes .dump regardless of whether it wrote a complete profile. Renaming the output directory or filling the drive makes the documented completion signal disappear while the profile is absent or truncated. The unchecked allocation at line 84 can also crash the recording process. Check allocation and every write and close, publish the completed file atomically, and acknowledge the marker only after success. Report failures so a developer can retry.
  5. L5 host/pgo_rt.c:108: The watcher silently truncates the marker paths. A valid Windows output path of 255 bytes already overflows the 260-byte buffer once .reset and its terminator are added. The requested marker can be missed, or a different truncated path can be acted on. Construct both paths without truncation and report OS path errors. Add a round trip using a long UTF-8 path and the game’s Windows manifest.
  6. L6 host/pgo_rt.c:54: The new recording mode inherits a writer that emits raw format 10 for every Clang through 22. For example, LLVM 17 uses raw format 8, so its own llvm-profdata cannot merge a dump from this writer. Use the selected compiler’s profiling runtime where available, or reject unsupported recording toolchains at build time and document the supported pair.
  7. L7 (minor) host/pgo_rt.c:130: The reused watcher starts from a constructor and ignores allocation and thread-creation failures. A failed strdup can pass NULL to the worker, and a failed CreateThread leaks the path and leaves no watcher. Successful startup also leaves the handle open. On Linux the worker can reach apply_process_affinity before the separate affinity constructor has finished writing the plain mask. Start after affinity setup or make that setup a thread-safe once operation, and handle path and thread ownership explicitly.
  8. L8 nx2/build.py:1931: The host jobs inherit -Wno-everything, so a readable renderer-only or wholly stale profile can produce a successful runtime build while applying no useful counts. (more on the line)
  9. L9 (minor): The scope says host/*.c only, but the shared job loop also applies the flags to the executable’s four host/posix sources on Linux, including display_sdl.c and win32_posix.c. Name those sources in the description and build reference, or restrict the flags to the documented scope. The renderer’s separate copy of win32_posix.c keeps its old flags.
  10. L10 (minor) docs/dev/developing.md:502: The recipe uses POSIX environment syntax on a feature first tested on Windows, and jumps from making a pack to running it. (more on the line)
  11. L11 (minor) docs/dev/developing.md:510: The blanket description of the dump is false with the supported combined counting mode. (more on the line)
  12. L12 tests/test_rt_profile_build.py:122: The build coverage asserts source strings, while the round trip supplies its own compile and link commands. (more on the line)
  13. L13 tests/test_rt_profile_build.py:162: The only record/merge/use test skips Linux, leaving ELF section retention and the POSIX watcher untested. (more on the line)
  14. L14 tests/test_rt_profile_build.py:148: On Windows, long is 32-bit and the sum over 100,000 calls is about 10.8 billion, so the fixture itself has signed overflow. (more on the line)
  15. L15 (its part an edit can do): Report which runtime functions matched the merged profile so the comparison verifies that the profile was applied.
  16. L16 (its part an edit can do): Use the existing compile and link timings and record the resulting executable size for each variant.

For the author (2) (a run, a measurement or a decision)

  • L15 (minor): The Windows fixture proves a small recording round trip only. Run counting and profile-use game builds on Windows and Linux, including Tier 1 hardware this reaches. Compare the profile-use head with its merge base in matching, interleaved runs after warm-up. Report average FPS, 1% low, median and p99 frame time, and the targeted host CPU time in representative heavy scenes.
  • L16 (minor): There are no clean build time or executable size measurements. Compare the merge base, the head with the switch unset, and the head using the recorded profile with the same compiler, jobs and inputs. Report host compile and executable link time separately from the full build.

Checks: Still running: CI / Conventional Commit title (pull_request), CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request), CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request), CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request), CI / Workflow lint (actionlint) (pull_request), CI / Website build and checks (pull_request), Guide screenshots / Guide images and local UI source review (pull_request), Third-party parts / As their notes say (pull_request), Third-party parts / The same as upstream (pull_request), Website / Website on Cloudflare (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Unproven. The author reports 7 runtime-profile checks and 2 profile-key checks passing on Windows at 66df7649. The earlier comparison used tests copied onto main at 51f5f9da. There are no in-game results, clean build time or size figures, or paired frame-time measurements against 6e1521a7.

Other systems: Lifted code, A64 helpers, third-party audio libraries and renderer-module jobs keep their own flags. The Linux executable also profiles its POSIX window and Win32 shim jobs, whose renderer copies keep their original flags. An enabled profile can alter host-side input, audio, waits, pacing and presentation on every GPU and on Steam Deck. Those paths have no play coverage here. Save formats, shader cache formats and the renderer API are untouched. Renderer-only and prebuilt-object commands can currently fail before the job lists are filtered.

Switches: RX_PGO_RT is build-only and defaults to unset or empty. Opt-in is appropriate for a developer experiment with no shipped profile. The build reference has its row. HOS_PGO still defaults to unset and now also drives the executable’s writer in RX_PGO_RT=gen builds. Its runtime switch-table row is updated, and setting it still disables the crash window.

Reviewed: 66df764957 against 6e1521a70a: Read the full nine-file diff, the new runtime-profile test and the changed profile-key test in full, and the affected sections and callers in build.py, make_game.py, devtools/build.py and devtools/packs.py. Read host/pgo_rt.c, the relevant POSIX shims, toolchain and test-runner paths, AGENTS.md, CONTRIBUTING.md, the Forgejo template and the developer standards. Skimmed adjacent profiling docs, CI setup and the run summaries supplied in the description. The rest of the large build modules was outside the affected paths. No local review checklist or sibling Tooling checkout was present.; nothing run (a code review).

Checked and fine:

  • The intended compile-only classification is consistent with the lift key and dev.py’s diagnostics.
  • Runtime-only profile selection forces a game pack and allows reuse of the base renderer when its inputs are unchanged.
  • Profile paths are normalized out of object keys, while the content digest is retained.
  • The change uses one topic and a Conventional Commit title after the WIP prefix. The commit has an Assisted-by trailer.
  • The patch contains source and documentation only. No game-derived captures, generated files, vendor changes or renderer API changes are present.

Testing: Static review only. The reported Windows checks pass at HEAD. The broader changed-source run was on the earlier rebase and the author reports its 23 failures on that base as well. No comments or reviews contain additional runs. The supplied CI checks are pending.

Overlaps and merge order: None found in the checkout or supplied review data. #1948 already landed in the merge base.


Automated code review by BeanBot (gpt-6.2-sol), on the pull request's opening. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** A stale runtime profile can stop a renderer-only build, and the new recording path can lose counts when game threads update them concurrently. Fix those paths and verify that a real game build consumes a usable profile before judging the performance gain. Adds a developer-only build option to record and apply branch profiles for the executable’s host runtime. It reuses the existing writer and object cache, which keeps the build integration small. The cost is a new recording workflow and a recompile of the host jobs whenever the selected profile changes. The default build keeps its existing optimization flags. **`@fix` will do (16)** 1. **L1** `nx2/build.py:1816`: The builder opens RX_PGO_RT for any standalone invocation, before it filters out jobs the command will never build. (more on the line) 2. **L2** `nx2/build.py:1300`: The generated counters use Clang’s default non-atomic updates. (more on the line) 3. **L3** `nx2/build.py:1316`: The cache key hashes one read of the mutable profile, but parallel Clang jobs reopen the original path later. (more on the line) 4. **L4** `host/pgo_rt.c:118`: The watcher deletes .dump regardless of whether it wrote a complete profile. Renaming the output directory or filling the drive makes the documented completion signal disappear while the profile is absent or truncated. The unchecked allocation at line 84 can also crash the recording process. Check allocation and every write and close, publish the completed file atomically, and acknowledge the marker only after success. Report failures so a developer can retry. 5. **L5** `host/pgo_rt.c:108`: The watcher silently truncates the marker paths. A valid Windows output path of 255 bytes already overflows the 260-byte buffer once .reset and its terminator are added. The requested marker can be missed, or a different truncated path can be acted on. Construct both paths without truncation and report OS path errors. Add a round trip using a long UTF-8 path and the game’s Windows manifest. 6. **L6** `host/pgo_rt.c:54`: The new recording mode inherits a writer that emits raw format 10 for every Clang through 22. For example, LLVM 17 uses raw format 8, so its own llvm-profdata cannot merge a dump from this writer. Use the selected compiler’s profiling runtime where available, or reject unsupported recording toolchains at build time and document the supported pair. 7. **L7** (minor) `host/pgo_rt.c:130`: The reused watcher starts from a constructor and ignores allocation and thread-creation failures. A failed strdup can pass NULL to the worker, and a failed CreateThread leaks the path and leaves no watcher. Successful startup also leaves the handle open. On Linux the worker can reach apply_process_affinity before the separate affinity constructor has finished writing the plain mask. Start after affinity setup or make that setup a thread-safe once operation, and handle path and thread ownership explicitly. 8. **L8** `nx2/build.py:1931`: The host jobs inherit -Wno-everything, so a readable renderer-only or wholly stale profile can produce a successful runtime build while applying no useful counts. (more on the line) 9. **L9** (minor): The scope says host/*.c only, but the shared job loop also applies the flags to the executable’s four host/posix sources on Linux, including display_sdl.c and win32_posix.c. Name those sources in the description and build reference, or restrict the flags to the documented scope. The renderer’s separate copy of win32_posix.c keeps its old flags. 10. **L10** (minor) `docs/dev/developing.md:502`: The recipe uses POSIX environment syntax on a feature first tested on Windows, and jumps from making a pack to running it. (more on the line) 11. **L11** (minor) `docs/dev/developing.md:510`: The blanket description of the dump is false with the supported combined counting mode. (more on the line) 12. **L12** `tests/test_rt_profile_build.py:122`: The build coverage asserts source strings, while the round trip supplies its own compile and link commands. (more on the line) 13. **L13** `tests/test_rt_profile_build.py:162`: The only record/merge/use test skips Linux, leaving ELF section retention and the POSIX watcher untested. (more on the line) 14. **L14** `tests/test_rt_profile_build.py:148`: On Windows, long is 32-bit and the sum over 100,000 calls is about 10.8 billion, so the fixture itself has signed overflow. (more on the line) 15. **L15** (its part an edit can do): Report which runtime functions matched the merged profile so the comparison verifies that the profile was applied. 16. **L16** (its part an edit can do): Use the existing compile and link timings and record the resulting executable size for each variant. **For the author (2)** (a run, a measurement or a decision) - **L15** (minor): The Windows fixture proves a small recording round trip only. Run counting and profile-use game builds on Windows and Linux, including Tier 1 hardware this reaches. Compare the profile-use head with its merge base in matching, interleaved runs after warm-up. Report average FPS, 1% low, median and p99 frame time, and the targeted host CPU time in representative heavy scenes. - **L16** (minor): There are no clean build time or executable size measurements. Compare the merge base, the head with the switch unset, and the head using the recorded profile with the same compiler, jobs and inputs. Report host compile and executable link time separately from the full build. **Checks:** Still running: `CI / Conventional Commit title (pull_request)`, `CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request)`, `CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request)`, `CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request)`, `CI / Workflow lint (actionlint) (pull_request)`, `CI / Website build and checks (pull_request)`, `Guide screenshots / Guide images and local UI source review (pull_request)`, `Third-party parts / As their notes say (pull_request)`, `Third-party parts / The same as upstream (pull_request)`, `Website / Website on Cloudflare (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven. The author reports 7 runtime-profile checks and 2 profile-key checks passing on Windows at 66df7649. The earlier comparison used tests copied onto main at 51f5f9da. There are no in-game results, clean build time or size figures, or paired frame-time measurements against 6e1521a7. **Other systems:** Lifted code, A64 helpers, third-party audio libraries and renderer-module jobs keep their own flags. The Linux executable also profiles its POSIX window and Win32 shim jobs, whose renderer copies keep their original flags. An enabled profile can alter host-side input, audio, waits, pacing and presentation on every GPU and on Steam Deck. Those paths have no play coverage here. Save formats, shader cache formats and the renderer API are untouched. Renderer-only and prebuilt-object commands can currently fail before the job lists are filtered. **Switches:** RX_PGO_RT is build-only and defaults to unset or empty. Opt-in is appropriate for a developer experiment with no shipped profile. The build reference has its row. HOS_PGO still defaults to unset and now also drives the executable’s writer in RX_PGO_RT=gen builds. Its runtime switch-table row is updated, and setting it still disables the crash window. **Reviewed:** 66df76495791 against 6e1521a70a32: Read the full nine-file diff, the new runtime-profile test and the changed profile-key test in full, and the affected sections and callers in build.py, make_game.py, devtools/build.py and devtools/packs.py. Read host/pgo_rt.c, the relevant POSIX shims, toolchain and test-runner paths, AGENTS.md, CONTRIBUTING.md, the Forgejo template and the developer standards. Skimmed adjacent profiling docs, CI setup and the run summaries supplied in the description. The rest of the large build modules was outside the affected paths. No local review checklist or sibling Tooling checkout was present.; nothing run (a code review). **Checked and fine:** - The intended compile-only classification is consistent with the lift key and dev.py’s diagnostics. - Runtime-only profile selection forces a game pack and allows reuse of the base renderer when its inputs are unchanged. - Profile paths are normalized out of object keys, while the content digest is retained. - The change uses one topic and a Conventional Commit title after the WIP prefix. The commit has an Assisted-by trailer. - The patch contains source and documentation only. No game-derived captures, generated files, vendor changes or renderer API changes are present. **Testing:** Static review only. The reported Windows checks pass at HEAD. The broader changed-source run was on the earlier rebase and the author reports its 23 failures on that base as well. No comments or reviews contain additional runs. The supplied CI checks are pending. **Overlaps and merge order:** None found in the checkout or supplied review data. #1948 already landed in the merge base. </details> --- <sub>Automated code review by BeanBot (gpt-6.2-sol), on the pull request's opening. Nothing was run; a maintainer decides.</sub>
@ -497,0 +499,4 @@
The runtime's own files (`host/*.c`) build at `-O2` with no profile unless `RX_PGO_RT` names one (an experiment: no
profile is shipped, and no gain is measured yet):
1. Build a counting game: `RX_PGO_RT=gen python -I scripts/dev.py packs pack <base> rt-count` (`host/pgo_rt.c` writes the
Member

L10 (minor): The recipe uses POSIX environment syntax on a feature first tested on Windows, and jumps from making a pack to running it. PowerShell cannot run the assignment as written, and starting the base executable records nothing from the pack. Show the PowerShell form, how to assemble the runtime from the pack, and the queued build and run commands. Use quoted absolute paths in a local ignored directory, since pack builds can change checkout and the profile files are not ignored by extension.

**L10** (minor): The recipe uses POSIX environment syntax on a feature first tested on Windows, and jumps from making a pack to running it. PowerShell cannot run the assignment as written, and starting the base executable records nothing from the pack. Show the PowerShell form, how to assemble the runtime from the pack, and the queued build and run commands. Use quoted absolute paths in a local ignored directory, since pack builds can change checkout and the profile files are not ignored by extension.
@ -497,0 +507,4 @@
4. Build with it: `RX_PGO_RT=<rt.profdata> python -I scripts/dev.py packs pack <base> rt-prof`, and measure that pack
against `main`. A function changed since the recording compiles without its counts.
Like the renderer's, it holds function names, shape hashes and branch counts of Longshot's own code, nothing of the game.
Member

L11 (minor): The blanket description of the dump is false with the supported combined counting mode. With RX_PGO=gen and RX_PGO_RT=gen, HOS_PGO writes lifted-game function records as well as host records. State that the runtime-only recipe must leave RX_PGO=gen off, and say explicitly to keep combined captures local.

**L11** (minor): The blanket description of the dump is false with the supported combined counting mode. With RX_PGO=gen and RX_PGO_RT=gen, HOS_PGO writes lifted-game function records as well as host records. State that the runtime-only recipe must leave RX_PGO=gen off, and say explicitly to keep combined captures local.
nx2/build.py Outdated
@ -1292,0 +1297,4 @@
# run's counters); its contents' hash is in the flags as the other two profiles' are, so a new profile compiles these files
# again and the same one does not. Off unless set: every other object, and these without it, as before. The renderer keeps
# its own profile (RX_VK_PGO); host/pgo_rt.c itself counts nothing
RT_GEN = ["-fprofile-instr-generate", "-mllvm", "-disable-vp=true"]
Member

L2: The generated counters use Clang’s default non-atomic updates. Two game threads entering the same host wait or timing routine can lose increments. The watcher also clears live counters with memset and reads them through fwrite while game threads are updating them. Use atomic updates and atomic reset/snapshot operations, or quiesce the counting threads for those operations. Cover the combined RX_PGO=gen mode too, since it shares the same counter section.

**L2**: The generated counters use Clang’s default non-atomic updates. Two game threads entering the same host wait or timing routine can lose increments. The watcher also clears live counters with memset and reads them through fwrite while game threads are updating them. Use atomic updates and atomic reset/snapshot operations, or quiesce the counting threads for those operations. Cover the combined RX_PGO=gen mode too, since it shares the same counter section.
nx2/build.py Outdated
@ -1292,0 +1313,4 @@
with open(prof, "rb") as f:
# (the profile's contents beside its path, as the hot pieces' and the renderer's have them: the object key follows
# the contents, tests/test_profile_path_key.py)
flags = ["-fprofile-instr-use=" + prof,
Member

L3: The cache key hashes one read of the mutable profile, but parallel Clang jobs reopen the original path later. If a developer replaces the profile with a fresh merge during a build, objects compiled against the replacement can be stored under the old digest and reused by later packs. Snapshot the selected bytes to a stable file and compile every job against that snapshot.

**L3**: The cache key hashes one read of the mutable profile, but parallel Clang jobs reopen the original path later. If a developer replaces the profile with a fresh merge during a build, objects compiled against the replacement can be stored under the old digest and reused by later packs. Snapshot the selected bytes to a stable file and compile every job against that snapshot.
nx2/build.py Outdated
@ -1780,1 +1813,4 @@
[os.path.join(rt64, "a64_rt.c")]
# (RX_PGO_RT: the runtime's own files' profile flags; a counting build of them or of the hot pieces has host/pgo_rt.c, the
# counters' writer, in the executable)
rt_fl = rt_profile_flags() if a.standalone else []
Member

L1: The builder opens RX_PGO_RT for any standalone invocation, before it filters out jobs the command will never build. For example, an exported profile path that has been deleted makes dev.py vk or a standalone --third-party-objects build exit. Resolve the profile only when the game host jobs will actually be compiled.

**L1**: The builder opens RX_PGO_RT for any standalone invocation, before it filters out jobs the command will never build. For example, an exported profile path that has been deleted makes dev.py vk or a standalone --third-party-objects build exit. Resolve the profile only when the game host jobs will actually be compiled.
nx2/build.py Outdated
@ -1891,6 +1928,7 @@ def main():
DEPFILE_JOBS[obj] = (host_blob, host_roots, extras)
jobs.append((cc, s, obj,
host_fl + ["-MD", "-I" + os.path.join(OPUS, "include")] +
(rt_fl if os.path.basename(s) != "pgo_rt.c" else []) + # (RX_PGO_RT; the counters' writer counts none)
Member

L8: The host jobs inherit -Wno-everything, so a readable renderer-only or wholly stale profile can produce a successful runtime build while applying no useful counts. The build still prints that it is using the profile. Surface missing and stale profile diagnostics for this mode and require evidence that runtime functions matched, while allowing individual functions to fall back after edits.

**L8**: The host jobs inherit -Wno-everything, so a readable renderer-only or wholly stale profile can produce a successful runtime build while applying no useful counts. The build still prints that it is using the profile. Surface missing and stale profile diagnostics for this mode and require evidence that runtime functions matched, while allowing individual functions to fall back after edits.
@ -0,0 +119,4 @@
def test_the_build_gives_it_to_the_runtimes_files_alone(self):
# (main()'s lines, as they are: the flags only on host/*.c's jobs and never on the counters' writer; the writer in
# the executable, and its link without clang's profile library, whenever something counts)
self.assertIn('rt_fl = rt_profile_flags() if a.standalone else []', BUILD)
Member

L12: The build coverage asserts source strings, while the round trip supplies its own compile and link commands. Both can pass if main drops the writer from the final object list or adds renderer jobs with the wrong flags. Capture the actual jobs and executable link command from build.main and assert the flags and inputs for unset, gen, use, combined counting and renderer-only builds.

**L12**: The build coverage asserts source strings, while the round trip supplies its own compile and link commands. Both can pass if main drops the writer from the final object list or adds renderer jobs with the wrong flags. Capture the actual jobs and executable link command from build.main and assert the flags and inputs for unset, gen, use, combined counting and renderer-only builds.
@ -0,0 +145,4 @@
int main(void) {
const char *f = getenv("HOS_PGO");
char dump[MAX_PATH];
long s = 0;
Member

L14: On Windows, long is 32-bit and the sum over 100,000 calls is about 10.8 billion, so the fixture itself has signed overflow. It also accepts a profile with every count zero, since it checks function names and matching hashes only. Use defined 64-bit arithmetic, run known branch distributions before and after an acknowledged reset, and assert the post-reset counts in the merged profile.

**L14**: On Windows, long is 32-bit and the sum over 100,000 calls is about 10.8 billion, so the fixture itself has signed overflow. It also accepts a profile with every count zero, since it checks function names and matching hashes only. Use defined 64-bit arithmetic, run known branch distributions before and after an acknowledged reset, and assert the post-reset counts in the merged profile.
@ -0,0 +159,4 @@
"""
@unittest.skipUnless(os.name == "nt", "host/pgo_rt.c's Windows writer: the round trip runs on Windows")
Member

L13: The only record/merge/use test skips Linux, leaving ELF section retention and the POSIX watcher untested. The suite also forces --cc clang over CC, and a missing llvm-profdata becomes a successful unittest skip even in the strict suite. Add the ELF round trip with the real POSIX shim and link flags, honor the selected compiler, and make missing required tools visible to strict CI.

**L13**: The only record/merge/use test skips Linux, leaving ELF section retention and the POSIX watcher untested. The suite also forces --cc clang over CC, and a missing llvm-profdata becomes a successful unittest skip even in the strict suite. Add the ELF round trip with the real POSIX shim and link flags, honor the selected compiler, and make missing required tools visible to strict CI.
futondestroyer requested changes 2026-11-21 02:56:10 +00:00
Dismissed
futondestroyer left a comment

Recommendation: Request changes. The new profile path must be scoped to the jobs that consume it, and the recorder must produce reliable counts before any speed result can be interpreted.

I independently confirm the unrelated-build failure and multithreaded-counter blockers reported at this head. rt_profile_flags() opens the specified profile for standalone renderer-only operations before host jobs are filtered. The test fixture compiles its own commands, so it cannot catch this route. Add an actual job-plan case with a missing runtime profile for a renderer-only build. Atomic Clang increments alone would still leave the watcher clearing counters with a raw memset and reading them with fwrite while game threads run. Define synchronized reset and snapshot behavior as well, then validate the actual writer on Windows and Linux. Ensure dump acknowledgement follows a confirmed complete write. The cache key hashes bytes from a mutable path that parallel compiler jobs subsequently reopen, so give the jobs the same stable snapshot the key hashes.

Does it help: Unproven. The author reported seven runtime-profile and two profile-key checks on Windows. The local compiler/profile round trip is single-threaded, skips Linux, and does not prove that a game build consumes a useful profile. No paired gameplay or clean build time and size result exists, and CI is pending. Keep the developer switch off by default. A normal gameplay farm plan cannot generate, merge, and consume an exact-head runtime profile and then compare the requested build-time switch. Use an explicitly supported multi-stage flow with matching compiler and private inputs once correctness is fixed.

Reviewed: 66df764957 against 6e1521a70a. Read the full patch and the compile, pack-routing, linker and runtime profile-writer paths. No code executed.

**Recommendation: Request changes.** The new profile path must be scoped to the jobs that consume it, and the recorder must produce reliable counts before any speed result can be interpreted. I independently confirm the unrelated-build failure and multithreaded-counter blockers reported at this head. `rt_profile_flags()` opens the specified profile for standalone renderer-only operations before host jobs are filtered. The test fixture compiles its own commands, so it cannot catch this route. Add an actual job-plan case with a missing runtime profile for a renderer-only build. Atomic Clang increments alone would still leave the watcher clearing counters with a raw `memset` and reading them with `fwrite` while game threads run. Define synchronized reset and snapshot behavior as well, then validate the actual writer on Windows and Linux. Ensure dump acknowledgement follows a confirmed complete write. The cache key hashes bytes from a mutable path that parallel compiler jobs subsequently reopen, so give the jobs the same stable snapshot the key hashes. **Does it help:** Unproven. The author reported seven runtime-profile and two profile-key checks on Windows. The local compiler/profile round trip is single-threaded, skips Linux, and does not prove that a game build consumes a useful profile. No paired gameplay or clean build time and size result exists, and CI is pending. Keep the developer switch off by default. A normal gameplay farm plan cannot generate, merge, and consume an exact-head runtime profile and then compare the requested build-time switch. Use an explicitly supported multi-stage flow with matching compiler and private inputs once correctness is fixed. **Reviewed:** 66df764957918e3178a5e9d0879c510ab4752d68 against 6e1521a70a32603ed60a8263e4072625885669b7. Read the full patch and the compile, pack-routing, linker and runtime profile-writer paths. No code executed.
Review of 66df7649 (futondestroyer 62720, BeanBot 62636-62644). The checks that ran the
build's text are replaced by its real job plan (build.main up to the compile, nothing run):
off unless set; RX_PGO_RT=gen counts with atomic adds in every runtime file and never in the
writer, alone and with RX_PGO=gen; a profile is compiled from a copy of its bytes named by
their hash; a missing profile stops a build that compiles the runtime and is never opened by
the renderer alone (RX_VK_ONLY) or the third-party objects. Then rt_profile_report and the
clang a counting build needs.

The Windows round trip now counts 1,000,000 calls on four threads after a reset (none of the
100,000 before it may be in the profile), links the game's manifest and runs under a UTF-8
folder, and checks that a profile that cannot be put in place keeps <file>.dump and says so.
It takes --cc, then CC, then LONGSHOT_MINGW's clang; a clang without llvm-profdata beside it
fails instead of skipping. The fixture's sums are 64-bit.

At this commit the plan, report and round-trip checks fail: the profile is opened by every
standalone build, the adds are plain, .dump goes whether or not the write worked.

Assisted-by: Claude Code
fix(build): RX_PGO_RT only where the runtime is compiled; atomic counts, a whole dump, a stable profile copy
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 25s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
348857bbb4
Review of 66df7649 (futondestroyer 62720, BeanBot 62636-62645):

- The profile is read only when host/*.c are compiled: the renderer alone (RX_VK_ONLY) and the
  release's third-party objects never open it, a missing one included.
- It is read once, and every compile reads a copy of its bytes, build/rt_profile/<hash>.profdata:
  a profile merged again at the same path during a build cannot land under the old hash.
- RX_PGO_RT=gen counts with atomic adds (-fprofile-update=atomic). host/pgo_rt.c clears and
  copies the counters word by word with atomic stores and loads and writes the copy; it writes
  <file>.tmp, checks every write and the close, moves it over <file>, and only then deletes
  <file>.dump. A failure is said once and the write tried again while the marker stays. Marker
  names are built at any length; an allocation or thread start that fails is said and cleaned up,
  and the thread's handle closed.
- A counting build (RX_PGO=gen too: the same writer) stops on a clang older than 19, whose
  llvm-profdata reads neither raw format the writer writes.
- With a profile, clang's notes on it are shown through the files' -Wno-everything
  (-Wprofile-instr-unprofiled/out-of-date/missing), and after the compile the build says how many
  runtime files found their counts and names the rest; it stops when none did, and drops those
  objects so the next build compiles them again.
- developing.md's recipe: PowerShell, the runtime to run, the queue, files under work/, RX_PGO=gen
  left unset (its dump holds the game's counters); build.md and HOS_PGO's row say the same; the
  Linux host/posix files are named.

Assisted-by: Claude Code
Author
Contributor

Pushed 348857bb on main @ 6e1521a7, for the reviews of 66df7649. 1ca31bbd adds the failing tests: build.main's real job plan, and a Windows round trip with four threads, a reset and a blocked write. 348857bb is the fix. The profile is now read only where the runtime's files are compiled, and every compile reads a stable copy named by its hash. Counting uses atomic adds, and host/pgo_rt.c clears and copies the counters atomically and deletes .dump only after the profile is in place whole. Counting builds need clang 19 or newer, a profile build reports which runtime files matched, and the recipe is reworked. Summary, Testing, Measurements and Risks describe this head. The Linux writer run, the in-game measurement, and build times and sizes are still in Still to test.

Pushed 348857bb on `main` @ 6e1521a7, for the reviews of 66df7649. 1ca31bbd adds the failing tests: build.main's real job plan, and a Windows round trip with four threads, a reset and a blocked write. 348857bb is the fix. The profile is now read only where the runtime's files are compiled, and every compile reads a stable copy named by its hash. Counting uses atomic adds, and host/pgo_rt.c clears and copies the counters atomically and deletes .dump only after the profile is in place whole. Counting builds need clang 19 or newer, a profile build reports which runtime files matched, and the recipe is reworked. Summary, Testing, Measurements and Risks describe this head. The Linux writer run, the in-game measurement, and build times and sizes are still in Still to test.
Author
Contributor

Re #1986 (comment): done in 348857bb, with the failing tests first in 1ca31bbd. The profile is read only when host/*.c are compiled, so RX_VK_ONLY and the third-party objects never open it; tests/test_rt_profile_build.py now runs build.main's real job plan, including a renderer-only build with a missing RX_PGO_RT. RX_PGO_RT=gen counts with atomic adds (-fprofile-update=atomic), and host/pgo_rt.c clears and copies the counters word by word with atomic stores and loads and writes the copy. It writes .tmp, checks every write and the close, moves the file into place, and only then deletes .dump; a failure is reported and the marker kept. Every compile reads a copy of the profile named by the hash the key holds (build/rt_profile/.profdata). On Windows the round trip counts exactly 1,000,000 calls made on four threads after a reset, and checks a blocked write. The Linux run of the writer is not covered by this push: it needs a Linux machine and is listed under Still to test. The switch stays off by default, and the measurements are pending.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62720: done in 348857bb, with the failing tests first in 1ca31bbd. The profile is read only when host/*.c are compiled, so RX_VK_ONLY and the third-party objects never open it; tests/test_rt_profile_build.py now runs build.main's real job plan, including a renderer-only build with a missing RX_PGO_RT. RX_PGO_RT=gen counts with atomic adds (-fprofile-update=atomic), and host/pgo_rt.c clears and copies the counters word by word with atomic stores and loads and writes the copy. It writes <file>.tmp, checks every write and the close, moves the file into place, and only then deletes <file>.dump; a failure is reported and the marker kept. Every compile reads a copy of the profile named by the hash the key holds (build/rt_profile/<hash>.profdata). On Windows the round trip counts exactly 1,000,000 calls made on four threads after a reset, and checks a blocked write. The Linux run of the writer is not covered by this push: it needs a Linux machine and is listed under Still to test. The switch stays off by default, and the measurements are pending.
Author
Contributor

Re #1986 (comment) (L1): fixed in 348857bb. rt_profile_flags runs only when the build compiles the runtime's files (standalone, not RX_VK_ONLY, not --third-party-objects). Plan.test_the_renderer_alone_never_opens_it and test_the_third_party_objects_never_open_it run build.main with a missing profile and check that it plans without opening it; both fail at 1ca31bbd.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62636 (L1): fixed in 348857bb. rt_profile_flags runs only when the build compiles the runtime's files (standalone, not RX_VK_ONLY, not --third-party-objects). Plan.test_the_renderer_alone_never_opens_it and test_the_third_party_objects_never_open_it run build.main with a missing profile and check that it plans without opening it; both fail at 1ca31bbd.
Author
Contributor

Re #1986 (comment) (L2): fixed in 348857bb. RT_GEN adds -fprofile-update=atomic, and host/pgo_rt.c's reset and dump now clear and copy each counter word with atomic stores and loads, and write the copy, not the live section. The Windows round trip runs 1,000,000 calls on four threads after a reset and requires exactly that count in the merged profile. Combined mode (RX_PGO=gen too) is in the job-plan test; the hot pieces' own adds stay plain as on main, and the description says so.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62637 (L2): fixed in 348857bb. RT_GEN adds -fprofile-update=atomic, and host/pgo_rt.c's reset and dump now clear and copy each counter word with atomic stores and loads, and write the copy, not the live section. The Windows round trip runs 1,000,000 calls on four threads after a reset and requires exactly that count in the merged profile. Combined mode (RX_PGO=gen too) is in the job-plan test; the hot pieces' own adds stay plain as on main, and the description says so.
Author
Contributor

Re #1986 (comment) (L3): fixed in 348857bb. The profile is read once, and its bytes are copied to build/rt_profile/.profdata, which every runtime compile reads. A new merge at the same path cannot reach objects stored under the old hash. Plan.test_profile_is_read_once_and_compiled_from_a_copy rewrites the profile after planning and checks that the copy is unchanged and the flags name it.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62638 (L3): fixed in 348857bb. The profile is read once, and its bytes are copied to build/rt_profile/<hash>.profdata, which every runtime compile reads. A new merge at the same path cannot reach objects stored under the old hash. Plan.test_profile_is_read_once_and_compiled_from_a_copy rewrites the profile after planning and checks that the copy is unchanged and the flags name it.
Author
Contributor

Re #1986 (comment) (L8): fixed in 348857bb. With a profile, the runtime jobs add -Wprofile-instr-unprofiled/-out-of-date/-missing after their -Wno-everything (the round trip checks that both notes come through). After the compile the build says how many runtime files found their counts and names the files clang noted. If none found counts, it stops and drops those objects, so a renderer-only or wholly stale profile fails instead of building quietly. Single functions changed since the recording still fall back.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62639 (L8): fixed in 348857bb. With a profile, the runtime jobs add -Wprofile-instr-unprofiled/-out-of-date/-missing after their -Wno-everything (the round trip checks that both notes come through). After the compile the build says how many runtime files found their counts and names the files clang noted. If none found counts, it stops and drops those objects, so a renderer-only or wholly stale profile fails instead of building quietly. Single functions changed since the recording still fall back.
Author
Contributor

Re #1986 (comment) (L10): fixed in 348857bb. The recipe now gives the PowerShell form, makes a runtime from the pack (dev.py packs rt) and runs that runtime's executable, and runs the build and the recording through the queue. It also keeps the files under the ignored work/ by absolute path.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62640 (L10): fixed in 348857bb. The recipe now gives the PowerShell form, makes a runtime from the pack (dev.py packs rt) and runs that runtime's executable, and runs the build and the recording through the queue. It also keeps the files under the ignored work/ by absolute path.
Author
Contributor

Re #1986 (comment) (L11): fixed in 348857bb. The recipe says to leave RX_PGO=gen unset, because with it the dump also holds the lifted game's counters, which stay on the developer's PC. The closing sentence now describes only a profile recorded with RX_PGO_RT=gen alone.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62641 (L11): fixed in 348857bb. The recipe says to leave RX_PGO=gen unset, because with it the dump also holds the lifted game's counters, which stay on the developer's PC. The closing sentence now describes only a profile recorded with RX_PGO_RT=gen alone.
Author
Contributor

Re #1986 (comment) (L12): fixed in 1ca31bbd. The source-string checks are gone; the test captures build.main's real job plan for unset, gen, a profile, combined RX_PGO=gen, renderer-only and third-party-object builds, and asserts each job's flags and whether the writer is in the build. The executable's link command is not captured: it is built after the compile, and its profile options follow the same counting value that decides whether pgo_rt.c is in the plan. Capturing the link is left for a later round.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62642 (L12): fixed in 1ca31bbd. The source-string checks are gone; the test captures build.main's real job plan for unset, gen, a profile, combined RX_PGO=gen, renderer-only and third-party-object builds, and asserts each job's flags and whether the writer is in the build. The executable's link command is not captured: it is built after the compile, and its profile options follow the same `counting` value that decides whether pgo_rt.c is in the plan. Capturing the link is left for a later round.
Author
Contributor

Re #1986 (comment) (L13): partly fixed in 1ca31bbd. The test no longer forces --cc clang: it takes --cc, then CC, then LONGSHOT_MINGW's clang, then clang on PATH. A clang without llvm-profdata beside it now fails instead of skipping. The ELF round trip with the real POSIX shim is not in this push, because it needs a Linux machine to verify; it is in Still to test and comes in a later round.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62643 (L13): partly fixed in 1ca31bbd. The test no longer forces --cc clang: it takes --cc, then CC, then LONGSHOT_MINGW's clang, then clang on PATH. A clang without llvm-profdata beside it now fails instead of skipping. The ELF round trip with the real POSIX shim is not in this push, because it needs a Linux machine to verify; it is in Still to test and comes in a later round.
Author
Contributor

Re #1986 (comment) (L14): fixed in 1ca31bbd. The fixture uses int64_t, runs 100,000 calls before an acknowledged reset and 1,000,000 on four threads after it, and requires exactly 1,000,000 as pick's function count in the merged profile, so an all-zero or pre-reset profile fails.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62644 (L14): fixed in 1ca31bbd. The fixture uses int64_t, runs 100,000 calls before an acknowledged reset and 1,000,000 on four threads after it, and requires exactly 1,000,000 as pick's function count in the merged profile, so an all-zero or pre-reset profile fails.
Author
Contributor

Re #1986 (comment) (L4): fixed in 348857bb. pgo_write checks its allocations, every fwrite and the fclose, writes .tmp, and moves it over . Only then is .dump deleted. A failure is printed to stderr once, the marker stays, and the write is retried every 500 ms. The round trip makes a folder so the move fails, checks that .dump stays and the message is printed, then removes the folder and checks that the profile is written.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62645 (L4): fixed in 348857bb. pgo_write checks its allocations, every fwrite and the fclose, writes <file>.tmp, and moves it over <file>. Only then is <file>.dump deleted. A failure is printed to stderr once, the marker stays, and the write is retried every 500 ms. The round trip makes <file> a folder so the move fails, checks that .dump stays and the message is printed, then removes the folder and checks that the profile is written.
Author
Contributor

Re #1986 (comment) (L5): fixed in 348857bb. The marker names are built with malloc at any length, and a lookup failure other than "not found" is reported once. The round trip links the game's manifest and runs under a folder with a UTF-8 name. A path over MAX_PATH is not tested: neither the manifest nor this PC opts into Windows long paths, so such a path fails at the OS, which the writer now reports instead of truncating.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62645 (L5): fixed in 348857bb. The marker names are built with malloc at any length, and a lookup failure other than "not found" is reported once. The round trip links the game's manifest and runs under a folder with a UTF-8 name. A path over MAX_PATH is not tested: neither the manifest nor this PC opts into Windows long paths, so such a path fails at the OS, which the writer now reports instead of truncating.
Author
Contributor

Re #1986 (comment) (L6): fixed in 348857bb. A counting build (RX_PGO_RT=gen, and RX_PGO=gen, which uses the same writer) now stops on a clang older than 19 (build.pgo_writer_supported, from -dumpversion). Raw format 10 came with LLVM 19, and older llvm-profdata reads neither format the writer emits. The build reference says so, and CountingClang checks 17/18/4.2.1 against 19/22/23.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62645 (L6): fixed in 348857bb. A counting build (RX_PGO_RT=gen, and RX_PGO=gen, which uses the same writer) now stops on a clang older than 19 (build.pgo_writer_supported, from -dumpversion). Raw format 10 came with LLVM 19, and older llvm-profdata reads neither format the writer emits. The build reference says so, and CountingClang checks 17/18/4.2.1 against 19/22/23.
Author
Contributor

Re #1986 (comment) (L7): partly fixed in 348857bb. The constructor checks every allocation and CreateThread, reports a failure and frees what it took, closes the handle on success, and treats an empty HOS_PGO as unset. The Linux affinity race (init_process_affinity's constructor against apply_process_affinity on a thread started by another constructor) is in host/posix/win32_posix.c and is already present on main for RX_PGO=gen. I can't verify a change there on this PC, so it is left for a later round, and the description says so.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62645 (L7): partly fixed in 348857bb. The constructor checks every allocation and CreateThread, reports a failure and frees what it took, closes the handle on success, and treats an empty HOS_PGO as unset. The Linux affinity race (init_process_affinity's constructor against apply_process_affinity on a thread started by another constructor) is in host/posix/win32_posix.c and is already present on main for RX_PGO=gen. I can't verify a change there on this PC, so it is left for a later round, and the description says so.
Author
Contributor

Re #1986 (comment) (L9): fixed in 348857bb. The build reference, the recipe and the code comment now name the executable's host/posix files on Linux, and the recipe says the renderer's own copy of win32_posix.c keeps its flags.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62645 (L9): fixed in 348857bb. The build reference, the recipe and the code comment now name the executable's host/posix files on Linux, and the recipe says the renderer's own copy of win32_posix.c keeps its flags.
Author
Contributor

Re #1986 (comment) (L15): the part an edit can do is in 348857bb. After the compile, a profile build reports how many runtime files found their counts and names the files clang noted as out of date or missing; it stops if none matched. The in-game comparison (counting and profile builds on Windows and Linux, profile head against its merge base, interleaved, average fps, 1% low, median and p99) needs a recorded profile and is pending with the in-game tester; it stays in Still to test.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62645 (L15): the part an edit can do is in 348857bb. After the compile, a profile build reports how many runtime files found their counts and names the files clang noted as out of date or missing; it stops if none matched. The in-game comparison (counting and profile builds on Windows and Linux, profile head against its merge base, interleaved, average fps, 1% low, median and p99) needs a recorded profile and is pending with the in-game tester; it stays in Still to test.
Author
Contributor

Re #1986 (comment) (L16): pending. Clean build and link times and executable sizes for the merge base, the head unset and the head with a recorded profile need full game builds and a recorded profile. They are in Still to test for a later round, and this push claims no figures.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-62645 (L16): pending. Clean build and link times and executable sizes for the merge base, the head unset and the head with a recorded profile need full game builds and a recorded profile. They are in Still to test for a later round, and this push claims no figures.
Author
Contributor

Tested corrected: an earlier run on this PC had no Vulkan headers for the renderer checks (RX_CPM unset), so the ones it listed as also failing on main had compiled nothing on either side. They ran again with the headers at 348857bb and on main (queue job fb2-vk-1); the description now gives those results. No check fails at this head alone; nothing in the branch changed.

Tested corrected: an earlier run on this PC had no Vulkan headers for the renderer checks (`RX_CPM` unset), so the ones it listed as also failing on `main` had compiled nothing on either side. They ran again with the headers at 348857bb and on `main` (queue job fb2-vk-1); the description now gives those results. No check fails at this head alone; nothing in the branch changed.
futondestroyer requested changes 2026-11-21 09:27:09 +00:00
Dismissed
futondestroyer left a comment

Recommendation: Request changes. At 348857bb against 6e1521a7, the renderer-only scope, immutable profile snapshot and runtime atomic increment/reset/read paths address my earlier findings. The new profile-use validation can be bypassed on a retry.

compile_one records warnings only for jobs that actually compile, and successful jobs can stamp/cache objects before main returns for another failed compile. On the retry the cached jobs produce no entries in RT_NOTES; rt_profile_report then assumes those files were previously validated. A fully unrelated profile can pass the advertised reject check after a two-pass build, although no completed pass checked its objects. Commit the profile-fit result together with the object or defer reusable cache publication until validation. Include a fixture with an unrelated profile, a late build failure, then a warm retry. Also avoid claiming counts applied to a file merely because it emitted a mismatch warning instead of the unprofiled warning.

The Windows fixture is not proof that a gameplay build uses a representative profile. The exact comparison needs matching producer and consumer toolchains, a recording run, and a later build with the merged profile. The ordinary farm plan cannot do that. Keep the opt-in switch off and establish clean build, size and paired gameplay evidence after correcting the report. CI is pending. No PR code ran.

**Recommendation: Request changes.** At `348857bb` against `6e1521a7`, the renderer-only scope, immutable profile snapshot and runtime atomic increment/reset/read paths address my earlier findings. The new profile-use validation can be bypassed on a retry. `compile_one` records warnings only for jobs that actually compile, and successful jobs can stamp/cache objects before `main` returns for another failed compile. On the retry the cached jobs produce no entries in `RT_NOTES`; `rt_profile_report` then assumes those files were previously validated. A fully unrelated profile can pass the advertised reject check after a two-pass build, although no completed pass checked its objects. Commit the profile-fit result together with the object or defer reusable cache publication until validation. Include a fixture with an unrelated profile, a late build failure, then a warm retry. Also avoid claiming counts applied to a file merely because it emitted a mismatch warning instead of the unprofiled warning. The Windows fixture is not proof that a gameplay build uses a representative profile. The exact comparison needs matching producer and consumer toolchains, a recording run, and a later build with the merged profile. The ordinary farm plan cannot do that. Keep the opt-in switch off and establish clean build, size and paired gameplay evidence after correcting the report. CI is pending. No PR code ran.
nx2/build.py Outdated
@ -1292,0 +1348,4 @@
them). None found: the profile is not this runtime's (another build's, the renderer's, or one from before most of it
changed), so the build stops, and those objects are dropped, so the next build compiles them again. All from the object
cache: they were built with this profile's contents before, and that build said how they matched"""
if not RT_NOTES:
Member

A cache hit does not prove the later fit check ever ran. If the host objects were stamped and cached before an unrelated compile error returned from main, the warm retry gets no RT_NOTES and can skip rejecting the wrong profile. Tie fit validation to object reuse or defer cache publication until validation completes. Test a wrong profile plus a late unrelated compile failure and warm retry.

A cache hit does not prove the later fit check ever ran. If the host objects were stamped and cached before an unrelated compile error returned from main, the warm retry gets no RT_NOTES and can skip rejecting the wrong profile. Tie fit validation to object reuse or defer cache publication until validation completes. Test a wrong profile plus a late unrelated compile failure and warm retry.
siantm force-pushed perf/build-pgo-rt from 348857bbb4
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 25s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
to 1cc32eb0b2
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 4s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-21 10:33:57 +00:00
Compare
Author
Contributor

Pushed 1cc32eb0, on main @ 9dd41326, for futondestroyer's second look at 348857bb. 8d1972d2 adds the failing tests: a warm retry after an unrelated failed build, and a report that counts functions. In 1cc32eb0 each runtime object keeps clang's notes on the profile beside it, in the work folder and in the object cache, and is reused only with them. The report counts functions rather than trusting a missing "unprofiled" warning. Round 1's commits are rebased unchanged (range-diff "=", and context only in one main() hunk). The switch stays off; clean build, size and gameplay evidence are in Still to test with the in-game tester. Testing names which commit each check ran on.

Pushed 1cc32eb0, on `main` @ 9dd41326, for futondestroyer's second look at 348857bb. 8d1972d2 adds the failing tests: a warm retry after an unrelated failed build, and a report that counts functions. In 1cc32eb0 each runtime object keeps clang's notes on the profile beside it, in the work folder and in the object cache, and is reused only with them. The report counts functions rather than trusting a missing "unprofiled" warning. Round 1's commits are rebased unchanged (range-diff "=", and context only in one main() hunk). The switch stays off; clean build, size and gameplay evidence are in Still to test with the in-game tester. Testing names which commit each check ran on.
Author
Contributor

Re #1986 (comment): fixed in 1cc32eb0, with the failing test first in 8d1972d2. Each runtime object built with a profile now keeps clang's notes from its own compile beside it:

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-65455: fixed in 1cc32eb0, with the failing test first in 8d1972d2. Each runtime object built with a profile now keeps clang's notes from its own compile beside it: <object>.rtfit, and <key>.rtfit in the object cache. They are written before the object is stamped or cached. compile_one reuses such an object, from the folder or from the cache, only together with its notes, so every build reports every runtime file. WarmRetry runs build.main with a fake compiler: a profile of nothing in this runtime, a first build stopped by another file's compile failure after the runtime's objects were stamped and cached, then the build again. Reusing the objects from the folder and from the cache, the retry stops on the profile; at 8d1972d2 it went on to link.
Author
Contributor

Re #1986 (comment): both points are fixed in 1cc32eb0 (failing tests in 8d1972d2); the branch is rebased onto main @ 9dd41326. The fit check now travels with the object (the reply on the inline comment has the details), and the warm-retry fixture covers both the folder and the cache. The report no longer counts a file because it lacks the unprofiled warning. It reads clang's "of N functions, M mismatched / K no data" notes, so a file has counts only when some function's apply, and a file whose every function is out of date counts as none. The switch stays off by default. Clean build time, size and paired gameplay evidence (record, merge, then a profile build against main) are pending with the in-game tester and stay in Still to test; this push claims none.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-65456: both points are fixed in 1cc32eb0 (failing tests in 8d1972d2); the branch is rebased onto main @ 9dd41326. The fit check now travels with the object (the reply on the inline comment has the details), and the warm-retry fixture covers both the folder and the cache. The report no longer counts a file because it lacks the unprofiled warning. It reads clang's "of N functions, M mismatched / K no data" notes, so a file has counts only when some function's apply, and a file whose every function is out of date counts as none. The switch stays off by default. Clean build time, size and paired gameplay evidence (record, merge, then a profile build against main) are pending with the in-game tester and stay in Still to test; this push claims none.
futondestroyer left a comment

Request changes on 1cc32eb0b2828f39ed292563b64b3b7354747a00 against 9dd41326e71094d8b774459dac5154eb5a3306d9.

The stored notes cover the previous same-profile warm retry after an unrelated compile failure, and the report now distinguishes fully mismatched files. The in-folder reuse path still has a cross-profile interruption window.

After a successful profile A build, start a profile B build in the same output folder. compile_one overwrites the runtime object and then writes B's .rtfit while A's .sha1 still exists. If the build stops before the pending or new key is written, a build with A accepts its old stamp and loads B's notes for B's object. A single affected object can make the retry report the wrong fit or reuse machine code optimized for the wrong profile.

Invalidate the old stamp before replacing either payload, or publish the object and its key-bound notes so the prior key cannot certify the replacement. Please cover A → B interrupted after the replacement → A. The clean measurements and paired in-game record, merge and profile-use validation remain open.

Request changes on `1cc32eb0b2828f39ed292563b64b3b7354747a00` against `9dd41326e71094d8b774459dac5154eb5a3306d9`. The stored notes cover the previous same-profile warm retry after an unrelated compile failure, and the report now distinguishes fully mismatched files. The in-folder reuse path still has a cross-profile interruption window. After a successful profile A build, start a profile B build in the same output folder. `compile_one` overwrites the runtime object and then writes B's `.rtfit` while A's `.sha1` still exists. If the build stops before the pending or new key is written, a build with A accepts its old stamp and loads B's notes for B's object. A single affected object can make the retry report the wrong fit or reuse machine code optimized for the wrong profile. Invalidate the old stamp before replacing either payload, or publish the object and its key-bound notes so the prior key cannot certify the replacement. Please cover A → B interrupted after the replacement → A. The clean measurements and paired in-game record, merge and profile-use validation remain open.
Review of 1cc32eb0 (futondestroyer 67043). Through build.main with a fake compiler: a build with
profile A, then one with profile B stopped where it stamps the first runtime object it compiled
(its object and notes are B's, its stamp still A's key), then A again: every runtime object and
its notes must be A's, and the report must find A's counts in every runtime file. The fake
compiler now writes its object as clang does, to a file of its own moved into place, so the
object the cache shares by a hard link stays the cache's.

At this commit it fails: the last build reuses B's object and B's notes by A's old stamp.

Assisted-by: Claude Code
fix(build): RX_PGO_RT, a runtime object's stamp goes before the object or its notes are replaced
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 6s
d429a14a5d
Review of 1cc32eb0 (futondestroyer 67043). compile_one replaced a runtime object built with a
profile, and wrote its .rtfit notes, while the stamp of the object before it was still there. A
build with another profile that stopped before the new stamp left the old key vouching for the
new object and notes, and a build with the first profile again reused them: the other profile's
code, and its fit in the report. Now the stamp is removed first, before an object comes from the
cache or from a compile, so a build that stops there leaves no stamp, and the next build takes
the object of its own key from the cache or compiles it. Only objects built with RX_PGO_RT=<file>.

Assisted-by: Claude Code
Author
Contributor

Pushed d429a14a, still on main @ 9dd41326 (main has not moved, so nothing was rebased), for futondestroyer's third look at 1cc32eb0. ea90b759 adds the failing test, a build with profile A, then one with B stopped before it stamps a runtime object it replaced, then A again. d429a14a removes such an object's stamp before the object or its notes are replaced, from the cache or by a compile. Earlier commits are unchanged. The switch stays off. Testing names the queue job and which commit each check ran on.

Pushed d429a14a, still on `main` @ 9dd41326 (main has not moved, so nothing was rebased), for futondestroyer's third look at 1cc32eb0. ea90b759 adds the failing test, a build with profile A, then one with B stopped before it stamps a runtime object it replaced, then A again. d429a14a removes such an object's stamp before the object or its notes are replaced, from the cache or by a compile. Earlier commits are unchanged. The switch stays off. Testing names the queue job and which commit each check ran on.
Author
Contributor

Re #1986 (comment): fixed in d429a14a, with the failing test first in ea90b759. compile_one now removes a runtime object's .sha1 stamp before it replaces the object or its .rtfit notes (from the cache or by a compile), so a build that stops in between leaves no older key that vouches for them, and the next build takes its own key's object from the cache or compiles it. WarmRetry's new case runs A, then B stopped where it stamps the runtime object it compiled, then A again. At ea90b759 the last build reused B's two replaced objects and their notes by A's stamp ("77 of the 79 runtime files" with counts), and at d429a14a every object and its notes are A's again, in the same queue job. The clean build and size measurements and the paired in-game record, merge and profile-use run are with the in-game tester (HostLiftPRs) and have not run yet. The switch stays off.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-67043: fixed in d429a14a, with the failing test first in ea90b759. compile_one now removes a runtime object's `.sha1` stamp before it replaces the object or its `.rtfit` notes (from the cache or by a compile), so a build that stops in between leaves no older key that vouches for them, and the next build takes its own key's object from the cache or compiles it. WarmRetry's new case runs A, then B stopped where it stamps the runtime object it compiled, then A again. At ea90b759 the last build reused B's two replaced objects and their notes by A's stamp ("77 of the 79 runtime files" with counts), and at d429a14a every object and its notes are A's again, in the same queue job. The clean build and size measurements and the paired in-game record, merge and profile-use run are with the in-game tester (HostLiftPRs) and have not run yet. The switch stays off.
Author
Contributor

Re #1986 (comment) ("the clean measurements and paired in-game record ... remain open"): the paired in-game run has been done, and Measurements now has it run by run. Castle Town's market, 60 s plain runs on this PC (i7-9700, RTX 4060), run alone, a warm-up a side, then M P P M M P, the GPU cooled before each run: main 9dd41326 against this PR with RX_PGO_RT set to a profile recorded from a counting build of 1cc32eb0 (the same host code as the head d429a14a). Game time a frame, median (range): main 13.10 ms (12.57 to 13.74), with the profile 12.76 (12.52 to 12.98), about 2.6 % less; fps 61.7 (56.1 to 71.3) against 68.4 (66.6 to 72.2); p99 43.6 against 40.4 ms. Reading: not decided, no loss seen: the ranges overlap and there are three runs a side. A rerun of 6 a side is being arranged. Clean build time and size, Linux, and the A → B interrupted → A case of this review's first point are separate: the latter is in d429a14a with its test (ea90b759), described in the update before this one. The switch stays off.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-67043 ("the clean measurements and paired in-game record ... remain open"): the paired in-game run has been done, and Measurements now has it run by run. Castle Town's market, 60 s plain runs on this PC (i7-9700, RTX 4060), run alone, a warm-up a side, then M P P M M P, the GPU cooled before each run: `main` 9dd41326 against this PR with `RX_PGO_RT` set to a profile recorded from a counting build of 1cc32eb0 (the same host code as the head d429a14a). Game time a frame, median (range): main 13.10 ms (12.57 to 13.74), with the profile 12.76 (12.52 to 12.98), about 2.6 % less; fps 61.7 (56.1 to 71.3) against 68.4 (66.6 to 72.2); p99 43.6 against 40.4 ms. Reading: not decided, no loss seen: the ranges overlap and there are three runs a side. A rerun of 6 a side is being arranged. Clean build time and size, Linux, and the A → B interrupted → A case of this review's first point are separate: the latter is in d429a14a with its test (ea90b759), described in the update before this one. The switch stays off.
Author
Contributor

Measurements corrected: the sentence that the GPU's clock differed from run to run (915 to 2,760 MHz) was wrong; that median covered the whole log, including loading, menus and the cool-down wait at the idle clock. Over each run's measured 60 s the GPU was at its full clock in every run but P3 (2,415 MHz, waiting for frames); the slowest runs, M3 and M1, ran at full clock with the game thread waiting longer. The figures and the reading are unchanged.

Measurements corrected: the sentence that the GPU's clock differed from run to run (915 to 2,760 MHz) was wrong; that median covered the whole log, including loading, menus and the cool-down wait at the idle clock. Over each run's measured 60 s the GPU was at its full clock in every run but P3 (2,415 MHz, waiting for frames); the slowest runs, M3 and M1, ran at full clock with the game thread waiting longer. The figures and the reading are unchanged.
Author
Contributor

Measurements corrected: two of the six Market runs are left out. P3 rendered an 800x600 output, because this PC's desktop changed to 800x600 at 30 Hz before it started (its lower GPU clock was that); in M3 the game window was brought to the front during the measured minute. With two runs a side (main 12.57 and 13.10 ms of game time a frame, the profile build 12.52 and 12.76) the runs overlap and show no difference either way, so the earlier "about 2.6 % less" no longer stands. A rerun of 6 a side with the output pinned at 2560x1440 is held.

Measurements corrected: two of the six Market runs are left out. P3 rendered an 800x600 output, because this PC's desktop changed to 800x600 at 30 Hz before it started (its lower GPU clock was that); in M3 the game window was brought to the front during the measured minute. With two runs a side (main 12.57 and 13.10 ms of game time a frame, the profile build 12.52 and 12.76) the runs overlap and show no difference either way, so the earlier "about 2.6 % less" no longer stands. A rerun of 6 a side with the output pinned at 2560x1440 is held.
Author
Contributor

Measurements and Testing: the in-game comparison at six runs a side (Castle Town's market, output pinned at 2560x1440) replaces the withdrawn three-a-side one. Calm-stretch game time 12.58 ms a frame with the runtime profile against 12.68 on main, inside the spread: no difference shown, no loss seen. What else differs between the two builds is now stated. Still to test now lists the like-for-like pair (this head without and with the profile).

Measurements and Testing: the in-game comparison at six runs a side (Castle Town's market, output pinned at 2560x1440) replaces the withdrawn three-a-side one. Calm-stretch game time 12.58 ms a frame with the runtime profile against 12.68 on `main`, inside the spread: no difference shown, no loss seen. What else differs between the two builds is now stated. Still to test now lists the like-for-like pair (this head without and with the profile).
Author
Contributor

Re #1986 (comment) ("the clean measurements and paired in-game record ... remain open"): the paired in-game run is now in Measurements, six interleaved runs a side. Setup: Castle Town's market, 60 s plain runs, cap off, run alone on this PC (i7-9700, RTX 4060), output 2560x1440, the GPU cooled before each run. It compares main @ 9dd41326 with this PR's head built with a runtime profile, recorded from a counting build of 1cc32eb0, which has the same host code. That build reported counts for 80 of the 80 runtime files.

  • What it shows: median calm-stretch game time 12.58 ms a frame with the profile against 12.68 on main (0.7 % less). Each side's runs spread over the other's (12.02 to 12.98 against 12.11 to 13.06), so no difference is shown, and no loss either.
  • What it does not show: the whole-run game time (12.58 against 13.06), fps (70.5 against 67.1) and p99 (23.1 against 44.1 ms) differ more. They follow two main runs with burst windows, and a p99 that falls near 22 or 45 ms on both sides: four of main's runs in the high group against two of the PR's. Six runs a side do not show that split to differ.
  • Like-for-like: main's executable equals this head built without the profile except for its version stamp, so the executable differs by the profile alone. The renderer is the head's on the profile side, with the RX_PGO_RT row added to the switch table. The head without the profile was not run in the game. Clean build time and size are still not measured.
  • The earlier three-a-side run is withdrawn: one of its runs rendered an 800x600 output after this PC's desktop changed, and another had the game window brought to the front.

The switch stays off.

Re https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1986#issuecomment-67043 ("the clean measurements and paired in-game record ... remain open"): the paired in-game run is now in Measurements, six interleaved runs a side. Setup: Castle Town's market, 60 s plain runs, cap off, run alone on this PC (i7-9700, RTX 4060), output 2560x1440, the GPU cooled before each run. It compares `main` @ 9dd41326 with this PR's head built with a runtime profile, recorded from a counting build of 1cc32eb0, which has the same host code. That build reported counts for 80 of the 80 runtime files. - **What it shows:** median calm-stretch game time 12.58 ms a frame with the profile against 12.68 on `main` (0.7 % less). Each side's runs spread over the other's (12.02 to 12.98 against 12.11 to 13.06), so no difference is shown, and no loss either. - **What it does not show:** the whole-run game time (12.58 against 13.06), fps (70.5 against 67.1) and p99 (23.1 against 44.1 ms) differ more. They follow two `main` runs with burst windows, and a p99 that falls near 22 or 45 ms on both sides: four of `main`'s runs in the high group against two of the PR's. Six runs a side do not show that split to differ. - **Like-for-like:** `main`'s executable equals this head built without the profile except for its version stamp, so the executable differs by the profile alone. The renderer is the head's on the profile side, with the `RX_PGO_RT` row added to the switch table. The head without the profile was not run in the game. Clean build time and size are still not measured. - **The earlier three-a-side run** is withdrawn: one of its runs rendered an 800x600 output after this PC's desktop changed, and another had the game window brought to the front. The switch stays off.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 6s
This pull request is marked as a work in progress.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'perf/build-pgo-rt:siantm-perf/build-pgo-rt'
git switch 'siantm-perf/build-pgo-rt'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1986
No description provided.