Diagnostics: trace a DirectStorage request from submission to decoder outcome #1178
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1178"
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?
Imported from Marvisak/VIctory. Originally posted by Razdva122 on 2026-11-24T16:21:10Z.
For #1063, this adds an opt-in DirectStorage request trace. Each enqueue receives an ID that follows the request through admission, file reads and worker completion. The trace records input and destination sizes, decoder outcome, and bytes written or the failure code. The five-second throughput counters also use actual output bytes. Tests cover identical concurrent submissions, short successful output, and insufficient capacity.
On an earlier revision, the reporter traced 9,819 enqueues on a GTX 1660 SUPER. None carried 46,586 as a size, and 5,651 requests completed with 65,536 bytes written. The per-size stack capture answered its original question, so this revision removes the filter and the loader API added solely for it. The general trace remains available for other streaming reports. Reporter’s results
The README now has one row for the trace target. The diagnostic build command, PowerShell invocation and fields to compare are in the issue. Reproduction instructions
AI-assisted with Codex.
Windows CI passed both workspace Clippy configurations, the full workspace suite and the diagnostics-mode DirectStorage tests at
40dac06. Windows job · Download the Windows x64 diagnostic buildImported from Marvisak/VIctory. Originally posted by roon9e on 2026-11-24T17:51:32Z.
Ran the #1178 diagnostics on a reporting-class machine — the 46,586 value does not reach VIctory's DirectStorage boundary. No request matches the filter.
Setup: Windows 11, GTX 1660 SUPER 6 GB, own 1.0.2.1 copy (SHA-256
e95020b2…), Xbox Series build,win-x64,--profile diag --features diagnosticsat9b8949f, run without the localint3workaround (the stop is the raw0x80000003attitle+0x1330a44).VICTORY_LOG=info,victory_dstorage=trace,VICTORY_DSTORAGE_CALLER_SIZE=46586.Result:
source_size,destination_size,intermediate_sizeorwritten. The literal46586occurs in the log only as a substring of an offset (…4658672), never a size. The size filter therefore appended no caller stack to any request (the onlycaller=lines are the unrelateddevice slot 0x218/0x1c8warnings).options=0x1, e.g.source_size≈44k → destination_size=65536,read=source_size hr=0,completed written=65536) or raw (0x0). VIctory's side of the pair — 65,536 — is exactly what it decodes and completes.bcpack=0in every read), so the texture/BС decode is not a DirectStorage request here.So the 64 KiB/46,586 pair you were tracking does not reach VIctory's DirectStorage API as a request shape. At the same stop, reading the faulting thread's stream state directly shows where the pair actually lives:
vt[0x3f0](0x28ce0a0) is an adjustor thunk to<title>+0x28ce1b0, which searches the provider's own registry for the 64-bit interface key and thentitle+0x144db65b0reads a per-codec entry (title+0x144db6600; a0xffff/0xffentry = "absent") → returns 0 →test al,al / je → int3at0x1330a44. The provider and its registry are title code over title data (vtable in the title's.rdata), and the codec id there is0x70817.The trace is still the right instrument — it cleanly confirms VIctory's boundary is healthy and that the size pair is title-internal. What would pin it next, if useful: the same trace keyed on the codec id (
0x70817) rather than a size, or on requests whose output the title later re-reads and rejects; and a snapshot of the provider registry ([prov+0x28]→+0x20key table,+0x28/+0x38codec tables) taken while the thread is suspended. If that registry is expected to be filled from a device call, note thatdeviceslots0x218/0x1c8are currentlyE_NOTIMPL(caller="+0x24800db"/"+0x247757e", the+0x2478440bring-up group) — possible registration steps, though they also fire in every menu run.AI-assisted; run on my machine, no game data quoted.
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:00:42Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
9b8949f:cargo test -p victory-hle -p victory-loaderpasses, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:18:00Z.
Automated triage for the maintainers.
This pull request no longer merges cleanly into
main(conflicts incrates/victory-hle/src/modules/dstorage.rs). It will be reviewed once it is rebased onto the currentmain. The earlier verdict (merge-candidate) was for an older state ofmain.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by Razdva122 on 2026-11-25T06:55:44Z.
@Marvisak, could you re-review
f475df1and update thetriage: needs worklabel if the revised scope addresses your feedback?The reporter found no request carrying 46,586 as a size across 9,819 enqueues. I removed the size filter, the caller-stack capture and its loader API. The general request ID and actual bytes written remain available. The README now has one row for the trace target, and the reproduction procedure is in #1063.
Both Clippy configurations, the workspace suite and the diagnostics-mode DirectStorage tests passed on Windows. Changes since triage · Windows CI
upstream-sync referenced this pull request2026-11-25 10:07:54 +00:00
Imported from Marvisak/VIctory. Originally posted by Razdva122 on 2026-11-26T12:28:36Z.
Could you re-review the DirectStorage trace at
40dac06and refresh the rebase label? The branch now merges cleanly withmainat63bcca4and keeps the upstream request-admission changes. Both Clippy configurations, the full workspace suite and the diagnostics-mode DirectStorage tests passed on Windows. The diagnostic build in the PR description has also been rebuilt at this commit. Windows verificationImported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-27T06:55:29Z.
Independent CPU-only verification of PR #1178 (
DirectStorage trace: record completed bytes and distinguish short zlib from overflow).CARGO_TARGET_DIR(D:\Victory-Contrib\target-1178-watch),CARGO_BUILD_JOBS=2.40dac069cbf5a9be222ee18b66152188d6747200, merge base63bcca43c6a00a758510398fa43096ce7e4f7df0.cargo test --locked -p victory-hle --lib -- modules::dstorage::tests::records_completed_bytes_and_distinguishes_short_zlib_from_overflow --exact --test-threads=1 --quiet->1 passed; 0 failed; 152 filtered.git grep -Ffor the new test name on63bcca4returned no hits (test absent on base).git diff --check 63bcca4 HEADexit 0 (clean).Imported from Marvisak/VIctory. Originally posted by Razdva122 on 2026-11-28T06:37:30Z.
@Marvisak, could you remove
triage: needs rebasefrom this PR? GitHub still reports that40dac06merges cleanly intomainat63bcca4. Since the previous review request, an independent tester has also reproduced the completed-byte and short-zlib regression test on Windows at this exact commit. Tester's report · Workspace CIView 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.