mirror of
https://github.com/ceph/ceph
synced 2025-02-24 03:27:10 +00:00
dout: print thread id hex (to match up with gdb)
This commit is contained in:
parent
69d9e87793
commit
b645e20a50
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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) << " ";
|
||||
}
|
||||
|
||||
|
@ -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 << " ";
|
||||
}
|
||||
|
||||
|
||||
|
@ -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 << " ";
|
||||
|
@ -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 << " ";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user