Repository navigation
Benchmark: frame stall diagnostics, cooling gate and presentation timing - #315
Conversation
|
Thanks for this! It now conflicts with main (exec.c, device.c, textures.c, async.c changed with the growable caches and the pipeline limit). Could you rebase it? I'd also like to understand where third_party/licenses/SavageWindRecomp.txt comes from (which code it covers), and to check that the counters cost nothing with the benchmark off. |
8ec0867 to
674c8b0
Compare
|
Rebased onto
Release ARM64 shows flag loads and branches around the diagnostic updates. Timed paths such as file reads and texture uploads also check the saved start timestamp on exit. With I reran ABBAAB on the SM-X730 against |
|
Thanks for the answers, sorry for the delay. The licence and the cost data settle it: Main moved again, so there's one small conflict now: |
674c8b0 to
d928ccc
Compare
…30 A/B + clock check, and 11-scene audit [skip ci]
|
Thanks for the review — I have rebased the PR branch (
|
|
Thanks, the rebase is right: main's fences path is kept and its waits counted as GPU wait, and the includes are below the headers. Merging. |
…device Replaces 4 poorly framed/obstructed or redundant views in the earlier set with visually audited, shrine-free MainField scenes (Korok Plaza, South Akkala foliage, Faron jungle, Zora Plaza rain, Hateno Dye Shop interior, and unobstructed Lake Hylia pier) while retaining 0.0 drift and <= 0.52 u height delta across 24/24 measured 45s windows on SM-X730 (Mali-G925, v0.4.5-beta + mamcjr#315). Caveats and methodology limits are recorded in tools/benchmark-scenes-extended.md.
…mamcjr#436/mamcjr#475 updated [skip ci]
Part of #214; follows #278.
What it does
Adds per-frame counters for pipeline compilation/waits, GPU waits, texture uploads/BC/ASTC decoding and file reads, with a likely cause for each period above the 30 fps budget. Loading and warm-up remain in
frames.csv;report.jsonsummarizes the measurement window. Measurements can overlap; this is not an exclusive breakdown.Optional cooling waits until Android thermal status is at or below
thermal_max, after title appears, before each scene/repeat.thermal_wait_sbounds the wait; unavailable status or timeout givesharness_error. Headroom is budget minus max(CPU,GPU), with unknown GPU samples left missing. Game periods and actual presentation metrics are separate. Presentation usesVK_GOOGLE_display_timing, retains early feedback in synchronous rendering and counts missing feedback.How to turn it on
Use the same scene file and launch intent as #278; optionally add:
Reports go to
<scene file>.out/(report format 2). Without the variable the new diagnostic counters, clocks and trace collection are disabled.How it was checked
SM-X730, Mali-G925 (r49p1), Android 16, BOTW 1.9.0, Recompiled, 120 Hz, on USB. Final clean commit
346eaea: three scenes (plateau, Hateno lab/village), two repeats, 45 s windows: 6/6ok, 1351 frames each, 30.00 fps, no game period over 50 ms. Game p99 33.695-33.927 ms; headroom p50 6.039-6.502 ms. Presentation p99 33.446-41.706 ms, no missing feedback or presentation period over 50 ms. CSV-to-JSON recomputation passes.An earlier attempt stalled after two windows while waiting for a guest thread during reboot; a fresh full retry passed. Cause of that reboot stall is unknown. There was no timeout; follow-up commit
8ec0867adds a 60-second watchdog from the scene reboot request until the old guest threads stop, before the next game boot/load; it writesharness_erroratrebootand exits (forced-wait test passed; normal short run 2/2ok).One empty-cache lab boot on the same commit: 1509 completed builds; 18 periods over 50 ms attributed to pipeline waits, excluding the first incomplete interval. Example from
frames.csv, frame 494 during arrival (outside the window):317 builds completed in that interval (3838.833 ms of overlapping worker time); likely cause
pipeline_wait. Unknown GPU busy/headroom stays empty. After warm-up: 30.00 fps, no game period over 50 ms.Flag off vs stock v0.3.2-beta: ABBAAB, three 100 s boots each, same scene, last 900 frames. Median of per-run CPU p50: stock 19.430 ms, benchmark 19.180 ms (-1.29%); within-version ranges 1.130/0.560 ms. The difference is smaller than both spreads: no stable overhead detected, not proof of zero cost. This series used 60813bb; 346eaea adds the title/feedback fixes. No benchmark logs or reports without the flag.
Cooling was separately checked with a temporary Android status override: waited 60.519 s at title, status 1 to 0, then loaded at 0. Sync renderer (
LARECOMP_VK_ASYNC=0) had 0 missing feedback in 118 window frames; ordinary mode 0 in 151. Android host regression tests and APK build pass. Source save/settings/cache hashes unchanged; original APK restored after scratch-only runs.The relaxed-atomic counters and largest-stall heuristic are adapted from SavageWindRecomp, MIT. Copyright notices and full permission text are retained in
third_party/licenses/SavageWindRecomp.txt; measurement limits are indocs/BENCHMARK.md.Merge Danger
Door: two-way
Revert removes these additions. No save format, settings format or game-code changes.
Blast Radius: small
Without the benchmark flag, the added hooks are bool checks with no diagnostic collection or report writes. With it, reports use format 2 and the reboot watchdog can terminate a stalled run; scratch-save handling and game-memory edits remain as in #278. A run updates its shader cache, like a normal session.