Skip to content

README: the switches for a bug report's diagnostics - #2313

Open
gefydev wants to merge 2 commits into
xcl-dev:mainfrom
gefydev:readme-diagnostics-switches
Open

gefydev wants to merge 2 commits into
xcl-dev:mainfrom
gefydev:readme-diagnostics-switches

Conversation

@gefydev

@gefydev gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Seven switches that bug reports and issue threads use to see what a title is doing are read by the runtime and are not in the README. Docs only. Part of the "document what a user sets" gap; the xcl.toml keys are #2190's and are not touched here.

What is in it

  • README.md: a "Diagnostics for a bug report" entry in the "Switches, caches, logs and the files XCL writes" block, with XCL_RUN_SECONDS, XCL_ACTIVITY, XCL_THREAD_DUMP_AT, XCL_TRACE_FAULTS, XCL_TRACE_MEM, XCL_TRACE_IMPORTS and XCL_D3D12_TRACE. Each line gives what lands in xcl.log and the values the code accepts, read from host.rs, eh.rs, hle/kernelx.rs, resolver.rs and hle/d3d12x/real.rs.

Tested

  • Docs only: no code changed. Every statement was checked against the code that reads the variable (the files above), including the accepted values and the limits (the first 32 access violations, the first 60 allocations of 64 KiB or more).
  • Searched the README and docs/ for each name first: none of the seven was there.

Not tested

AI use

  • Claude Code, Claude Sonnet 5.5: read the code, wrote the entries and this description.

XCL_RUN_SECONDS, XCL_ACTIVITY, XCL_THREAD_DUMP_AT, XCL_TRACE_FAULTS, XCL_TRACE_MEM,
XCL_TRACE_IMPORTS and XCL_D3D12_TRACE are read by the runtime and used in bug
reports and in the issue threads, and none of them was in the README. Each entry
says what lands in xcl.log and what the accepted values are, as read from the code.
@oni-swr

oni-swr commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Docs review of #2313 at head 7817eb17eba0ce921d78e60b862c2ebe49a71185, against origin/main afc5ee86ae3a9521c9f15d96505cd73fe72f2191 (PR based on 1a0bbe3; merges into current main cleanly; README.md on main has none of these variables yet).

Checked against the source (all match unless noted): XCL_RUN_SECONDS (host.rs: whole-number u64, anything else ignored), XCL_ACTIVITY (any value, even 0, turns it on; 2 s activity (2 s) line plus memory: line), XCL_THREAD_DUMP_AT (comma list of seconds), XCL_TRACE_FAULTS (any value; first 32 access violations; read/write/execute, address, rax/rcx/rdx/r8, stack callers; logged from the exception handler), XCL_TRACE_MEM (1 or unset-like values trace the first 60 allocations of 64 KiB or more, n > 1 the first n), XCL_D3D12_TRACE (any value, logs interface and method), XCL_TRACE_IMPORTS word semantics (1/hle, all, prefix include, - exclude; a list with no include word means hle).

One inaccuracy

  • XCL_TRACE_IMPORTS example hle,-kernelx!GetTickCount: the filter compares each word as a prefix of the lower-cased <dll key>!<Function>, and dll_key keeps the extension (kernelx.dll!gettickcount). -kernelx!GetTickCount is therefore not a prefix of anything and excludes nothing; -kernelx.dll!GetTickCount would. (gameinput works because it is a prefix of gameinput.dll!….) The same example is in the source comment in resolver.rs and in HANDOFF.md, so it is not this PR's invention, but the README should say dll.dll!Function or use kernelx.dll! in the example. I read this from resolver.rs and util::dll_key; I did not run it.

Minor

  • XCL_TRACE_MEM with any value (even 0) also turns on the UMA allocation trace in gpu/uma.rs, and XCL_TRACE_MEM=0 still logs 60 allocations. The README text is correct for 1 and n; you may want "any value turns it on" for consistency with the others.
  • XCL_RUN_SECONDS: "GPU drained" is what the code comment says the end path does (end_title); I did not run it.

Overlap

Not tested

  • Nothing was run: this is a docs-only diff checked by reading the source on origin/main. The full workspace suite, GPU tests and scripts/smoke.ps1 / any title run were not run either.

AI use

  • Review written by Claude Code (Claude Sonnet 5.5). I read the full diff and the code each statement refers to; nothing was changed or pushed.

…MEM also traces XCL's own windows

The review of xcl-dev#2313 found two inexact lines. The import trace compares a word with the
lower-cased "<dll file name>!<Function>", extension included, so the example's
`-kernelx!GetTickCount` excluded nothing and is now `-kernelx.dll!GetTickCount`. And
XCL_TRACE_MEM is read with var_os in gpu/uma.rs as well, where any value also logs XCL's own
allocations of 1 MB or more in the committed window and the ones that fail.
@gefydev

gefydev commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

@oni-swr thank you for the review of #2313; both points are right, and fixed in dbd11b9.

AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.

@throny throny added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants