Corpus-wide A/B determinism sweep (148 unique cart images + 6 CD
spot-checks, dsp_idle_ab + gpu_idle_ab, 1800 measured frames + 300
warmup, savestate hash every 100 frames): every run byte-identical
off-vs-on, zero divergences. 71 cart images cleared the >10%
interpreted-opcode-reduction bar on at least one RISC processor.
Add virtualjaguar_risc_idle_skip=enabled titledb rows for the swept
retail images that met both bars: 31 new rows plus the pair added to
8 existing rows (AvP, Air Cars, Doom + EX aliases, Hover Strike,
I-War, Kasumi Ninja, Missile Command 3D, Tempest 2000). Global
default stays disabled; rows only apply when the user hasn't
explicitly changed the option (existing get_variable_pertitle
convention). Full sweep table + row policy in
docs/perf-audit/idle-skip-corpus-2026-08.md.
Closes#707
* test(tools): backtrace-ring RISC PC histogram + per-frame cost probe
Two headless attribution tools for the jr-dominated RISC interpreter
profile (GPU ~33% / DSP ~28% of host samples on Missile Command 3D):
- risc_backtrace_histogram drains the vjtrace GPU/DSP PC-history rings
(vjtrace_backtrace, last 1024 PCs/processor) after every frame, so the
histogram covers in-frame execution rather than the parked frame-end
PC the existing risc_pc_histogram samples. Disassembles each top PC
from a first-sighting code snapshot (MC3D overlays GPU kernels, so
code read at exit can be a different program) and records frame-end
parked-PC register snapshots, which resolve what address a spin loop
is polling.
- frame_cost_probe emits a per-frame CSV of wall ms + work counts
(GPU/DSP interpreted-opcode deltas, DSP idle-skip savings, vjtrace
IRQ/OP/blitter event counters) plus a --top N report of the most
expensive frames against the median, to attribute frame-time spikes.
Both require a TEST_EXPORTS=1 core and exit loudly otherwise; binaries
gitignored like the other on-demand tools (risc_pc_histogram's binary
was missing from the list -- added).
* docs(perf): MC3D stall attribution -- one GPU semaphore poll is 67% of GPU interpretation
Findings from the two new tools on Missile Command 3D (attract, 900
warmup, 6000 frames), cross-checked on yarc and jagniccc: the GPU burns
66.8% of its interpreted instructions polling main-RAM word $9704 (68K
scene semaphore, writer pc $9A18); the DSP burns 57.4% in the Atari
sound driver's I2S tick poll, which the shipped-but-default-off DSP
idle-skip already eliminates (-61.5% interpreted opcodes measured); the
>16ms spike frames do the SAME emulated work as median frames (all
count columns flat, slow frames cluster in adjacent runs) -- the spikes
are host-side, so the lever is lowering the constant spin baseline.
Ranked candidates end the doc; GPU idle-skip port is #1.
Research pass for the slow ARM targets (RPi, iOS/tvOS, Android handhelds):
- perf-audit/simd-neon-arm64.md: six delegable SIMD/ARM64 tasks (T1-T6)
with code samples, guards, test gates, and codegen probe results
(GET32 macro compiles to 4x byte loads, no rev; bswap form is ldr+rev;
BGEN clear already auto-vectorizes at -O3).
- perf-audit/arm-chip-tuning.md: verified per-chip reference (Apple A/M
floors and -mcpu, Snapdragon/Kryo, generic arm64, SVE verdict, armv7
NEON portability list, feature-detection matrix). All settings changes
documented as requires-approval, none applied. Notably: ios/tvos
builds pass no -mcpu, so they run at an A7 baseline without CRC32/LSE.
- perf-audit/hotpath-followups-2026-08.md: seven non-SIMD findings
(unused GET_CURRENT_SOFTWARE_FRAMEBUFFER, 128 KB memcpy per Memory
Track write, serialize slack memset under rewind, second per-frame
clock_gettime, LOG_DBG NDEBUG gate, CDDA-DIAG residue, fast-forward
audio skip) plus a verified-clean list so nobody re-hunts.
Documentation only; no emulator or build changes.
Audit of why RPi 4 / A10X struggle: host profiles + frame-end RISC PC sampling
show the DSP (and GPU) interpreters burning their full cycle budget inside
2-5 instruction idle/poll loops (Iron Soldier 99.7%, Doom 90%, AvP 74% of
frame-end DSP PCs), so a cycle-exact idle-loop fast-forward is the single
biggest win and needs no JIT. Also: ELF builds lack -fvisibility=hidden /
-fno-semantic-interposition / LTO (GOT per global in the hot loop), Android.mk
inherits no opt flags, fast blitter does 3-6 JaguarRead*/Write* dispatch
calls per pixel, GPUReadLong splits DRAM longs, DSP sh/sha are 32-iteration
loops, event scheduler scans 4x32 slots per event, 68K hook chain costs 3x
the 68K interpreter, AvP titledb 2x+true-colour costs ~30% of its frame.
docs/perf-audit-2026-08.md is the prioritized, delegatable task list (P1-P9)
with acceptance gates; docs/perf-audit/*.md are the raw sub-agent reports;
test/tools/risc_pc_histogram.c is the frame-end PC sampler used for the
evidence (TEST_EXPORTS build).
Co-Authored-By: Claude Fable 5 <[email protected]>