Skip to content

Commit

Permalink
Merge pull request #11205 from liewegas/wip-async-debug
Browse files Browse the repository at this point in the history
msg/async: less verbose debug messages at debug_ms=1

Reviewed-by: Haomai Wang <haomai@xsky.com>
  • Loading branch information
yuyuyu101 committed Sep 23, 2016
2 parents 8932056 + 71aa823 commit 4619bc0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
20 changes: 13 additions & 7 deletions src/msg/async/AsyncConnection.cc
Expand Up @@ -741,8 +741,9 @@ void AsyncConnection::process()

// note last received message.
in_seq.set(message->get_seq());
ldout(async_msgr->cct, 1) << " == rx == " << message->get_source() << " seq "
<< message->get_seq() << " " << message << " " << *message << dendl;
ldout(async_msgr->cct, 5) << " rx " << message->get_source() << " seq "
<< message->get_seq() << " " << message
<< " " << *message << dendl;

ack_left.inc();
// if send_message always send inline, it may have no
Expand Down Expand Up @@ -1851,7 +1852,12 @@ void AsyncConnection::accept(ConnectedSocket socket, entity_addr_t &addr)

int AsyncConnection::send_message(Message *m)
{
ldout(async_msgr->cct, 1) << " == tx == " << m << " " << *m << dendl;
lgeneric_subdout(async_msgr->cct, ms,
1) << "-- " << async_msgr->get_myaddr() << " --> "
<< get_peer_addr() << " -- "
<< *m << " -- " << m << " con "
<< m->get_connection().get()
<< dendl;

// optimistic think it's ok to encode(actually may broken now)
if (!m->get_priority())
Expand Down Expand Up @@ -2104,7 +2110,7 @@ void AsyncConnection::_stop()
if (delay_state)
delay_state->flush();

ldout(async_msgr->cct, 1) << __func__ << dendl;
ldout(async_msgr->cct, 2) << __func__ << dendl;
std::lock_guard<std::mutex> l(write_lock);

reset_recv_state();
Expand Down Expand Up @@ -2348,7 +2354,7 @@ void AsyncConnection::DelayedDelivery::flush() {

void AsyncConnection::send_keepalive()
{
ldout(async_msgr->cct, 10) << __func__ << " started." << dendl;
ldout(async_msgr->cct, 10) << __func__ << dendl;
std::lock_guard<std::mutex> l(write_lock);
if (can_write != WriteStatus::CLOSED) {
keepalive = true;
Expand All @@ -2358,7 +2364,7 @@ void AsyncConnection::send_keepalive()

void AsyncConnection::mark_down()
{
ldout(async_msgr->cct, 1) << __func__ << " started." << dendl;
ldout(async_msgr->cct, 1) << __func__ << dendl;
std::lock_guard<std::mutex> l(lock);
_stop();
}
Expand Down Expand Up @@ -2386,7 +2392,7 @@ void AsyncConnection::_send_keepalive_or_ack(bool ack, utime_t *tp)

void AsyncConnection::handle_write()
{
ldout(async_msgr->cct, 10) << __func__ << " started." << dendl;
ldout(async_msgr->cct, 10) << __func__ << dendl;
ssize_t r = 0;

write_lock.lock();
Expand Down
4 changes: 2 additions & 2 deletions src/msg/async/Event.cc
Expand Up @@ -136,7 +136,7 @@ EventCenter::~EventCenter()
void EventCenter::set_owner()
{
owner = pthread_self();
ldout(cct, 1) << __func__ << " idx=" << idx << " owner=" << owner << dendl;
ldout(cct, 2) << __func__ << " idx=" << idx << " owner=" << owner << dendl;
if (!global_centers) {
cct->lookup_or_create_singleton_object<EventCenter::AssociatedCenters>(
global_centers, "AsyncMessenger::EventCenter::global_center");
Expand Down Expand Up @@ -261,7 +261,7 @@ void EventCenter::delete_time_event(uint64_t id)

void EventCenter::wakeup()
{
ldout(cct, 1) << __func__ << dendl;
ldout(cct, 2) << __func__ << dendl;

char buf = 'c';
// wake up "event_wait"
Expand Down

0 comments on commit 4619bc0

Please sign in to comment.