summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core_timing.cpp5
-rw-r--r--src/core/cpu_manager.cpp5
2 files changed, 7 insertions, 3 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index a3ce69790..cc32a853b 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -2,14 +2,14 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "core/core_timing.h"
6
7#include <algorithm> 5#include <algorithm>
8#include <mutex> 6#include <mutex>
9#include <string> 7#include <string>
10#include <tuple> 8#include <tuple>
11 9
12#include "common/assert.h" 10#include "common/assert.h"
11#include "common/microprofile.h"
12#include "core/core_timing.h"
13#include "core/core_timing_util.h" 13#include "core/core_timing_util.h"
14 14
15namespace Core::Timing { 15namespace Core::Timing {
@@ -44,6 +44,7 @@ CoreTiming::~CoreTiming() = default;
44 44
45void CoreTiming::ThreadEntry(CoreTiming& instance) { 45void CoreTiming::ThreadEntry(CoreTiming& instance) {
46 std::string name = "yuzu:HostTiming"; 46 std::string name = "yuzu:HostTiming";
47 MicroProfileOnThreadCreate(name.c_str());
47 Common::SetCurrentThreadName(name.c_str()); 48 Common::SetCurrentThreadName(name.c_str());
48 instance.on_thread_init(); 49 instance.on_thread_init();
49 instance.ThreadLoop(); 50 instance.ThreadLoop();
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp
index ff2fe8ead..9b9337131 100644
--- a/src/core/cpu_manager.cpp
+++ b/src/core/cpu_manager.cpp
@@ -3,6 +3,7 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "common/fiber.h" 5#include "common/fiber.h"
6#include "common/microprofile.h"
6#include "common/thread.h" 7#include "common/thread.h"
7#include "core/arm/exclusive_monitor.h" 8#include "core/arm/exclusive_monitor.h"
8#include "core/core.h" 9#include "core/core.h"
@@ -36,6 +37,7 @@ void CpuManager::Shutdown() {
36 Pause(false); 37 Pause(false);
37 for (std::size_t core = 0; core < Core::Hardware::NUM_CPU_CORES; core++) { 38 for (std::size_t core = 0; core < Core::Hardware::NUM_CPU_CORES; core++) {
38 core_data[core].host_thread->join(); 39 core_data[core].host_thread->join();
40 core_data[core].host_thread.reset();
39 } 41 }
40} 42}
41 43
@@ -80,7 +82,7 @@ void CpuManager::RunGuestThread() {
80 auto& physical_core = kernel.CurrentPhysicalCore(); 82 auto& physical_core = kernel.CurrentPhysicalCore();
81 if (!physical_core.IsInterrupted()) { 83 if (!physical_core.IsInterrupted()) {
82 physical_core.Idle(); 84 physical_core.Idle();
83 //physical_core.Run(); 85 // physical_core.Run();
84 } 86 }
85 auto& scheduler = physical_core.Scheduler(); 87 auto& scheduler = physical_core.Scheduler();
86 scheduler.TryDoContextSwitch(); 88 scheduler.TryDoContextSwitch();
@@ -159,6 +161,7 @@ void CpuManager::RunThread(std::size_t core) {
159 /// Initialization 161 /// Initialization
160 system.RegisterCoreThread(core); 162 system.RegisterCoreThread(core);
161 std::string name = "yuzu:CoreHostThread_" + std::to_string(core); 163 std::string name = "yuzu:CoreHostThread_" + std::to_string(core);
164 MicroProfileOnThreadCreate(name.c_str());
162 Common::SetCurrentThreadName(name.c_str()); 165 Common::SetCurrentThreadName(name.c_str());
163 auto& data = core_data[core]; 166 auto& data = core_data[core];
164 data.enter_barrier = std::make_unique<Common::Event>(); 167 data.enter_barrier = std::make_unique<Common::Event>();