upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/tiny_game_exit_code_test.cpp
diff options
context:
space:
mode:
authorNotRexed <therealnothingfn@gmail.com>2026-11-28 06:01:58 -0500
committerNotRexed <therealnothingfn@gmail.com>2026-11-28 06:01:58 -0500
commit8361d0374fb49abef37784bb63d2044f74ba3e84 (patch)
tree6fae71bb0a24dde9b67ba81132bfd81af56ec230 /runtime/test/tiny_game_exit_code_test.cpp
parent9d4a7318d0fc60183a31376217a5cdb71fe31743 (diff)
A fault asks Windows about its one page before the region around it (LEONIDA_PAGE_ASK=0: the region, as before), and the faults are counted with their time
A title thread whose write faulted on a block that another thread opened first asks whether the page can be written by now (`writable`), and a read that met a change of mapping whether the view is back (`readable_view`). Both asked `VirtualQuery`, which answers for the whole run of pages around an address that are alike and walks to its end. They ask `QueryWorkingSetEx` about the one page now, and the region only where Windows does not have the page in memory. On by default: the answer is the same (unit test: a private page and a view's, read-write, read-only, never touched and only reserved; and the guard tests ask `writable` after every guard and opening), so nothing that is drawn can change, and `LEONIDA_AB` can name the switch. RTX 4060 Ti, Ryzen 5 7600X, Series X profile, 1440p, every start from the waterside save, the switch turned every 4 s inside one run: - its counter (a new line, "the title's faults per frame"): 210 to 216 questions a frame, 5.8 us each about a region and 1.2 us each about a page (1.25 -> 0.25 ms a frame of the title's threads' time), every one of them answered by the page; - the faults as a whole: 780 a frame looked at in 65.7 ms of all threads' time with regions (84.3 us each), 758 in 62.2 ms with the page first (82.1 us each). What a fault costs here is the wait for the guards' lock (540 waits, 75 ms a frame) and the change of protection, not the question; - the frame standing (a level fitted for each view of the idle camera, 97 phases): medians -0.20 ms (+-0.19), means +0.10 (+-0.20), of 77 ms: none; - the frame walking and turning (89 pairs of phases next to each other): means -0.24 ms (+-1.05), medians -0.40 (+-1.05), of 86 ms: none. After KyleS98/VIctory-Neo 0fb1e38 (VICTORY_PAGE_ASK), which measured 245 us a question and 15.5-17.3 -> 2.8-3.3 ms a frame of its title's threads: its views are of hundreds of megabytes. Here the launcher's sections of 16 MiB (LEONIDA_SECTION_MB) keep the regions short, so the question about one was cheap already; without that setting it was not measured. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/tiny_game_exit_code_test.cpp')
0 files changed, 0 insertions, 0 deletions