mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-12 00:47:49 +00:00
[meta] remove MicroProfile (#185)
Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/185 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
dbbe5b3328
commit
f1e74f6855
76 changed files with 5547 additions and 11468 deletions
|
@ -9,7 +9,6 @@
|
|||
#include "audio_core/audio_core.h"
|
||||
#include "common/fs/fs.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/settings.h"
|
||||
#include "common/settings_enums.h"
|
||||
#include "common/string_util.h"
|
||||
|
@ -63,11 +62,6 @@
|
|||
#include "video_core/renderer_base.h"
|
||||
#include "video_core/video_core.h"
|
||||
|
||||
MICROPROFILE_DEFINE(ARM_CPU0, "ARM", "CPU 0", MP_RGB(255, 64, 64));
|
||||
MICROPROFILE_DEFINE(ARM_CPU1, "ARM", "CPU 1", MP_RGB(255, 64, 64));
|
||||
MICROPROFILE_DEFINE(ARM_CPU2, "ARM", "CPU 2", MP_RGB(255, 64, 64));
|
||||
MICROPROFILE_DEFINE(ARM_CPU3, "ARM", "CPU 3", MP_RGB(255, 64, 64));
|
||||
|
||||
namespace Core {
|
||||
|
||||
FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs,
|
||||
|
@ -289,13 +283,6 @@ 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>();
|
||||
}
|
||||
|
@ -575,9 +562,6 @@ 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;
|
||||
|
@ -956,18 +940,6 @@ 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]);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -396,14 +396,6 @@ public:
|
|||
/// Register a host thread as an auxiliary thread.
|
||||
void RegisterHostThread();
|
||||
|
||||
#if MICROPROFILE_ENABLED
|
||||
/// Enter CPU Microprofile
|
||||
void EnterCPUProfile();
|
||||
|
||||
/// Exit CPU Microprofile
|
||||
void ExitCPUProfile();
|
||||
#endif
|
||||
|
||||
/// Tells if system is running on multicore.
|
||||
[[nodiscard]] bool IsMulticore() const;
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#endif
|
||||
|
||||
#include "common/settings.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/hardware_properties.h"
|
||||
|
||||
|
@ -56,14 +55,10 @@ CoreTiming::~CoreTiming() {
|
|||
|
||||
void CoreTiming::ThreadEntry(CoreTiming& instance) {
|
||||
static constexpr char name[] = "HostTiming";
|
||||
MicroProfileOnThreadCreate(name);
|
||||
Common::SetCurrentThreadName(name);
|
||||
Common::SetCurrentThreadPriority(Common::ThreadPriority::High);
|
||||
instance.on_thread_init();
|
||||
instance.ThreadLoop();
|
||||
#if MICROPROFILE_ENABLED
|
||||
MicroProfileOnThreadExit();
|
||||
#endif
|
||||
}
|
||||
|
||||
void CoreTiming::Initialize(std::function<void()>&& on_thread_init_) {
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/fiber.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/scope_exit.h"
|
||||
#include "common/thread.h"
|
||||
#include "core/core.h"
|
||||
|
@ -192,7 +194,6 @@ void CpuManager::RunThread(std::stop_token token, std::size_t core) {
|
|||
} else {
|
||||
name = "CPUThread";
|
||||
}
|
||||
MicroProfileOnThreadCreate(name.c_str());
|
||||
Common::SetCurrentThreadName(name.c_str());
|
||||
Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical);
|
||||
auto& data = core_data[core];
|
||||
|
@ -201,9 +202,6 @@ void CpuManager::RunThread(std::stop_token token, std::size_t core) {
|
|||
// Cleanup
|
||||
SCOPE_EXIT {
|
||||
data.host_context->Exit();
|
||||
#if MICROPROFILE_ENABLED
|
||||
MicroProfileOnThreadExit();
|
||||
#endif
|
||||
};
|
||||
|
||||
// Running
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
@ -12,7 +15,6 @@
|
|||
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/scope_exit.h"
|
||||
#include "common/thread.h"
|
||||
#include "common/thread_worker.h"
|
||||
|
@ -46,8 +48,6 @@
|
|||
#include "core/hle/service/sm/sm.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
MICROPROFILE_DEFINE(Kernel_SVC, "Kernel", "SVC", MP_RGB(70, 200, 70));
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
struct KernelCore::Impl {
|
||||
|
@ -1278,16 +1278,6 @@ void KernelCore::ExceptionalExitApplication() {
|
|||
SuspendEmulation(true);
|
||||
}
|
||||
|
||||
#if MICROPROFILE_ENABLED
|
||||
void KernelCore::EnterSVCProfile() {
|
||||
impl->svc_ticks[CurrentPhysicalCoreIndex()] = MicroProfileEnter(MICROPROFILE_TOKEN(Kernel_SVC));
|
||||
}
|
||||
|
||||
void KernelCore::ExitSVCProfile() {
|
||||
MicroProfileLeave(MICROPROFILE_TOKEN(Kernel_SVC), impl->svc_ticks[CurrentPhysicalCoreIndex()]);
|
||||
}
|
||||
#endif
|
||||
|
||||
Init::KSlabResourceCounts& KernelCore::SlabResourceCounts() {
|
||||
return impl->slab_resource_counts;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
@ -271,12 +274,6 @@ public:
|
|||
|
||||
bool IsShuttingDown() const;
|
||||
|
||||
#if MICROPROFILE_ENABLED
|
||||
void EnterSVCProfile();
|
||||
|
||||
void ExitSVCProfile();
|
||||
#endif
|
||||
|
||||
/// Workaround for single-core mode when preempting threads while idle.
|
||||
bool IsPhantomModeForSingleCore() const;
|
||||
void SetIsPhantomModeForSingleCore(bool value);
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
@ -27,10 +30,6 @@ 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};
|
||||
|
||||
|
@ -60,10 +59,6 @@ void PhysicalCore::RunThread(Kernel::KThread* thread) {
|
|||
// On exit, we no longer are running.
|
||||
m_arm_interface = nullptr;
|
||||
m_current_thread = nullptr;
|
||||
|
||||
#if MICROPROFILE_ENABLED
|
||||
system.ExitCPUProfile();
|
||||
#endif
|
||||
};
|
||||
|
||||
while (true) {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
@ -4428,9 +4431,6 @@ void Call(Core::System& system, u32 imm) {
|
|||
|
||||
std::array<uint64_t, 8> args;
|
||||
kernel.CurrentPhysicalCore().SaveSvcArguments(process, args);
|
||||
#if MICROPROFILE_ENABLED
|
||||
kernel.EnterSVCProfile();
|
||||
#endif
|
||||
|
||||
if (process.Is64Bit()) {
|
||||
Call64(system, imm, args);
|
||||
|
@ -4438,9 +4438,6 @@ void Call(Core::System& system, u32 imm) {
|
|||
Call32(system, imm, args);
|
||||
}
|
||||
|
||||
#if MICROPROFILE_ENABLED
|
||||
kernel.ExitSVCProfile();
|
||||
#endif
|
||||
kernel.CurrentPhysicalCore().LoadSvcArguments(process, args);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include <boost/container/small_vector.hpp>
|
||||
|
||||
#include "common/microprofile.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvdisp_disp0.h"
|
||||
#include "core/hle/service/nvnflinger/buffer_item.h"
|
||||
#include "core/hle/service/nvnflinger/buffer_item_consumer.h"
|
||||
|
@ -115,9 +117,6 @@ u32 HardwareComposer::ComposeLocked(f32* out_speed_scale, Display& display,
|
|||
nvdisp.Composite(composition_stack);
|
||||
}
|
||||
|
||||
// Render MicroProfile.
|
||||
MicroProfileFlip();
|
||||
|
||||
// Advance by at least one frame.
|
||||
const u32 frame_advance = swap_interval.value_or(1);
|
||||
m_frame_number += frame_advance;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include <fmt/ranges.h>
|
||||
|
||||
#include "common/microprofile.h"
|
||||
#include "common/socket_types.h"
|
||||
#include "core/core.h"
|
||||
#include "core/hle/kernel/k_thread.h"
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <locale>
|
||||
#include "common/hex_util.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/swap.h"
|
||||
#include "core/arm/debug.h"
|
||||
#include "core/core.h"
|
||||
|
@ -269,8 +271,6 @@ void CheatEngine::Reload(std::vector<CheatEntry> reload_cheats) {
|
|||
is_pending_reload.exchange(true);
|
||||
}
|
||||
|
||||
MICROPROFILE_DEFINE(Cheat_Engine, "Add-Ons", "Cheat Engine", MP_RGB(70, 200, 70));
|
||||
|
||||
void CheatEngine::FrameCallback(std::chrono::nanoseconds ns_late) {
|
||||
if (is_pending_reload.exchange(false)) {
|
||||
vm.LoadProgram(cheats);
|
||||
|
@ -280,8 +280,6 @@ void CheatEngine::FrameCallback(std::chrono::nanoseconds ns_late) {
|
|||
return;
|
||||
}
|
||||
|
||||
MICROPROFILE_SCOPE(Cheat_Engine);
|
||||
|
||||
vm.Execute(metadata);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue