From: David Disseldorp Date: Wed, 6 May 2020 20:30:56 +0000 (+0200) Subject: common/ceph_timer: set thread name X-Git-Tag: v16.1.0~2278^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c9fba38429032235841f80f7b63e1d130fe79f66;p=ceph.git common/ceph_timer: set thread name Attempt to set a ceph_timer thread name using the ceph_pthread_setname() compatibility macro. Having an explicit thread name set is useful for debugging purposes. Signed-off-by: David Disseldorp --- diff --git a/src/common/ceph_timer.h b/src/common/ceph_timer.h index d12cc19933ae..944447420349 100644 --- a/src/common/ceph_timer.h +++ b/src/common/ceph_timer.h @@ -25,6 +25,7 @@ #include #include "include/function2.hpp" +#include "include/compat.h" namespace bi = boost::intrusive; namespace ceph { @@ -145,6 +146,7 @@ class timer { public: timer() : suspended(false) { thread = std::thread(&timer::timer_thread, this); + ceph_pthread_setname(thread.native_handle(), "ceph_timer"); } // Create a suspended timer, jobs will be executed in order when