]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Remove cdout
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 10 Jun 2011 18:02:27 +0000 (11:02 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 20 Jun 2011 23:06:54 +0000 (16:06 -0700)
cdout just duplicates the functionality of dout.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/common/debug.h
src/include/Context.h

index 264a6850fd196a1a38e3849c9744f1af1a9ae5de..7aaa7665ddf19a1fe54280796e851fc75cda23a3 100644 (file)
@@ -87,11 +87,6 @@ inline std::ostream& operator<<(std::ostream& out, _bad_endl_use_dendl_t) {
     dout_impl(v) \
     dout_prefix
 
-#define cdout(sys, v)        \
-  do { if (v <= XDOUT_CONDVAR(sys)) { \
-    dout_impl(v) \
-    dout_prefix
-
 #define pdout(v, p) \
   do { if ((v) <= (p)) {\
     dout_impl(v) \
index 091867997703f7fd3c4f6aa1b4ae1d631647b9e8..f4c795ab540d805b52000dd6298a5a88cfc6432a 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <iostream>
 
+#define DOUT_SUBSYS context
 
 /*
  * Context - abstract callback class
@@ -47,12 +48,12 @@ inline void finish_contexts(std::list<Context*>& finished,
   list<Context*> ls;
   ls.swap(finished); // swap out of place to avoid weird loops
 
-  cdout(context, 10) << ls.size() << " contexts to finish with " << result << dendl;
+  dout(10) << ls.size() << " contexts to finish with " << result << dendl;
   for (std::list<Context*>::iterator it = ls.begin(); 
        it != ls.end(); 
        it++) {
     Context *c = *it;
-    cdout(context, 10) << "---- " << c << dendl;
+    dout(10) << "---- " << c << dendl;
     c->finish(result);
     delete c;
   }
@@ -67,12 +68,12 @@ inline void finish_contexts(std::vector<Context*>& finished,
   vector<Context*> ls;
   ls.swap(finished); // swap out of place to avoid weird loops
 
-  cdout(context, 10) << ls.size() << " contexts to finish with " << result << dendl;
+  dout(10) << ls.size() << " contexts to finish with " << result << dendl;
   for (std::vector<Context*>::iterator it = ls.begin(); 
        it != ls.end(); 
        it++) {
     Context *c = *it;
-    cdout(context, 10) << "---- " << c << dendl;
+    dout(10) << "---- " << c << dendl;
     c->finish(result);
     delete c;
   }
@@ -131,7 +132,7 @@ private:
 #endif
     --sub_existing_count;
 
-    cdout(context, 10) << "C_Gather " << this << ".sub_finish(r=" << r << ") " << sub
+    dout(10) << "C_Gather " << this << ".sub_finish(r=" << r << ") " << sub
 #ifdef DEBUG_GATHER
                    << " (remaining " << waitfor << ")"
 #endif
@@ -186,10 +187,10 @@ public:
                                           lock("C_Gather::lock", true, false), //disable lockdep
                                           any(an),
                                          activated(onfinish ? true : false) {
-    cdout(context, 10) << "C_Gather " << this << ".new" << dendl;
+    dout(10) << "C_Gather " << this << ".new" << dendl;
   }
   ~C_Gather() {
-    cdout(context, 10) << "C_Gather " << this << ".delete" << dendl;
+    dout(10) << "C_Gather " << this << ".delete" << dendl;
     assert(sub_existing_count == 0);
 #ifdef DEBUG_GATHER
     assert(waitfor.empty());
@@ -211,7 +212,7 @@ public:
 #ifdef DEBUG_GATHER
     waitfor.insert(s);
 #endif
-    cdout(context, 10) << "C_Gather " << this << ".new_sub is " << sub_created_count << " " << s << dendl;
+    dout(10) << "C_Gather " << this << ".new_sub is " << sub_created_count << " " << s << dendl;
     return s;
   }
   void rm_sub(Context *s) {
@@ -233,4 +234,6 @@ public:
 
 };
 
+#undef DOUT_SUBSYS
+
 #endif