]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/WorkQueue: use threadpoolname + threadaddr for heartbeat_handle_d.name 16563/head
authorhuangjun <huangjun@xsky.com>
Tue, 25 Jul 2017 11:39:49 +0000 (11:39 +0000)
committerhuangjun <huangjun@xsky.com>
Tue, 25 Jul 2017 11:39:49 +0000 (11:39 +0000)
  Current log: 'tp_osd_tp thread tp_osd_tp'
  changed to 'OSD::osd_op_tp thread 0x7fd83ac52700'

  This reverts commit 50c8c76d8a319a4b8594cb10003c55dc79440fb7

Signed-off-by: huangjun <huangjun@xsky.com>
src/common/WorkQueue.cc

index 1d26723128a873ccf56a2871afa7c89c735fca45..7da8c85d37448e5fb11fd03bd56c0bdf1ba121fd 100644 (file)
@@ -87,9 +87,7 @@ void ThreadPool::worker(WorkThread *wt)
   ldout(cct,10) << "worker start" << dendl;
   
   std::stringstream ss;
-  char name[16] = {0};
-  ceph_pthread_getname(pthread_self(), name, sizeof(name));
-  ss << name << " thread " << name;
+  ss << name << " thread " << (void *)pthread_self();
   heartbeat_handle_d *hb = cct->get_heartbeat_map()->add_worker(ss.str(), pthread_self());
 
   while (!_stop) {
@@ -298,9 +296,7 @@ void ShardedThreadPool::shardedthreadpool_worker(uint32_t thread_index)
   ldout(cct,10) << "worker start" << dendl;
 
   std::stringstream ss;
-  char name[16] = {0};
-  ceph_pthread_getname(pthread_self(), name, sizeof(name));
-  ss << name << " thread " << name;
+  ss << name << " thread " << (void *)pthread_self();
   heartbeat_handle_d *hb = cct->get_heartbeat_map()->add_worker(ss.str(), pthread_self());
 
   while (!stop_threads) {