Skip to content

Code Cache Directory Structure #5116

@bylaws

Description

@bylaws

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 <or> 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions