FEX-Emu / FEX-Emu/FEX

Code Cache Directory Structure

Open
#5,116 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
8k
Forks
351
Avg merge
12h 31m
Merged PRs (30d)
102

Description

Was thinking through how cache could be structured on ARM64EC and came up with something along the lines of the following:
- `%LOCALAPPDATA%/caches/RDR2.exe-7821398321/{RDR2.exe-7821398321,ntdll.dll-8732832,kernel32.dll-6832732872,metadata}`
- `%LOCALAPPDATA%/codemaps/{RDR2.exe-7821398321,SetupInst.exe-32188932}/{ntdll.dll-8732832,RDR2.exe-7821398321 SetupInst.exe-32188932}`
FEX records codemaps to `%LOCALAPPDATA%/codemaps/pending/{rand()}` 

On startup: Parse and split pending codemaps, build index from filepath to fileid, purge all deleted or old codemaps by checking fileid for each on-disk file. For every main exe codemap folder,  read metadata for cache folder, if settings dont match regen all else only regen ones that don't exist (e.g. deleted due to update) or have some threshold of missing rip entries over the codemap

Also additionally need to know when to regenerate if codemaps have expanded, not sure how this is done for Linux, but some threshold in the number of entrypoints seems reasonable

Contributor guide

Open the contributing guide

Research direction

The issue names no source files, tests, or entry points. Start by locating existing code-cache and codemap startup handling, then compare Linux behavior; done means an agreed ARM64EC directory layout plus rules for indexing, purging, and regeneration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.