mirror of
https://github.com/ARMSX2/ARMSX3.git
synced 2026-08-24 16:58:52 -07:00
Two corrections to the previous attempt, both measured rather than reasoned. Including _sys_lwmutex_lock broke it. That counter keeps climbing straight through the hang at a flat ~375 per 10s -- the idle loops take lightweight mutexes -- so the 'unchanged' test re-armed on every tick and the detector never fired. sys_mutex_lock alone froze outright, at 22. And 'exactly zero' only fits Xillia 2. Kane & Lynch collapsed from ~200,000 per 10s to ~300, which is just as dead and never reaches zero. So the test is now relative: remember the busiest rate this game has reached, decay it slowly, and call it a hang when the current rate stays under a fiftieth of that for 30 seconds. A title that has never been busy has no peak to fall from and cannot trip it; the 5000/s floor sits far below every busy rate measured (20,000+) and far above anything idle. The syscall code is resolved by name from g_ppu_syscall_table once, rather than hardcoded, so it cannot silently come to mean a different syscall. Also logs its own state every 10s -- rate, peak, quiet seconds, dumps taken. Five attempts at detecting this hang have now failed, every one of them silently, and each cost a reproduction to discover. The detector reporting what it sees is worth more than the detector being clever.