]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: print get/put under debug_refs 26353/head
authorSage Weil <sage@redhat.com>
Sun, 17 Feb 2019 14:18:34 +0000 (08:18 -0600)
committerSage Weil <sage@redhat.com>
Sun, 17 Feb 2019 14:18:34 +0000 (08:18 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc

index 0cafa2030c5dcbbab14e13d6a869c12da957b076..846790040e0a323255717fd0dc072d4f2cdb884d 100644 (file)
@@ -152,7 +152,9 @@ void PGStateHistory::dump(Formatter* f) const {
 
 void PG::get(const char* tag)
 {
-  ref++;
+  int after = ref++;
+  lgeneric_subdout(cct, refs, 1) << "PG::get " << this << " "
+                                << (after - 1) << " -> " << after << dendl;
 #ifdef PG_DEBUG_REFS
   std::lock_guard l(_ref_id_lock);
   _tag_counts[tag]++;
@@ -172,7 +174,10 @@ void PG::put(const char* tag)
     }
   }
 #endif
-  if (--ref== 0)
+  int after = --ref;
+  lgeneric_subdout(cct, refs, 1) << "PG::put " << this << " "
+                                << (after + 1) << " -> " << after << dendl;
+  if (after == 0)
     delete this;
 }