]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/Timer.cc: improve debug messages from the timer_thread
authorLeonid Usov <leonid.usov@ibm.com>
Mon, 22 Jan 2024 12:37:44 +0000 (14:37 +0200)
committerLeonid Usov <leonid.usov@ibm.com>
Thu, 14 Mar 2024 19:07:52 +0000 (15:07 -0400)
Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
(cherry picked from commit c1c884212f45b387ba54215b6f12545572066ce2)

src/common/Timer.cc

index 2a3277a27659b26d31380e060aaae0103eaec62d..a7c35fb8ef52cfb7c9ae185f3ba610306165201f 100644 (file)
@@ -102,6 +102,7 @@ void CommonSafeTimer<Mutex>::timer_thread()
       }
       #endif
 
+      ldout(cct, 20) << "timer_thread going to execute and remove the top of a schedule sized " << schedule.size() << dendl;
       Context *callback = p->second;
       events.erase(callback);
       schedule.erase(p);
@@ -120,10 +121,11 @@ void CommonSafeTimer<Mutex>::timer_thread()
     if (!safe_callbacks && stopping)
       break;
 
-    ldout(cct,20) << "timer_thread going to sleep" << dendl;
     if (schedule.empty()) {
+      ldout(cct, 20) << "timer_thread going to sleep with an empty schedule" << dendl;
       cond.wait(l);
     } else {
+      ldout(cct, 20) << "timer_thread going to sleep with a schedule size " << schedule.size() << dendl;
       auto when = schedule.begin()->first;
       cond.wait_until(l, when);
     }