From: Chengwen Feng Date: Sat, 17 Apr 2021 09:09:47 +0000 (+0800) Subject: telemetry: set socket listener thread name X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5da7736f8c53;p=dpdk.git telemetry: set socket listener thread name This patch supports set init threads name which is helpful for debugging. Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) Acked-by: Bruce Richardson --- diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c index 7e08afd221..8f48337512 100644 --- a/lib/telemetry/telemetry.c +++ b/lib/telemetry/telemetry.c @@ -442,7 +442,7 @@ telemetry_legacy_init(void) return -1; pthread_create(&t_old, NULL, socket_listener, &v1_socket); pthread_setaffinity_np(t_old, sizeof(*thread_cpuset), thread_cpuset); - + pthread_setname_np(t_old, "telemetry-v1"); TMTY_LOG(DEBUG, "Legacy telemetry socket initialized ok\n"); return 0; } @@ -471,6 +471,7 @@ telemetry_v2_init(void) return -1; pthread_create(&t_new, NULL, socket_listener, &v2_socket); pthread_setaffinity_np(t_new, sizeof(*thread_cpuset), thread_cpuset); + pthread_setname_np(t_new, "telemetry-v2"); atexit(unlink_sockets); return 0;