dout: print thread id hex (to match up with gdb)

This commit is contained in:
Sage Weil 2010-01-26 13:37:35 -08:00
parent 69d9e87793
commit b645e20a50
12 changed files with 15 additions and 15 deletions

View 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

View 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;

View 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()

View 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

View 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;

View 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

View 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)

View 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"

View 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) << " ";
}

View 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 << " ";
}

View 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 << " ";

View 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 << " ";
}