Skip to content

Commit eaa8281

Browse files
Update thread names (#1120)
1 parent 731713d commit eaa8281

File tree

20 files changed

+29
-12
lines changed

20 files changed

+29
-12
lines changed

src/Cafe/HW/Espresso/Debugger/GDBStub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ bool GDBServer::Initialize()
297297

298298
void GDBServer::ThreadFunc()
299299
{
300-
SetThreadName("GDBServer::ThreadFunc");
300+
SetThreadName("GDBServer");
301301

302302
while (!m_stopRequested)
303303
{

src/Cafe/HW/Espresso/Recompiler/PPCRecompiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ std::atomic_bool s_recompilerThreadStopSignal{false};
294294

295295
void PPCRecompiler_thread()
296296
{
297-
SetThreadName("PPCRecompiler_thread");
297+
SetThreadName("PPCRecompiler");
298298
while (true)
299299
{
300300
if(s_recompilerThreadStopSignal)

src/Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <glslang/Public/ShaderLang.h>
1010
#include <glslang/SPIRV/GlslangToSpv.h>
11+
#include <util/helpers/helpers.h>
1112

1213
bool s_isLoadingShadersVk{ false };
1314
class FileCache* s_spirvCache{nullptr};
@@ -155,6 +156,7 @@ class _ShaderVkThreadPool
155156

156157
void CompilerThreadFunc()
157158
{
159+
SetThreadName("vkShaderComp");
158160
while (m_threadsActive.load(std::memory_order::relaxed))
159161
{
160162
s_compilationQueueCount.decrementWithWait();

src/Cafe/HW/Latte/Renderer/Vulkan/VulkanPipelineStableCache.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ bool VulkanPipelineStableCache::DeserializePipeline(MemStreamReader& memReader,
408408

409409
int VulkanPipelineStableCache::CompilerThread()
410410
{
411+
SetThreadName("plCacheCompiler");
411412
while (m_numCompilationThreads != 0)
412413
{
413414
std::vector<uint8> pipelineData = m_compilationQueue.pop();
@@ -421,6 +422,7 @@ int VulkanPipelineStableCache::CompilerThread()
421422

422423
void VulkanPipelineStableCache::WorkerThread()
423424
{
425+
SetThreadName("plCacheWriter");
424426
while (true)
425427
{
426428
CachedPipeline* job;

src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,6 +1986,7 @@ void VulkanRenderer::WaitCommandBufferFinished(uint64 commandBufferId)
19861986

19871987
void VulkanRenderer::PipelineCacheSaveThread(size_t cache_size)
19881988
{
1989+
SetThreadName("vkDriverPlCache");
19891990
const auto dir = ActiveSettings::GetCachePath("shaderCache/driver/vk");
19901991
if (!fs::exists(dir))
19911992
{

src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRendererCore.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ std::queue<PipelineCompiler*> g_compilePipelineRequests;
190190

191191
void compilePipeline_thread(sint32 threadIndex)
192192
{
193+
SetThreadName("compilePl");
193194
#ifdef _WIN32
194195
// one thread runs at normal priority while the others run at lower priority
195196
if(threadIndex != 0)

src/Cafe/IOSU/ODM/iosu_odm.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <util/helpers/helpers.h>
12
#include "iosu_odm.h"
23
#include "config/ActiveSettings.h"
34
#include "Common/FileStream.h"
@@ -79,6 +80,7 @@ namespace iosu
7980

8081
void ODMServiceThread()
8182
{
83+
SetThreadName("ODMService");
8284
s_msgQueueId = IOS_CreateMessageQueue(_s_msgBuffer.GetPtr(), _s_msgBuffer.GetCount());
8385
cemu_assert(!IOS_ResultIsError((IOS_ERROR)s_msgQueueId));
8486
IOS_ERROR r = IOS_RegisterResourceManager(s_devicePath.c_str(), s_msgQueueId);

src/Cafe/IOSU/PDM/iosu_pdm.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <util/helpers/helpers.h>
12
#include "iosu_pdm.h"
23
#include "Cafe/CafeSystem.h"
34
#include "config/ActiveSettings.h"
@@ -387,6 +388,7 @@ namespace iosu
387388

388389
void TimeTrackingThread(uint64 titleId)
389390
{
391+
SetThreadName("PlayDiaryThread");
390392
PlayStatsEntry* playStatsEntry = PlayStats_BeginNewTracking(titleId);
391393

392394
auto startTime = std::chrono::steady_clock::now();

src/Cafe/IOSU/nn/iosu_nn_service.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ namespace iosu
155155

156156
void IPCService::ServiceThread()
157157
{
158+
SetThreadName("IPCService");
158159
m_msgQueueId = IOS_CreateMessageQueue(_m_msgBuffer.GetPtr(), _m_msgBuffer.GetCount());
159160
cemu_assert(!IOS_ResultIsError((IOS_ERROR)m_msgQueueId));
160161
IOS_ERROR r = IOS_RegisterResourceManager(m_devicePath.c_str(), m_msgQueueId);

src/Cafe/OS/libs/coreinit/coreinit_Thread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ namespace coreinit
11681168

11691169
void OSSchedulerCoreEmulationThread(void* _assignedCoreIndex)
11701170
{
1171-
SetThreadName(fmt::format("OSSchedulerThread[core={}]", (uintptr_t)_assignedCoreIndex).c_str());
1171+
SetThreadName(fmt::format("OSSched[core={}]", (uintptr_t)_assignedCoreIndex).c_str());
11721172
t_assignedCoreIndex = (sint32)(uintptr_t)_assignedCoreIndex;
11731173
#if defined(ARCH_X86_64)
11741174
_mm_setcsr(_mm_getcsr() | 0x8000); // flush denormals to zero

0 commit comments

Comments
 (0)