Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/inspector_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static void StartIoThreadWakeup(int signo, siginfo_t* info, void* ucontext) {
}

inline void* StartIoThreadMain(void* unused) {
uv_thread_setname("SignalInspector");
uv_thread_setname("node-SignalInspector");
for (;;) {
uv_sem_wait(&start_io_thread_semaphore);
Mutex::ScopedLock lock(start_io_thread_async_mutex);
Expand Down
2 changes: 1 addition & 1 deletion src/inspector_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ void InspectorIo::ThreadMain(void* io) {
}

void InspectorIo::ThreadMain() {
int thread_name_error = uv_thread_setname("InspectorIo");
int thread_name_error = uv_thread_setname("node-InspectorIo");
if (!thread_name_error) [[unlikely]] {
per_process::Debug(node::DebugCategory::INSPECTOR_SERVER,
"Failed to set thread name for Inspector\n");
Expand Down
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
}

if (!(flags & ProcessInitializationFlags::kNoInitializeNodeV8Platform)) {
uv_thread_setname("MainThread");
uv_thread_setname("node-MainThread");
per_process::v8_platform.Initialize(
static_cast<int>(per_process::cli_options->v8_thread_pool_size));
result->platform_ = per_process::v8_platform.Platform();
Expand Down
4 changes: 2 additions & 2 deletions src/node_platform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static void PrintSourceLocation(const v8::SourceLocation& location) {
}

static void PlatformWorkerThread(void* data) {
uv_thread_setname("V8Worker");
uv_thread_setname("node-V8Worker");
std::unique_ptr<PlatformWorkerData>
worker_data(static_cast<PlatformWorkerData*>(data));

Expand Down Expand Up @@ -101,7 +101,7 @@ class WorkerThreadsTaskRunner::DelayedTaskScheduler {

std::unique_ptr<uv_thread_t> Start() {
auto start_thread = [](void* data) {
uv_thread_setname("DelayedTaskSchedulerWorker");
uv_thread_setname("node-DelayedTaskSchedulerWorker");
static_cast<DelayedTaskScheduler*>(data)->Run();
};
std::unique_ptr<uv_thread_t> t { new uv_thread_t() };
Expand Down
4 changes: 2 additions & 2 deletions src/node_watchdog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Watchdog::~Watchdog() {


void Watchdog::Run(void* arg) {
uv_thread_setname("Watchdog");
uv_thread_setname("node-Watchdog");
Watchdog* wd = static_cast<Watchdog*>(arg);

// UV_RUN_DEFAULT the loop will be stopped either by the async or the
Expand Down Expand Up @@ -230,7 +230,7 @@ void TraceSigintWatchdog::HandleInterrupt() {

#ifdef __POSIX__
void* SigintWatchdogHelper::RunSigintWatchdog(void* arg) {
uv_thread_setname("SigintWatchdog");
uv_thread_setname("node-SigintWatchdog");
// Inside the helper thread.
bool is_stopping;
do {
Expand Down
2 changes: 1 addition & 1 deletion src/tracing/agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void Agent::Start() {
uv_thread_create(
&thread_,
[](void* arg) {
uv_thread_setname("TraceEventWorker");
uv_thread_setname("node-TraceEventWorker");
Agent* agent = static_cast<Agent*>(arg);
uv_run(&agent->tracing_loop_, UV_RUN_DEFAULT);
},
Expand Down
2 changes: 1 addition & 1 deletion test/addons/uv-thread-name/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const bindingPath = require.resolve(`./build/${common.buildType}/binding`);
const binding = require(bindingPath);

if (isMainThread) {
assert.strictEqual(binding.getThreadName(), 'MainThread');
assert.strictEqual(binding.getThreadName(), 'node-MainThread');

const worker = new Worker(__filename);
worker.on('message', common.mustCall((data) => {
Expand Down
Loading