]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
dout: print thread id hex (to match up with gdb)
authorSage Weil <sage@newdream.net>
Thu, 28 Jan 2010 18:04:28 +0000 (10:04 -0800)
committerSage Weil <sage@newdream.net>
Thu, 28 Jan 2010 18:04:28 +0000 (10:04 -0800)
13 files changed:
src/client/Client.cc
src/common/Mutex.cc
src/common/WorkQueue.cc
src/common/debug.h
src/common/lockdep.cc
src/common/tls.cc
src/msg/SimpleMessenger.cc
src/os/FileJournal.cc
src/os/FileStore.cc
src/osd/OSD.cc
src/osd/PG.cc
src/osd/RAID4PG.cc
src/osd/ReplicatedPG.cc

index 9de38063c9cdd225a2978c391e46455025fb202d..a2367cb0f7aa757a925faee11813d8ca4301c7cf 100644 (file)
@@ -63,7 +63,7 @@ using namespace std;
 
 #define DOUT_SUBSYS client
 #undef dout_prefix
-#define dout_prefix *_dout << dbeginl << pthread_self() << " client" << whoami << " "
+#define dout_prefix *_dout << dbeginl << std::hex << pthread_self() << std::dec << " client" << whoami << " "
 
 #define  tout       if (g_conf.client_trace) traceout
 
index 13d3ee8dff8eb22af7a189ee6f9b4c103614a269..0d0b1589082af617cb4001e92bd79e6686eb2957 100644 (file)
@@ -15,8 +15,8 @@ int g_lockdep = 0;
 
 #undef dout
 #undef derr
-#define  dout(l)    if (l<=g_conf.debug_lockdep) *_dout << g_clock.now() << " " << pthread_self() << " lockdep: "
-#define  derr(l)    if (l<=g_conf.debug_lockdep) *_derr << g_clock.now() << " " << pthread_self() << " lockdep: "
+#define  dout(l)    if (l<=g_conf.debug_lockdep) *_dout << g_clock.now() << " " << std::hex << pthread_self() << std::dec << " lockdep: "
+#define  derr(l)    if (l<=g_conf.debug_lockdep) *_derr << g_clock.now() << " " << std::hex << pthread_self() << std::dec << " lockdep: "
 
 
 pthread_mutex_t lockdep_mutex = PTHREAD_MUTEX_INITIALIZER;
index a349f2df21aef0d0e473e3d08bfb822144e5b7de..40f17e3c346a989fadc2546557dde8f29efcc4e3 100644 (file)
@@ -19,7 +19,7 @@
 
 #define DOUT_SUBSYS tp
 #undef dout_prefix
-#define dout_prefix *_dout << dbeginl << pthread_self() << " " << name << " "
+#define dout_prefix *_dout << dbeginl << std::hex << pthread_self() << std::dec << " " << name << " "
 
 
 void ThreadPool::worker()
index d47861dfa4130419bc278eef6c20ffa20e521ada..e748e9548b87f558085e4438030ba3416ff892c5 100644 (file)
@@ -69,8 +69,8 @@ inline ostream& operator<<(ostream& out, _bad_endl_use_dendl_t) {
 
 
 // generic macros
-#define generic_dout(x) do { if ((x) <= g_conf.debug) { *_dout << dbeginl
-#define generic_derr(x) do { if ((x) <= g_conf.debug) { *_derr << dbeginl
+#define generic_dout(x) do { if ((x) <= g_conf.debug) { *_dout << dbeginl << std::hex << pthread_self() << std::dec << " "
+#define generic_derr(x) do { if ((x) <= g_conf.debug) { *_derr << dbeginl << std::hex << pthread_self() << std::dec << " "
 
 #define pdout(x,p) do { if ((x) <= (p)) { *_dout << dbeginl
 
index 93829cd7e8c46c7ebe7b78a7ccf8280d522d0329..8b37dc18dd8efd16adfed940295d1dc1d1150965 100644 (file)
@@ -10,7 +10,7 @@
 #include "config.h"
 
 #undef dout
-#define  dout(l)    if (l<=g_conf.debug_lockdep) *_dout << g_clock.now() << " " << pthread_self() << " lockdep: "
+#define  dout(l)    if (l<=g_conf.debug_lockdep) *_dout << g_clock.now() << " " << std::hex << pthread_self() << std::dec << " lockdep: "
 
 
 // global
index f272dabcd8fc009f7e90ecfb3ae346017d2f14f9..3c6f9c76b9f06d9ba727f15a453cd14448579a11 100644 (file)
@@ -8,8 +8,8 @@
 
 #undef dout
 #undef derr
-#define  dout(l)    if (l<=g_conf.debug_lockdep) *_dout << g_clock.now() << " " << pthread_self() << " tls: "
-#define  derr(l)    if (l<=g_conf.debug_lockdep) *_derr << g_clock.now() << " " << pthread_self() << " tls: "
+#define  dout(l)    if (l<=g_conf.debug_lockdep) *_dout << g_clock.now() << " " << std::hex << pthread_self() << std::dec << " tls: "
+#define  derr(l)    if (l<=g_conf.debug_lockdep) *_derr << g_clock.now() << " " << std::hex << pthread_self() << std::dec << " tls: "
 
 
 pthread_key_t   _tls_key = 0;
index 812b50e9d92cc8c21438afade880787787ba3011..9920a6ff69047f6e8bb08ef562180644acd6819b 100644 (file)
@@ -40,7 +40,7 @@
 #undef dout_prefix
 #define dout_prefix _prefix(messenger)
 static ostream& _prefix(SimpleMessenger *messenger) {
-  return *_dout << dbeginl << pthread_self() << " -- " << messenger->ms_addr << " ";
+  return *_dout << dbeginl << std::hex << pthread_self() << std::dec << " -- " << messenger->ms_addr << " ";
 }
 
 
@@ -465,7 +465,7 @@ entity_addr_t SimpleMessenger::get_myaddr()
 #undef dout_prefix
 #define dout_prefix _pipe_prefix()
 ostream& SimpleMessenger::Pipe::_pipe_prefix() {
-  return *_dout << dbeginl << pthread_self()
+  return *_dout << dbeginl << std::hex << pthread_self() << std::dec
                << " -- " << messenger->ms_addr << " >> " << peer_addr << " pipe(" << this
                << " sd=" << sd
                << " pgs=" << peer_global_seq
index f7b0b17a0e8adde4904d9317a97060e2f5d65a2b..030eb56ecdc4ad1c5ab42cc797b77e60f08d937a 100644 (file)
@@ -24,7 +24,7 @@
 
 #define DOUT_SUBSYS journal
 #undef dout_prefix
-#define dout_prefix *_dout << dbeginl << pthread_self() << " journal "
+#define dout_prefix *_dout << dbeginl << std::hex << pthread_self() << std::dec << " journal "
 
 
 int FileJournal::_open(bool forwrite, bool create)
index c64aaf4c0e67b0d5f2124118026dfc3b2f53978d..eeac8db53bc556d707c2b98405a45d191ffe5eb7 100644 (file)
@@ -62,7 +62,7 @@
 
 #define DOUT_SUBSYS filestore
 #undef dout_prefix
-#define dout_prefix *_dout << dbeginl << pthread_self() << " filestore(" << basedir << ") "
+#define dout_prefix *_dout << dbeginl << std::hex << pthread_self() << std::dec << " filestore(" << basedir << ") "
 
 #include "include/buffer.h"
 
index 63ef4d9cdd3fd6ea0349f2a113644ae0e5a52401..e2d3add6a16fe35c4723d6adcfd74621988d6bd8 100644 (file)
@@ -99,7 +99,7 @@
 #define dout_prefix _prefix(*_dout, whoami, osdmap)
 
 static ostream& _prefix(ostream& out, int whoami, OSDMap *osdmap) {
-  return out << dbeginl << pthread_self()
+  return out << dbeginl << std::hex << pthread_self() << std::dec
             << " osd" << whoami << " " << (osdmap ? osdmap->get_epoch():0) << " ";
 }
 
index ec67aa5cfc743a16adef106a6d774e19ebf066e2..d4898bbf6d0ad3fa37f73713066feb25e68c36c7 100644 (file)
@@ -36,7 +36,7 @@
 #undef dout_prefix
 #define dout_prefix _prefix(this, osd->whoami, osd->osdmap)
 static ostream& _prefix(PG *pg, int whoami, OSDMap *osdmap) {
-  return *_dout << dbeginl<< pthread_self() << " osd" << whoami << " " << (osdmap ? osdmap->get_epoch():0) << " " << *pg << " ";
+  return *_dout << dbeginl<< std::hex << pthread_self() << std::dec << " osd" << whoami << " " << (osdmap ? osdmap->get_epoch():0) << " " << *pg << " ";
 }
 
 
index 1ca57352f6d4bc747a84da3f2a90378c946e1931..9f49a6fb30cbf3670a7f44a7334790b9f7554c3c 100644 (file)
@@ -28,7 +28,7 @@
 #undef dout_prefix
 #define dout_prefix _prefix(this, osd->whoami, osd->osdmap)
 static ostream& _prefix(PG *pg, int whoami, OSDMap *osdmap) {
-  return *_dout << dbeginl << pthread_self()
+  return *_dout << dbeginl << std::hex << pthread_self() << std::dec
                << " osd" << whoami 
                << " " << (osdmap ? osdmap->get_epoch():0) << " "
                << *pg << " ";
index 91854cbd850e4e80e563ac2eb1850511f5d05c5b..c1c0e0fef6d972cd45f8e5aac025089452fe1b48 100644 (file)
@@ -38,7 +38,7 @@
 #undef dout_prefix
 #define dout_prefix _prefix(this, osd->whoami, osd->osdmap)
 static ostream& _prefix(PG *pg, int whoami, OSDMap *osdmap) {
-  return *_dout << dbeginl << pthread_self() << " osd" << whoami
+  return *_dout << dbeginl << std::hex << pthread_self() << std::dec << " osd" << whoami
                << " " << (osdmap ? osdmap->get_epoch():0) << " " << *pg << " ";
 }