Commit Graph

15 Commits

Author SHA1 Message Date
4fe371f903 Merge pull request #2968 from aznohonza/tools/summary-end-names
tools/game_run_summary.py: name device lost and title breakpoint in the END words (GAME-RUN-SUMMARY-END-NAMES)
2026-12-02 00:34:35 +00:00
f483189624 game_run_summary: the caller-cgroup peak is a lifetime peak
Without a systemd scope the saved value is the caller cgroup's lifetime
peak, not the run's; the summary line says so now.

AI-assisted.
2026-12-01 23:52:29 +01:00
8642cbe542 game_run_summary: pair each skipped int3 with its own breakpoint
A trace can skip an assert and later stop on a real breakpoint. The global
`int3_skipped` veto hid the later one; each skip now consumes one preceding
`0x80000003` exception at the same recorded address, so only a breakpoint
the trace actually skipped stops naming the end. The test covers a later
breakpoint at another address and a repeat at the same one.

AI-assisted.
2026-12-01 23:41:19 +01:00
ddee96da7e game_run_summary: a skipped int3 is not the title breakpoint
`LEONIDA_SKIP_ASSERTS` records each stepped-over int3 as an exception and
`int3_skipped`, and `LEONIDA_UNIMPLEMENTED=stop` also exits 3, so the old
condition reported such a run as a title breakpoint. The trace's
`int3_skipped` event now vetoes the word, and the docstring says a device
loss and a skipped int3 both win over it.

AI-assisted.
2026-12-01 23:26:39 +01:00
2b32249727 game_run_summary: a 0X-prefixed exception code is the same code
The startup trace's exception-code filter accepted `0x` but not `0X`, so a
trace spelling the breakpoint `0X80000003` classified the exception as
`(other)` and the end fell back to the generic process exit. `_same_code`
already lowercased, so only the filter was strict. The test now covers all
three spellings; it fails on the old filter and passes with it.

AI-assisted.
2026-12-01 23:14:22 +01:00
ace83ae110 game_run_summary: say whose peak the line is, and make the v2 path guard bite
KelboLive's review of #2845: without a systemd scope the peak is the caller
cgroup's lifetime peak, so the one-line summary now says so, which keeps a
comparison table from reading it as the run's own.

The `[ -n "$cg_rel" ]` guard was untested: removing it still passed, because the
fake root had no memory.peak to pick up. The v1 test now has one at the root, so an
empty v2 path reads nothing and dropping the guard fails it (checked: mutation
gives 1 failure).

AI-assisted: yes
2026-12-01 17:56:00 +01:00
d9c470cd30 game_run_summary: record the run cgroup's memory peak 2026-12-01 08:41:52 +01:00
4edb90521b game_run_summary: keep the breakpoint when the guest also exited 3
A startup-trace exit event with code 3 no longer hides a title
breakpoint; a device loss still takes precedence when it is the only
explanation, because the breakpoint is its handler.

AI-assisted.
2026-12-01 07:36:57 +01:00
74e3be90c0 game_run_summary: let a guest exit win, and match any breakpoint code
A device-lost line written during teardown no longer renames a clean
guest exit or a time limit. The breakpoint check now looks at every
exception code, normalised for 0x and case, so a later teardown fault
does not hide it. The docstring says the [rt] lines are the C++ runtime's,
not the native Rust runtime's.

AI-assisted.
2026-12-01 07:35:45 +01:00
555a8f7a18 game_run_summary: name device lost and title breakpoint in the END words
The summary called a device loss and the title's own int3 both
"process exit 3, no exit event". Use the RUN block's END words: the
runtime's device-lost line becomes "device lost", and exit 3 whose last
exception is 0x80000003 becomes "title breakpoint".

AI-assisted.
2026-12-01 07:18:51 +01:00
4e1e864ca1 tests: a run that reached its limit says so with seconds at the limit (after #2028)
Takes over #1837: since #2028, main reports "time limit reached" only when
the run's seconds reach the limit, so the UTF-8 BOM case writes 60 s for a
60 s limit instead of 45; what it checks (both files parsed through the BOM)
is unchanged.

Co-authored-by: kirigayakazima <46666711+kirigayakazima@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 11:29:53 +01:00
ca71fd7f5c Merge remote-tracking branch 'origin/main' into reprise-1837 2026-11-30 11:29:46 +01:00
95ccdb19f5 Keep early process exits distinct from Wine run timeouts 2026-11-25 12:32:14 -06:00
e76cabc17a tools/game_run_summary: guard stdout encoding, BOM ints, OSError and RecursionError 2026-11-25 20:57:01 +08:00
597cf76623 TOOLS-WINE-GAME-RUN: scripts/run_game_wine.sh, one bounded game run under Wine
The launcher runs gta6rt.exe --run once under Wine on Linux, headless on a
private kwin_wayland --virtual --xwayland session (Xvfb has no DRI3, so RADV
cannot present there) or on the current display with --visible. Sound is off
(Wine's audio drivers disabled, Pulse/PipeWire/ALSA pointed at nothing,
LEONIDA_AUDIO=silent for the runtime's silent output endpoint), --device pins
the Vulkan device through MESA_VK_DEVICE_SELECT, and a hard time limit, a lock
and full teardown bound the run. Every path comes from arguments or the
environment.

tools/game_run_summary.py prints counts only: run time, end, exceptions by
code, D3D12 calls by outcome, presents, the top failing calls and the [rt]
lines by category with numbers masked. It never prints a log line.

Tests need no game, Wine or GPU: the script against stubs, the summary on
synthetic run folders. docs/linux_proton.md describes the script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 07:30:48 -05:00