feat(queue): VICTORY_QUEUE_STATS counts the title's queue work by kind, and stats: lane_stood tells what the submitting thread stood at (off by default) #640
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!640
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-640"
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?
@Raptorbk45 on GitHub · 2026-12-05 22:37 UTC · original
Raptorbk45:feat/queue-stats→main· +536 −5 · 10 files · 1 commits · openA diagnostic, off by default (
VICTORY_QUEUE_STATS=1;2adds a per-part trace every 512th frame):queue stats per frame: by the title's queue kind (direct, compute, copy, other) submissions, lists, joined parts, value waits, signals, queue waits, presents, page mappings, draws, dispatches and translated calls a frame; which kind's work each value wait waits for; some host passes recorded inside compute lists.stats: lane_stood: ms a frame the submitting thread (the lane) stood with nothing to run, by what its oldest entry waited for (fence_ms,value_ms,lists_ms,other_ms), the three fences it stood at longest (set by the title from the CPU or behind a queue's work), and its working time by job (worked_send_ms,worked_map_ms,worked_present_ms,worked_other_ms; their sum is thesenderline'sbusy_ms).VICTORY_RT_STAMPS=1 VICTORY_PASS_SAMPLE=1(diagnostics build): the card's time by the title list's kind.We used these lines to find what a slow streaming frame is made of on our machine (the lane's page mappings and its stands behind the frame's texture pass, see #636). With the switch off every entry point returns after one cached
OnceLockread (one per draw/dispatch, one per submission, one per fence signal from the CPU).How it was checked
Run after the final edit, on Linux (CachyOS), against
mainat8c4e6633:./build.sh check(release, MSVC target): passes; the one warning (room_latelynever used,resource.rs) is already onmaincargo xtask policy: passesPROFILE=diag ./build.sh check(thertstampspart is diagnostics-only): passesNot run: the game, on this branch. The lines were used for days on our fork, where this code comes from (adapted to current
list.rs/thin.rs).Branch head:
f7772264.No unit test: the counters are fed from the queue, list and fence paths that need a running title. Output unchanged with the switch off (every new line is behind
level() != 0).Checks
docs/DIAGNOSTICS.mdlist.rs/queue.rsbehind diagnostics; it touchescount_draw/count_dispatchwhere this adds one call each, so whichever lands second needs a one-line rebase. Otherwise independent.cargo xtask policyView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.