Merge pull request #12620 from mitaclaw/jit-interface-cpu-thread-guard

JitInterface::ClearCache: Modernize With CPUThreadGuard
This commit is contained in:
Admiral H. Curtiss authored and GitHub committed 2024-03-22 04:17:33 +01:00
commit f814dc58b5
6 files changed
+52 -53

No files matched your search

+4 -4
View File
@@ -408,12 +408,12 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetProfiling
jboolean enable)
{
HostThreadLock guard;
Core::SetState(Core::State::Paused);
auto& jit_interface = Core::System::GetInstance().GetJitInterface();
jit_interface.ClearCache();
auto& system = Core::System::GetInstance();
auto& jit_interface = system.GetJitInterface();
const Core::CPUThreadGuard cpu_guard(system);
jit_interface.ClearCache(cpu_guard);
jit_interface.SetProfilingState(enable ? JitInterface::ProfilingState::Enabled :
JitInterface::ProfilingState::Disabled);
Core::SetState(Core::State::Running);
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteProfileResults(JNIEnv*,