diff options
| author | Gamer64 <gamer64@eden-emu.dev> | 2025-08-02 17:22:38 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-08-02 17:22:38 +0200 |
| commit | 1f34d836b4fb37997e58958630fee5ffb3a678ec (patch) | |
| tree | ac46676957a3f45876609da027cb6c1a4e191164 /src/core/core.cpp | |
| parent | b32a667d6fcb069f2ba92d08fc82778c39b036d7 (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/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index ae184f8a88..8aef26d93f 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -289,10 +289,12 @@ struct System::Impl { exit_locked = false; exit_requested = false; +#if MICROPROFILE_ENABLED microprofile_cpu[0] = MICROPROFILE_TOKEN(ARM_CPU0); microprofile_cpu[1] = MICROPROFILE_TOKEN(ARM_CPU1); microprofile_cpu[2] = MICROPROFILE_TOKEN(ARM_CPU2); microprofile_cpu[3] = MICROPROFILE_TOKEN(ARM_CPU3); +#endif if (Settings::values.enable_renderdoc_hotkey) { renderdoc_api = std::make_unique<Tools::RenderdocAPI>(); @@ -573,7 +575,9 @@ struct System::Impl { std::stop_source stop_event; std::array<u64, Core::Hardware::NUM_CPU_CORES> dynarmic_ticks{}; +#if MICROPROFILE_ENABLED std::array<MicroProfileToken, Core::Hardware::NUM_CPU_CORES> microprofile_cpu{}; +#endif std::array<Core::GPUDirtyMemoryManager, Core::Hardware::NUM_CPU_CORES> gpu_dirty_memory_managers; @@ -952,6 +956,7 @@ void System::RegisterHostThread() { impl->kernel.RegisterHostThread(); } +#if MICROPROFILE_ENABLED void System::EnterCPUProfile() { std::size_t core = impl->kernel.GetCurrentHostThreadID(); impl->dynarmic_ticks[core] = MicroProfileEnter(impl->microprofile_cpu[core]); @@ -961,6 +966,7 @@ void System::ExitCPUProfile() { std::size_t core = impl->kernel.GetCurrentHostThreadID(); MicroProfileLeave(impl->microprofile_cpu[core], impl->dynarmic_ticks[core]); } +#endif bool System::IsMulticore() const { return impl->is_multicore; |
