diff options
| author | 2020-03-12 16:48:43 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:35:48 -0400 | |
| commit | 7020d498c5aef7c1180bfc57031cdd7fbfecdf0f (patch) | |
| tree | f2508e39a02966cdd4d9acda1e14ed93cdc150cd /src/core/core.cpp | |
| parent | General: Fix Stop function (diff) | |
| download | yuzu-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/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index fd1bdcaf0..032da7aa5 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | #include "common/file_util.h" | 9 | #include "common/file_util.h" |
| 10 | #include "common/logging/log.h" | 10 | #include "common/logging/log.h" |
| 11 | #include "common/microprofile.h" | ||
| 11 | #include "common/string_util.h" | 12 | #include "common/string_util.h" |
| 12 | #include "core/arm/exclusive_monitor.h" | 13 | #include "core/arm/exclusive_monitor.h" |
| 13 | #include "core/core.h" | 14 | #include "core/core.h" |
| @@ -50,6 +51,8 @@ | |||
| 50 | #include "video_core/renderer_base.h" | 51 | #include "video_core/renderer_base.h" |
| 51 | #include "video_core/video_core.h" | 52 | #include "video_core/video_core.h" |
| 52 | 53 | ||
| 54 | MICROPROFILE_DEFINE(ARM_Jit_Dynarmic, "ARM JIT", "Dynarmic", MP_RGB(255, 64, 64)); | ||
| 55 | |||
| 53 | namespace Core { | 56 | namespace Core { |
| 54 | 57 | ||
| 55 | namespace { | 58 | namespace { |
| @@ -391,6 +394,8 @@ struct System::Impl { | |||
| 391 | 394 | ||
| 392 | std::unique_ptr<Core::PerfStats> perf_stats; | 395 | std::unique_ptr<Core::PerfStats> perf_stats; |
| 393 | Core::FrameLimiter frame_limiter; | 396 | Core::FrameLimiter frame_limiter; |
| 397 | |||
| 398 | std::array<u64, Core::Hardware::NUM_CPU_CORES> dynarmic_ticks{}; | ||
| 394 | }; | 399 | }; |
| 395 | 400 | ||
| 396 | System::System() : impl{std::make_unique<Impl>(*this)} {} | 401 | System::System() : impl{std::make_unique<Impl>(*this)} {} |
| @@ -736,4 +741,14 @@ void System::RegisterHostThread() { | |||
| 736 | impl->kernel.RegisterHostThread(); | 741 | impl->kernel.RegisterHostThread(); |
| 737 | } | 742 | } |
| 738 | 743 | ||
| 744 | void System::EnterDynarmicProfile() { | ||
| 745 | std::size_t core = impl->kernel.GetCurrentHostThreadID(); | ||
| 746 | impl->dynarmic_ticks[core] = MicroProfileEnter(MICROPROFILE_TOKEN(ARM_Jit_Dynarmic)); | ||
| 747 | } | ||
| 748 | |||
| 749 | void System::ExitDynarmicProfile() { | ||
| 750 | std::size_t core = impl->kernel.GetCurrentHostThreadID(); | ||
| 751 | MicroProfileLeave(MICROPROFILE_TOKEN(ARM_Jit_Dynarmic), impl->dynarmic_ticks[core]); | ||
| 752 | } | ||
| 753 | |||
| 739 | } // namespace Core | 754 | } // namespace Core |