Merge pull request #8462 from liamwhite/dynarmic-profile
core: centralize profile scope for Dynarmic
This commit is contained in:
commit
c9de5474bf
|
@ -107,6 +107,7 @@ void ARM_Interface::Run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, run the thread.
|
// Otherwise, run the thread.
|
||||||
|
system.EnterDynarmicProfile();
|
||||||
if (current_thread->GetStepState() == StepState::StepPending) {
|
if (current_thread->GetStepState() == StepState::StepPending) {
|
||||||
hr = StepJit();
|
hr = StepJit();
|
||||||
|
|
||||||
|
@ -116,6 +117,7 @@ void ARM_Interface::Run() {
|
||||||
} else {
|
} else {
|
||||||
hr = RunJit();
|
hr = RunJit();
|
||||||
}
|
}
|
||||||
|
system.ExitDynarmicProfile();
|
||||||
|
|
||||||
// Notify the debugger and go to sleep if a breakpoint was hit.
|
// Notify the debugger and go to sleep if a breakpoint was hit.
|
||||||
if (Has(hr, breakpoint)) {
|
if (Has(hr, breakpoint)) {
|
||||||
|
|
|
@ -113,12 +113,10 @@ void CpuManager::MultiCoreRunGuestLoop() {
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
auto* physical_core = &kernel.CurrentPhysicalCore();
|
auto* physical_core = &kernel.CurrentPhysicalCore();
|
||||||
system.EnterDynarmicProfile();
|
|
||||||
while (!physical_core->IsInterrupted()) {
|
while (!physical_core->IsInterrupted()) {
|
||||||
physical_core->Run();
|
physical_core->Run();
|
||||||
physical_core = &kernel.CurrentPhysicalCore();
|
physical_core = &kernel.CurrentPhysicalCore();
|
||||||
}
|
}
|
||||||
system.ExitDynarmicProfile();
|
|
||||||
{
|
{
|
||||||
Kernel::KScopedDisableDispatch dd(kernel);
|
Kernel::KScopedDisableDispatch dd(kernel);
|
||||||
physical_core->ArmInterface().ClearExclusiveState();
|
physical_core->ArmInterface().ClearExclusiveState();
|
||||||
|
@ -166,12 +164,10 @@ void CpuManager::SingleCoreRunGuestLoop() {
|
||||||
auto& kernel = system.Kernel();
|
auto& kernel = system.Kernel();
|
||||||
while (true) {
|
while (true) {
|
||||||
auto* physical_core = &kernel.CurrentPhysicalCore();
|
auto* physical_core = &kernel.CurrentPhysicalCore();
|
||||||
system.EnterDynarmicProfile();
|
|
||||||
if (!physical_core->IsInterrupted()) {
|
if (!physical_core->IsInterrupted()) {
|
||||||
physical_core->Run();
|
physical_core->Run();
|
||||||
physical_core = &kernel.CurrentPhysicalCore();
|
physical_core = &kernel.CurrentPhysicalCore();
|
||||||
}
|
}
|
||||||
system.ExitDynarmicProfile();
|
|
||||||
kernel.SetIsPhantomModeForSingleCore(true);
|
kernel.SetIsPhantomModeForSingleCore(true);
|
||||||
system.CoreTiming().Advance();
|
system.CoreTiming().Advance();
|
||||||
kernel.SetIsPhantomModeForSingleCore(false);
|
kernel.SetIsPhantomModeForSingleCore(false);
|
||||||
|
|
|
@ -2982,7 +2982,6 @@ static const FunctionDef* GetSVCInfo64(u32 func_num) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Call(Core::System& system, u32 immediate) {
|
void Call(Core::System& system, u32 immediate) {
|
||||||
system.ExitDynarmicProfile();
|
|
||||||
auto& kernel = system.Kernel();
|
auto& kernel = system.Kernel();
|
||||||
kernel.EnterSVCProfile();
|
kernel.EnterSVCProfile();
|
||||||
|
|
||||||
|
@ -3007,8 +3006,6 @@ void Call(Core::System& system, u32 immediate) {
|
||||||
auto* host_context = thread->GetHostContext().get();
|
auto* host_context = thread->GetHostContext().get();
|
||||||
host_context->Rewind();
|
host_context->Rewind();
|
||||||
}
|
}
|
||||||
|
|
||||||
system.EnterDynarmicProfile();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Kernel::Svc
|
} // namespace Kernel::Svc
|
||||||
|
|
Loading…
Reference in New Issue