summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-12 21:48:43 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:35:48 +0200
commit7020d498c5aef7c1180bfc57031cdd7fbfecdf0f (patch)
treef2508e39a02966cdd4d9acda1e14ed93cdc150cd /src/core/core.cpp
parentGeneral: Fix Stop function (diff)
downloadyuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.tar
yuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.tar.gz
yuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.tar.bz2
yuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.tar.lz
yuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.tar.xz
yuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.tar.zst
yuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.zip
Diffstat (limited to '')
-rw-r--r--src/core/core.cpp15
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 @@
#include "common/file_util.h"
#include "common/logging/log.h"
+#include "common/microprofile.h"
#include "common/string_util.h"
#include "core/arm/exclusive_monitor.h"
#include "core/core.h"
@@ -50,6 +51,8 @@
#include "video_core/renderer_base.h"
#include "video_core/video_core.h"
+MICROPROFILE_DEFINE(ARM_Jit_Dynarmic, "ARM JIT", "Dynarmic", MP_RGB(255, 64, 64));
+
namespace Core {
namespace {
@@ -391,6 +394,8 @@ struct System::Impl {
std::unique_ptr<Core::PerfStats> perf_stats;
Core::FrameLimiter frame_limiter;
+
+ std::array<u64, Core::Hardware::NUM_CPU_CORES> dynarmic_ticks{};
};
System::System() : impl{std::make_unique<Impl>(*this)} {}
@@ -736,4 +741,14 @@ void System::RegisterHostThread() {
impl->kernel.RegisterHostThread();
}
+void System::EnterDynarmicProfile() {
+ std::size_t core = impl->kernel.GetCurrentHostThreadID();
+ impl->dynarmic_ticks[core] = MicroProfileEnter(MICROPROFILE_TOKEN(ARM_Jit_Dynarmic));
+}
+
+void System::ExitDynarmicProfile() {
+ std::size_t core = impl->kernel.GetCurrentHostThreadID();
+ MicroProfileLeave(MICROPROFILE_TOKEN(ARM_Jit_Dynarmic), impl->dynarmic_ticks[core]);
+}
+
} // namespace Core