Title memory by address: per-frame timings on its log line (log only) #1468

Merged
tupacfan04 merged 1 commit from upstream-pr/1468 into main 2026-11-29 08:16:56 +00:00
tupacfan04 commented 2026-11-28 20:22:19 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tupacfan04 on 2026-11-28T20:22:19Z.


What

Log only. The existing title memory by address: line (about every ten seconds) keeps its text and gains a tail with per-frame timings:

; timings per frame: 21.774 ms in ready over 379 calls, of it 3.297 ms waiting for the lock (13.0 waits), 0.371 ms making arenas (0.01 tried), 0.273 ms in bring-ups (149.8), 0.732 ms landing at submissions (145)
  • ready: every call of memory::ready, lock wait included
  • waiting for the lock: the clock is read only when try_lock finds the lock held, then lock() as before
  • making arenas / bring-ups / landing: Memory::another past its once-a-frame refusal, Memory::bring_up, and the deferred closure at submission

Numbers are kept in static atomics and swapped to zero when the line is written. No control flow changes, no new switch. One file, crates/victory-gpu/src/memory.rs (+97 −3).

Why

With ray tracing on, nothing in the log said how much of the submitting thread's frame goes to title memory by address. This line does, so the ray tracing PRs that touch this path (#971, #1062, #1046) can be judged with a number from any tester's log.

Measured

RTX 5070 12 GB (driver 621.40), i9-14900F, 32 GB, Windows 11. Series X, 2560x1440, DLSS Quality (model K), frame generation 2x. Unattended 6-minute runs on one walking route, built from source.

Run fps at 6–8k draws median frame ready per frame lock wait calls
ray tracing off 15.5 64.9 ms 0.1 ms 0.002 ms 15
VICTORY_BVH_BUILDER=1 10.4 85.3 ms 15.6–21.8 ms 3.0–4.1 ms 281–379
VICTORY_BVH_BUILDER=1 (next run) — — 23.6 ms 6.8 ms 298

So on this PC roughly 15–24 ms of the ray tracing frame is spent in memory::ready, and 3–7 ms of that is waiting for the memory lock. The two clock reads per call are not a visible cost at a few hundred calls a frame.

The runs were made on my test branch (main 63b902f plus local off-by-default switches) carrying this same commit; this PR is that commit alone, rebased on main 923e38c.

Tests

  • New: memory::tests::timings_are_taken_once
  • cargo test --release -p victory-gpu --lib on this branch: 551 passed, 0 failed, 43 ignored
  • One earlier run of the suite had watch::tests::what_is_put_in_beside_the_guards_is_told_at_every_view fail once; it then passed three times alone and in the next full run. This PR does not touch watch.rs. Plain main 923e38c passed twice (550 passed) in my runs, so I could not reproduce it there.

Checked for overlap

  • I searched the open pull requests for the files this touches and for timings on this log line. No open PR adds timings to it. Related (they change behaviour on the same path, this one only measures it): #971, #1062, #1046.
  • cargo test passed for the crate it touches: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5544231033 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1468). Originally posted by [tupacfan04](https://github.com/tupacfan04) on 2026-11-28T20:22:19Z. --- ## What Log only. The existing `title memory by address:` line (about every ten seconds) keeps its text and gains a tail with per-frame timings: ``` ; timings per frame: 21.774 ms in ready over 379 calls, of it 3.297 ms waiting for the lock (13.0 waits), 0.371 ms making arenas (0.01 tried), 0.273 ms in bring-ups (149.8), 0.732 ms landing at submissions (145) ``` - **ready**: every call of `memory::ready`, lock wait included - **waiting for the lock**: the clock is read only when `try_lock` finds the lock held, then `lock()` as before - **making arenas / bring-ups / landing**: `Memory::another` past its once-a-frame refusal, `Memory::bring_up`, and the deferred closure at submission Numbers are kept in static atomics and swapped to zero when the line is written. No control flow changes, no new switch. One file, `crates/victory-gpu/src/memory.rs` (+97 −3). ## Why With ray tracing on, nothing in the log said how much of the submitting thread's frame goes to title memory by address. This line does, so the ray tracing PRs that touch this path (#971, #1062, #1046) can be judged with a number from any tester's log. ## Measured RTX 5070 12 GB (driver 621.40), i9-14900F, 32 GB, Windows 11. Series X, 2560x1440, DLSS Quality (model K), frame generation 2x. Unattended 6-minute runs on one walking route, built from source. | Run | fps at 6–8k draws | median frame | `ready` per frame | lock wait | calls | |---|---|---|---|---|---| | ray tracing off | 15.5 | 64.9 ms | 0.1 ms | 0.002 ms | 15 | | `VICTORY_BVH_BUILDER=1` | 10.4 | 85.3 ms | 15.6–21.8 ms | 3.0–4.1 ms | 281–379 | | `VICTORY_BVH_BUILDER=1` (next run) | — | — | 23.6 ms | 6.8 ms | 298 | So on this PC roughly 15–24 ms of the ray tracing frame is spent in `memory::ready`, and 3–7 ms of that is waiting for the memory lock. The two clock reads per call are not a visible cost at a few hundred calls a frame. The runs were made on my test branch (main `63b902f` plus local off-by-default switches) carrying this same commit; this PR is that commit alone, rebased on main `923e38c`. ## Tests - New: `memory::tests::timings_are_taken_once` - `cargo test --release -p victory-gpu --lib` on this branch: 551 passed, 0 failed, 43 ignored - One earlier run of the suite had `watch::tests::what_is_put_in_beside_the_guards_is_told_at_every_view` fail once; it then passed three times alone and in the next full run. This PR does not touch `watch.rs`. Plain main `923e38c` passed twice (550 passed) in my runs, so I could not reproduce it there. ## Checked for overlap - [x] I searched the open pull requests for the files this touches and for timings on this log line. No open PR adds timings to it. Related (they change behaviour on the same path, this one only measures it): #971, #1062, #1046. - `cargo test` passed for the crate it touches: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!1468
No description provided.