1
0
Fork 1
forked from suyu/suyu

core: centralize profile scope for Dynarmic

This commit is contained in:
Liam 2022-06-14 18:19:04 -04:00
parent c6e7ca562a
commit 20eab9fed9
3 changed files with 2 additions and 7 deletions

View file

@ -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)) {

View file

@ -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);

View file

@ -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