SaveState: Only rehash functions in code a load changed

Every load hashed all known functions again, for the replacement hooks:
2.4-6 ms, about half the load. Functions in module code the load left as
it was keep their hash, so only the rest is hashed now (0.5-1 ms). The
code is compared on every load for this, not only with a JIT.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-19 20:18:46 +02:00
1 parent a62aa69986
commit f45f4d5c85
5 files changed
+43 -8

No files matched your search

+3
View File
@@ -231,6 +231,9 @@ KernelObject *__KernelModuleObject();
void __KernelModuleDoState(PointerWrap &p);
// The code of the loaded modules, as (address, size).
std::vector<std::pair<u32, u32>> __KernelModuleCodeRanges();
// For the next savestate load: code it leaves as it was, as (address, size). Its functions aren't
// hashed again.
void __KernelModuleSetUnchangedCodeOnLoad(std::vector<std::pair<u32, u32>> unchanged);
void __KernelModuleShutdown();
class MIPSState;