startup: four runtime diagnostics missing in a long run (direct-draw refusal census, snapshot pool totals, clear census, memory SRV shape table) #3479
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#3479
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Leyukaka on GitHub · 2026-11-29 16:54 UTC · original
Part of #870.
One local run of the application (about 1,430 s, runtime at
36914379) left four questions the logs could not answer. Line numbers are onmainc4b8a41b. Counts only.note_draw_refusalreturns at once unlessX2W_PIPELINE_COLOURis on (src/startup_stubs/d3d12_draw.inl:2968-2974). The countersuntranslated_drawsandtranslation_missing(:240,:3793,:3966) carry no key and no reason.no translation for pipelinelines.PerReasonRefusalCensusat the not-drawn increment, independent of the debug switch, and report it with the other censuses.reserve_upload_ring,note_reservedskips the snapshot pool (src/startup_stubs/d3d12_xs_device.cpp:2778-2779), the refusal counter is ring-only (:2866), and the refusal line is logged 8 times (:2867-2870).list_clear_targetlogs the first 4 calls only (src/startup_stubs/d3d12_xs_device.cpp:4285-4288).max_shapes = 128(src/startup_stubs/memory_srv_census.h:91); later shapes only add to the "calls past the shape table" count (:111,:142).Each item will come as its own small PR with a test.
Not covered here: ExecuteIndirect refusal causes (#3407 / #3413) and the refused-SRV cache (#2782).
I'm working on this.
@Leyukaka on GitHub · 2026-11-29 17:21 UTC · original
Adding a fifth item, line numbers on
main26df1826:present_signature(src/startup_stubs/d3d12_xs_device.cpp:7540-7580) already samples the presented surface, but the sample only goes to the shared block (publish,src/startup_stubs/present_signature.h:121-129). The sampled RGBA is logged only under the red-producer diagnostic (:7560-7570).@Leyukaka on GitHub · 2026-11-29 17:37 UTC · original
Adding a sixth item, line numbers on
main26df1826:draw_lock(src/startup_stubs/d3d12_compute_dispatch.inl:796,:812), DXC compile included (:584-587); native graphics does the same fromdraw_translated(src/startup_stubs/d3d12_draw.inl:3116-3118,try_native_graphicsat:1296and:1314). Neither path records a duration.refuse_nativelogs the first 16 compute refusals only (d3d12_compute_dispatch.inl:486-488); later ones are counted nowhere by reason.draw_lock, and native compute refusals per reason beyond the 16 logged lines.draw_lockand adds no timing or counters. This item changes no locking; if #3469 merges first, the compute lock time is dropped and the compile times are taken on the worker.@Leyukaka on GitHub · 2026-11-29 17:44 UTC · original
Adding a seventh item, line numbers on
main1b8e2fee:prepare_direct_graphics(src/direct_compute_cache.cpp:594) looks up one companion per stage, first as a pinned container (:626-627), then in the reviewed interface catalog (:632-634), keyed by exact code digest and then by embedded ID (:279-281). The lookup is skipped when there is no cache directory or a stage is DXBC (:624). With nothing pinned, a catalog hit for one stage only is discarded (:636). A fixed pixel entry without companions then throwsfixed graphics entry requires matching stage interfaces(:700-702), the same text for every cause.:283). No change to what is accepted.@Leyukaka on GitHub · 2026-11-29 18:06 UTC · original
Adding an eighth item, line numbers on
main77d63db8:--trace-calls 1call is described at entry (tools/startup/debug_launch.py:711-712for the runtime module,:529for the movie player) and written when it returns (:763-765) with the time since launch and the result only; the thread id is known there (returns.add(ret, tid, ...),:761) but not printed. The exception line (:1055-1056) and thedebugger stopline (:1085) omit it too, whileLOG_AT(:659) and thread creation (:988) print it. The one time on a call line is taken at return, so the gap between two calls on a thread cannot be read from the log.tid=to traced-call, exception and stop lines, and on traced-call lines the time since the previous traced call on the same thread. No change to what is traced or to the hit limits (:524-525).debug_launch.py; this item will be based on it once it merges.@Leyukaka on GitHub · 2026-11-29 21:33 UTC · original
Adding a ninth item, line numbers on
mainff9dcef0:refuse_nativelogs the first 16 refusals of the process only (src/startup_stubs/d3d12_compute_dispatch.inl:486-488). The compute census (log_compute_census,:1381-1410) runs only on frames divisible by 300 (src/startup_stubs/d3d12_xs_device.cpp:8032-8039), lists only keys that reached the Dispatch recorder, and carries the first Dispatch refusal, not the native compile outcome. Nothing is written at exit.tools/startup/launch.py:314,tools/startup/debug_launch.py:1228), without takingdraw_lockat DLL detach. No change to what is translated.I'm working on this.