diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-09-02 21:17:18 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-12-08 17:34:50 +0000 |
commit | 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e (patch) | |
tree | 62f873df87c7c675557a179e0c4c83fe9f3087bc /contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp | |
parent | cf037972ea8863e2bab7461d77345367d2c1e054 (diff) | |
parent | 7fa27ce4a07f19b07799a767fc29416f3b625afb (diff) |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp b/contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp index 31461e31c65c..4eef339000e1 100644 --- a/contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp +++ b/contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp @@ -15,6 +15,7 @@ #include "llvm/Config/llvm-config.h" #if LLVM_ENABLE_THREADS +#include "llvm/Support/FormatVariadic.h" #include "llvm/Support/Threading.h" #else #include "llvm/Support/raw_ostream.h" @@ -43,6 +44,7 @@ void ThreadPool::grow(int requested) { while (static_cast<int>(Threads.size()) < newThreadCount) { int ThreadID = Threads.size(); Threads.emplace_back([this, ThreadID] { + set_thread_name(formatv("llvm-worker-{0}", ThreadID)); Strategy.apply_thread_strategy(ThreadID); processTasks(nullptr); }); |