mirror of
https://github.com/ARMSX2/ARMSX3.git
synced 2026-08-24 16:58:52 -07:00
The range-window version reset on every excursion, and its own report made that look like success. widest_range=0x0 does not mean an identical cia -- it means the entry had just been reset, so lo==hi. I read it the other way and concluded the threshold was fine. The thread mostly sits in a small loop (one sample caught it inside 0x500) and occasionally wanders far enough -- a helper, a syscall handler -- to blow any fixed window. So every all-or-nothing scheme measured nothing: hard reset on an out-of-range sample threw away all the evidence collected before it, every time. Count how often each thread is found at the same cia and decay by one on a miss instead. An occasional excursion now costs a point rather than the whole history, so a thread parked at one address 90% of the time still accumulates, while a thread genuinely making progress still falls to zero. Threads parked in a syscall are skipped, never counted against, so idle still cannot look like spin. The state line reports the best count and the address it is stuck at, so a miss says how close it got and where.