mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-04 13:07:32 +00:00
RaiseOn suspends the target, reads its context and, while it is in host code, resumes it and samples again after SwitchToThread. On a 16-core Ryzen 9 5950X (Windows 11 22H2) that resampled the writer of guest_raise_in_host_code about every 10 us before it could run: in the raise that hung, 4,989 samples over 50 ms all found it in ucrtbase, so the 50 ms host-code limit ran out and the handler was redirected into fwrite, where it deadlocked on the stream lock (the test timed out at 30 s on every run). In a passing raise the samples sat at one RIP for 14,695 of 14,703 samples and the raise took 145 ms. Spin for 20 us before each new host-code sample, so the target gets to leave host code. With that, guest_raise_in_host_code passes 5 of 5 runs, no raise is redirected in host code, and the longest raise is 0.46 to 0.53 ms. Other samples keep SwitchToThread. Co-Authored-By: Claude Opus 5.5 <[email protected]>