Title memory by address: per-frame timings on its log line (log only) #1468
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1468
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1468"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@tupacfan04 on GitHub · 2026-11-28 20:22 UTC · original
tupacfan04:pr/memory-by-address-timings→main· +97 −3 · 1 files · 1 commits · merged 2026-11-29 08:16 UTCWhat
Log only. The existing
title memory by address:line (about every ten seconds) keeps its text and gains a tail with per-frame timings:memory::ready, lock wait includedtry_lockfinds the lock held, thenlock()as beforeMemory::anotherpast its once-a-frame refusal,Memory::bring_up, and the deferred closure at submissionNumbers 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.
readyper frameVICTORY_BVH_BUILDER=1VICTORY_BVH_BUILDER=1(next run)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
63b902fplus local off-by-default switches) carrying this same commit; this PR is that commit alone, rebased on main923e38c.Tests
memory::tests::timings_are_taken_oncecargo test --release -p victory-gpu --libon this branch: 551 passed, 0 failed, 43 ignoredwatch::tests::what_is_put_in_beside_the_guards_is_told_at_every_viewfail once; it then passed three times alone and in the next full run. This PR does not touchwatch.rs. Plain main923e38cpassed twice (550 passed) in my runs, so I could not reproduce it there.Checked for overlap
cargo testpassed for the crate it touches: yes🤖 Generated with Claude Code
The "title memory by address: ..." line (memory.rs, every ten seconds or so) keeps its text as it was and ends with: ; timings per frame: {:.3} ms in ready over {:.0} calls, of it {:.3} ms waiting for the lock ({:.1} waits), {:.3} ms making arenas ({:.2} tried), {:.3} ms in bring-ups ({:.1}), {:.3} ms landing at submissions ({:.0}) All per frame averages over the frames since the last line: - ready: every call of memory::ready (one per draw/dispatch that reads or builds by address), lock wait included; - the lock wait: the clock is read only when MEMORY.try_lock() finds the lock held, then lock() as before (the same guard, poisoning handled as before); "waits" counts those calls; - making arenas: Memory::another past its once-a-frame refusal (the cheap early return is not timed); - bring-ups: Memory::bring_up (the refreshes of the directory and of every copy recorded into a list); - landing: the deferred closure at submission (its own lock wait and Memory::land). Numbers are kept in static atomics and swapped to zero when the line is written. No control flow changes. Tests: memory::tests::timings_are_taken_once (a timed call counts once, taking leaves zeros). cargo test --release -p victory-gpu --lib -- memory shadow:: watch:: resource:: : 134 passed, 0 failed, 5 ignored. Measured (RTX 5070 12 GB, i9-14900F, Series X 1440p, VICTORY_BVH_BUILDER=1): the line reads 15-24 ms per frame in ready over about 280-380 calls, 3-7 ms of it waiting for the lock; without the builder 0.1 ms over 15 calls. At a few hundred calls a frame the two clock reads are not a visible cost. Co-Authored-By: Claude Fable 5.2 <[email protected]>Title memory by address: per-frame timings on its log line (log only)to [pr-diagnostics] [memory] [NVIDIA] [RAYTRACING] Title memory by address: per-frame timings on its log line (log only)[pr-diagnostics] [memory] [NVIDIA] [RAYTRACING] Title memory by address: per-frame timings on its log line (log only)to Title memory by address: per-frame timings on its log line (log only)