diff --git a/Source/Tools/CodeSizeValidation/Main.cpp b/Source/Tools/CodeSizeValidation/Main.cpp index 1562c19ed..07380659d 100644 --- a/Source/Tools/CodeSizeValidation/Main.cpp +++ b/Source/Tools/CodeSizeValidation/Main.cpp @@ -52,8 +52,8 @@ public: { auto CodeInvalidationlk = FEXCore::GuardSignalDeferringSection(CTX->GetCodeInvalidationMutex(), Thread); - FEXCore::Context::InvalidatedEntryAccumulator Accumulator; - CTX->InvalidateGuestCodeRange(Thread, Accumulator, reinterpret_cast(CodeStart), MAX_CODE_SIZE); + CTX->InvalidateCodeBuffersCodeRange(reinterpret_cast(CodeStart), MAX_CODE_SIZE); + CTX->InvalidateThreadCachedCodeRange(Thread, reinterpret_cast(CodeStart), MAX_CODE_SIZE); } ClearStats(); diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/ThreadManager.h b/Source/Tools/LinuxEmulation/LinuxSyscalls/ThreadManager.h index e19f43224..541a07cc7 100644 --- a/Source/Tools/LinuxEmulation/LinuxSyscalls/ThreadManager.h +++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/ThreadManager.h @@ -208,10 +208,9 @@ public: // Thread object isn't valid very early in frontend's initialization. // To be more optimal the frontend should provide this code with a valid Thread object earlier. auto CodeInvalidationlk = GuardSignalDeferringSectionWithFallback(CTX->GetCodeInvalidationMutex(), CallingThread); - FEXCore::Context::InvalidatedEntryAccumulator Accumulator; - + CTX->InvalidateCodeBuffersCodeRange(Start, Length); for (auto& Thread : Threads) { - CTX->InvalidateGuestCodeRange(Thread->Thread, Accumulator, Start, Length); + CTX->InvalidateThreadCachedCodeRange(Thread->Thread, Start, Length); } } @@ -223,10 +222,9 @@ public: // Thread object isn't valid very early in frontend's initialization. // To be more optimal the frontend should provide this code with a valid Thread object earlier. auto CodeInvalidationlk = GuardSignalDeferringSectionWithFallback(CTX->GetCodeInvalidationMutex(), CallingThread); - FEXCore::Context::InvalidatedEntryAccumulator Accumulator; - + CTX->InvalidateCodeBuffersCodeRange(Start, Length); for (auto& Thread : Threads) { - CTX->InvalidateGuestCodeRange(Thread->Thread, Accumulator, Start, Length); + CTX->InvalidateThreadCachedCodeRange(Thread->Thread, Start, Length); } // Callback while holding the locks.