mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 14:00:16 +02:00
Linux: Support new two-stage invalidation model
This commit is contained in:
1 parent
47619063c2
commit
eeee5b53ca
2 files changed
+6
-8
No files matched your search
@@ -52,8 +52,8 @@ public:
|
||||
|
||||
{
|
||||
auto CodeInvalidationlk = FEXCore::GuardSignalDeferringSection(CTX->GetCodeInvalidationMutex(), Thread);
|
||||
FEXCore::Context::InvalidatedEntryAccumulator Accumulator;
|
||||
CTX->InvalidateGuestCodeRange(Thread, Accumulator, reinterpret_cast<uint64_t>(CodeStart), MAX_CODE_SIZE);
|
||||
CTX->InvalidateCodeBuffersCodeRange(reinterpret_cast<uint64_t>(CodeStart), MAX_CODE_SIZE);
|
||||
CTX->InvalidateThreadCachedCodeRange(Thread, reinterpret_cast<uint64_t>(CodeStart), MAX_CODE_SIZE);
|
||||
}
|
||||
|
||||
ClearStats();
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user