aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache/usage_tracker.h
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 09:10:10 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-30 09:13:52 -0400
commit34f81e052c37973a69aeec39e2f996b89c80e4ad (patch)
treec5cbd92fbac90759c6dd606817111f09eb2343a4 /src/video_core/buffer_cache/usage_tracker.h
parent6e7edd7462325ee18a0db6fdc29ff7698ac108cc (diff)
dynarmic: keep the x64 JIT's per-block tables compact
Each emulated core has its own JIT, and Mario Kart World runs six. After three minutes of its title screen and attract demo, their bookkeeping held ~1.65 GB besides ~470 MB of compiled code, mostly empty slots: - patch_information: four small_vectors of code pointers per linked block (232 bytes a slot), and Patch() added an entry for every block compiled, linked or not (~800 MB); - block_ranges: an interval map with a hash set per segment (~300 bytes a block, ~460 MB) to answer invalidations, which only come when code is unmapped or reprotected; - fastmem_patch_info: 48 bytes per fastmem access in a hash map (~340 MB). Patch locations are now offsets into the code space with the patch kind in the low two bits, two inline and the rest in a vector, and Patch() no longer creates entries. Block ranges are a flat list scanned on invalidation (also dropping the invalidated blocks' ranges, the old TODO). Fastmem patch information is a list sorted by code offset (code is emitted in address order, so inserts are appends) with 24-byte entries, looked up by binary search when an access faults. Mario Kart World, 180 s: resident private memory at 150 s 6195 -> 4777 MiB, peak commit 16.0 -> 14.4 GB; frames and frame times unchanged.
Diffstat (limited to 'src/video_core/buffer_cache/usage_tracker.h')
0 files changed, 0 insertions, 0 deletions