diff options
author | Mai <mathew1800@gmail.com> | 2022-06-14 21:07:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-14 21:07:47 -0400 |
commit | c9de5474bfb7543a01337b73c33c4bf3b76e276e (patch) | |
tree | 7f9899bf3621fd4be5d7ef224a4c1f113aa2862e | |
parent | c6e7ca562ac4c8957d64f7d9161aa53ca43a96ff (diff) | |
parent | 20eab9fed9435ecf4d222cefc4487fc8a2f81fe3 (diff) |
Merge pull request #8462 from liamwhite/dynarmic-profile
core: centralize profile scope for Dynarmic
-rw-r--r-- | src/core/arm/arm_interface.cpp | 2 | ||||
-rw-r--r-- | src/core/cpu_manager.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 3 |
3 files changed, 2 insertions, 7 deletions
diff --git a/src/core/arm/arm_interface.cpp b/src/core/arm/arm_interface.cpp index 9b5a5ca576..9a285dfc60 100644 --- a/src/core/arm/arm_interface.cpp +++ b/src/core/arm/arm_interface.cpp @@ -107,6 +107,7 @@ void ARM_Interface::Run() { } // Otherwise, run the thread. + system.EnterDynarmicProfile(); if (current_thread->GetStepState() == StepState::StepPending) { hr = StepJit(); @@ -116,6 +117,7 @@ void ARM_Interface::Run() { } else { hr = RunJit(); } + system.ExitDynarmicProfile(); // Notify the debugger and go to sleep if a breakpoint was hit. if (Has(hr, breakpoint)) { diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp index b4718fbbe0..132fe5b60a 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp @@ -113,12 +113,10 @@ void CpuManager::MultiCoreRunGuestLoop() { while (true) { auto* physical_core = &kernel.CurrentPhysicalCore(); - system.EnterDynarmicProfile(); while (!physical_core->IsInterrupted()) { physical_core->Run(); physical_core = &kernel.CurrentPhysicalCore(); } - system.ExitDynarmicProfile(); { Kernel::KScopedDisableDispatch dd(kernel); physical_core->ArmInterface().ClearExclusiveState(); @@ -166,12 +164,10 @@ void CpuManager::SingleCoreRunGuestLoop() { auto& kernel = system.Kernel(); while (true) { auto* physical_core = &kernel.CurrentPhysicalCore(); - system.EnterDynarmicProfile(); if (!physical_core->IsInterrupted()) { physical_core->Run(); physical_core = &kernel.CurrentPhysicalCore(); } - system.ExitDynarmicProfile(); kernel.SetIsPhantomModeForSingleCore(true); system.CoreTiming().Advance(); kernel.SetIsPhantomModeForSingleCore(false); diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 584fa5b1c6..9956f2b514 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -2982,7 +2982,6 @@ static const FunctionDef* GetSVCInfo64(u32 func_num) { } void Call(Core::System& system, u32 immediate) { - system.ExitDynarmicProfile(); auto& kernel = system.Kernel(); kernel.EnterSVCProfile(); @@ -3007,8 +3006,6 @@ void Call(Core::System& system, u32 immediate) { auto* host_context = thread->GetHostContext().get(); host_context->Rewind(); } - - system.EnterDynarmicProfile(); } } // namespace Kernel::Svc |