summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-03-12 16:48:43 -0400
committerGravatar Fernando Sahmkow2020-06-27 11:35:48 -0400
commit7020d498c5aef7c1180bfc57031cdd7fbfecdf0f (patch)
treef2508e39a02966cdd4d9acda1e14ed93cdc150cd /src/core/hle/kernel/svc.cpp
parentGeneral: Fix Stop function (diff)
downloadyuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.tar.gz
yuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.tar.xz
yuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.zip
General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index d3d4e7bf9..9b9f9402e 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -2454,10 +2454,10 @@ static const FunctionDef* GetSVCInfo64(u32 func_num) {
2454 return &SVC_Table_64[func_num]; 2454 return &SVC_Table_64[func_num];
2455} 2455}
2456 2456
2457MICROPROFILE_DEFINE(Kernel_SVC, "Kernel", "SVC", MP_RGB(70, 200, 70));
2458
2459void Call(Core::System& system, u32 immediate) { 2457void Call(Core::System& system, u32 immediate) {
2460 MICROPROFILE_SCOPE(Kernel_SVC); 2458 system.ExitDynarmicProfile();
2459 auto& kernel = system.Kernel();
2460 kernel.EnterSVCProfile();
2461 2461
2462 auto* thread = system.CurrentScheduler().GetCurrentThread(); 2462 auto* thread = system.CurrentScheduler().GetCurrentThread();
2463 thread->SetContinuousOnSVC(true); 2463 thread->SetContinuousOnSVC(true);
@@ -2474,10 +2474,14 @@ void Call(Core::System& system, u32 immediate) {
2474 LOG_CRITICAL(Kernel_SVC, "Unknown SVC function 0x{:X}", immediate); 2474 LOG_CRITICAL(Kernel_SVC, "Unknown SVC function 0x{:X}", immediate);
2475 } 2475 }
2476 2476
2477 kernel.ExitSVCProfile();
2478
2477 if (!thread->IsContinuousOnSVC()) { 2479 if (!thread->IsContinuousOnSVC()) {
2478 auto* host_context = thread->GetHostContext().get(); 2480 auto* host_context = thread->GetHostContext().get();
2479 host_context->Rewind(); 2481 host_context->Rewind();
2480 } 2482 }
2483
2484 system.EnterDynarmicProfile();
2481} 2485}
2482 2486
2483} // namespace Kernel::Svc 2487} // namespace Kernel::Svc