aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/physical_core.cpp
diff options
context:
space:
mode:
authorGamer64 <gamer64@eden-emu.dev>2025-08-02 17:22:38 +0200
committercrueter <crueter@eden-emu.dev>2025-08-02 17:22:38 +0200
commit1f34d836b4fb37997e58958630fee5ffb3a678ec (patch)
treeac46676957a3f45876609da027cb6c1a4e191164 /src/core/hle/kernel/physical_core.cpp
parentb32a667d6fcb069f2ba92d08fc82778c39b036d7 (diff)
Add cmake option to enable microprofile (#179)
Backported from https://github.com/azahar-emu/azahar/commit/dd9c743041308112c8dc349c5c237c04b2c4c75f. Co-authored-by: PabloMK7 <hackyglitch2@gmail.com> Co-authored-by: Shinmegumi <shinmegumi@eden-emu.dev> Co-authored-by: Gamer64 <76565986+Gamer64ytb@users.noreply.github.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/179 Co-authored-by: Gamer64 <gamer64@eden-emu.dev> Co-committed-by: Gamer64 <gamer64@eden-emu.dev>
Diffstat (limited to 'src/core/hle/kernel/physical_core.cpp')
-rw-r--r--src/core/hle/kernel/physical_core.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/kernel/physical_core.cpp b/src/core/hle/kernel/physical_core.cpp
index 0f45a32494..3321032563 100644
--- a/src/core/hle/kernel/physical_core.cpp
+++ b/src/core/hle/kernel/physical_core.cpp
@@ -27,7 +27,9 @@ void PhysicalCore::RunThread(Kernel::KThread* thread) {
interface->Initialize();
const auto EnterContext = [&]() {
+#if MICROPROFILE_ENABLED
system.EnterCPUProfile();
+#endif
// Lock the core context.
std::scoped_lock lk{m_guard};
@@ -59,7 +61,9 @@ void PhysicalCore::RunThread(Kernel::KThread* thread) {
m_arm_interface = nullptr;
m_current_thread = nullptr;
+#if MICROPROFILE_ENABLED
system.ExitCPUProfile();
+#endif
};
while (true) {