diff options
| author | 2020-04-12 19:25:53 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:36:10 -0400 | |
| commit | cdf900f1e3e8d51365d27b1139cc531a179eeb6e (patch) | |
| tree | b259f2ab20ae4dde2dc5782321fc7a948a013aea /src/core/core.cpp | |
| parent | General: Tune the priority of main emulation threads so they have higher prio... (diff) | |
| download | yuzu-cdf900f1e3e8d51365d27b1139cc531a179eeb6e.tar.gz yuzu-cdf900f1e3e8d51365d27b1139cc531a179eeb6e.tar.xz yuzu-cdf900f1e3e8d51365d27b1139cc531a179eeb6e.zip | |
Core: Split Microprofile Dynarmic timing per Core
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 3393c33eb..50656697f 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -51,7 +51,10 @@ | |||
| 51 | #include "video_core/renderer_base.h" | 51 | #include "video_core/renderer_base.h" |
| 52 | #include "video_core/video_core.h" | 52 | #include "video_core/video_core.h" |
| 53 | 53 | ||
| 54 | MICROPROFILE_DEFINE(ARM_Jit_Dynarmic, "ARM JIT", "Dynarmic", MP_RGB(255, 64, 64)); | 54 | MICROPROFILE_DEFINE(ARM_Jit_Dynarmic_CPU0, "ARM JIT", "Dynarmic CPU 0", MP_RGB(255, 64, 64)); |
| 55 | MICROPROFILE_DEFINE(ARM_Jit_Dynarmic_CPU1, "ARM JIT", "Dynarmic CPU 1", MP_RGB(255, 64, 64)); | ||
| 56 | MICROPROFILE_DEFINE(ARM_Jit_Dynarmic_CPU2, "ARM JIT", "Dynarmic CPU 2", MP_RGB(255, 64, 64)); | ||
| 57 | MICROPROFILE_DEFINE(ARM_Jit_Dynarmic_CPU3, "ARM JIT", "Dynarmic CPU 3", MP_RGB(255, 64, 64)); | ||
| 55 | 58 | ||
| 56 | namespace Core { | 59 | namespace Core { |
| 57 | 60 | ||
| @@ -189,6 +192,11 @@ struct System::Impl { | |||
| 189 | is_powered_on = true; | 192 | is_powered_on = true; |
| 190 | exit_lock = false; | 193 | exit_lock = false; |
| 191 | 194 | ||
| 195 | microprofile_dynarmic[0] = MICROPROFILE_TOKEN(ARM_Jit_Dynarmic_CPU0); | ||
| 196 | microprofile_dynarmic[1] = MICROPROFILE_TOKEN(ARM_Jit_Dynarmic_CPU1); | ||
| 197 | microprofile_dynarmic[2] = MICROPROFILE_TOKEN(ARM_Jit_Dynarmic_CPU2); | ||
| 198 | microprofile_dynarmic[3] = MICROPROFILE_TOKEN(ARM_Jit_Dynarmic_CPU3); | ||
| 199 | |||
| 192 | LOG_DEBUG(Core, "Initialized OK"); | 200 | LOG_DEBUG(Core, "Initialized OK"); |
| 193 | 201 | ||
| 194 | return ResultStatus::Success; | 202 | return ResultStatus::Success; |
| @@ -396,6 +404,7 @@ struct System::Impl { | |||
| 396 | bool is_async_gpu{}; | 404 | bool is_async_gpu{}; |
| 397 | 405 | ||
| 398 | std::array<u64, Core::Hardware::NUM_CPU_CORES> dynarmic_ticks{}; | 406 | std::array<u64, Core::Hardware::NUM_CPU_CORES> dynarmic_ticks{}; |
| 407 | std::array<MicroProfileToken, Core::Hardware::NUM_CPU_CORES> microprofile_dynarmic{}; | ||
| 399 | }; | 408 | }; |
| 400 | 409 | ||
| 401 | System::System() : impl{std::make_unique<Impl>(*this)} {} | 410 | System::System() : impl{std::make_unique<Impl>(*this)} {} |
| @@ -747,12 +756,12 @@ void System::RegisterHostThread() { | |||
| 747 | 756 | ||
| 748 | void System::EnterDynarmicProfile() { | 757 | void System::EnterDynarmicProfile() { |
| 749 | std::size_t core = impl->kernel.GetCurrentHostThreadID(); | 758 | std::size_t core = impl->kernel.GetCurrentHostThreadID(); |
| 750 | impl->dynarmic_ticks[core] = MicroProfileEnter(MICROPROFILE_TOKEN(ARM_Jit_Dynarmic)); | 759 | impl->dynarmic_ticks[core] = MicroProfileEnter(impl->microprofile_dynarmic[core]); |
| 751 | } | 760 | } |
| 752 | 761 | ||
| 753 | void System::ExitDynarmicProfile() { | 762 | void System::ExitDynarmicProfile() { |
| 754 | std::size_t core = impl->kernel.GetCurrentHostThreadID(); | 763 | std::size_t core = impl->kernel.GetCurrentHostThreadID(); |
| 755 | MicroProfileLeave(MICROPROFILE_TOKEN(ARM_Jit_Dynarmic), impl->dynarmic_ticks[core]); | 764 | MicroProfileLeave(impl->microprofile_dynarmic[core], impl->dynarmic_ticks[core]); |
| 756 | } | 765 | } |
| 757 | 766 | ||
| 758 | } // namespace Core | 767 | } // namespace Core |