]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async: only call OID_EVENT when WTIH_EVENTRACE define.
authorJianpeng Ma <jianpeng.ma@intel.com>
Tue, 19 Feb 2019 07:10:24 +0000 (15:10 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Thu, 21 Mar 2019 02:02:53 +0000 (10:02 +0800)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/msg/async/AsyncConnection.cc
src/msg/async/AsyncMessenger.cc
src/msg/async/ProtocolV1.cc
src/msg/async/ProtocolV2.cc

index 91ea1f6c82786b03039ae13ffce927158fb810f2..c73b14e2171397c3e1109c7084b1e2a399140e85 100644 (file)
@@ -511,10 +511,12 @@ int AsyncConnection::send_message(Message *m)
   m->get_header().src = async_msgr->get_myname();
   m->set_connection(this);
 
+#if defined(WITH_LTTNG) && defined(WITH_EVENTTRACE)
   if (m->get_type() == CEPH_MSG_OSD_OP)
     OID_EVENT_TRACE_WITH_MSG(m, "SEND_MSG_OSD_OP_BEGIN", true);
   else if (m->get_type() == CEPH_MSG_OSD_OPREPLY)
     OID_EVENT_TRACE_WITH_MSG(m, "SEND_MSG_OSD_OPREPLY_BEGIN", true);
+#endif
 
   if (async_msgr->get_myaddrs() == get_peer_addrs()) { //loopback connection
     ldout(async_msgr->cct, 20) << __func__ << " " << *m << " local" << dendl;
index f6bcaa9b794eac33d001b89b96152b948471d98b..8ca54d10aa84c9ad8b3325283f598e0feedddac5 100644 (file)
@@ -644,10 +644,12 @@ int AsyncMessenger::send_to(Message *m, int type, const entity_addrvec_t& addrs)
   FUNCTRACE(cct);
   ceph_assert(m);
 
+#if defined(WITH_LTTNG) && defined(WITH_EVENTTRACE)
   if (m->get_type() == CEPH_MSG_OSD_OP)
     OID_EVENT_TRACE(((MOSDOp *)m)->get_oid().name.c_str(), "SEND_MSG_OSD_OP");
   else if (m->get_type() == CEPH_MSG_OSD_OPREPLY)
     OID_EVENT_TRACE(((MOSDOpReply *)m)->get_oid().name.c_str(), "SEND_MSG_OSD_OP_REPLY");
+#endif
 
   ldout(cct, 1) << __func__ << "--> " << ceph_entity_type_name(type) << " "
       << addrs << " -- " << *m << " -- ?+"
index 5bc5084c035a8c95c1fd6bb41de47f99c5c2263c..d41329bd9fdd83b29757d5ca721d596ba6d362ee 100644 (file)
@@ -1167,10 +1167,13 @@ ssize_t ProtocolV1::write_message(Message *m, bufferlist &bl, bool more) {
     ldout(cct, 10) << __func__ << " sending " << m
                    << (rc ? " continuely." : " done.") << dendl;
   }
+
+#if defined(WITH_LTTNG) && defined(WITH_EVENTTRACE)
   if (m->get_type() == CEPH_MSG_OSD_OP)
     OID_EVENT_TRACE_WITH_MSG(m, "SEND_MSG_OSD_OP_END", false);
   else if (m->get_type() == CEPH_MSG_OSD_OPREPLY)
     OID_EVENT_TRACE_WITH_MSG(m, "SEND_MSG_OSD_OPREPLY_END", false);
+#endif
   m->put();
 
   return rc;
index 46503495084b7ef309cd1f5e77120f0f3cb3e5a8..9fe753c2269e83b22e201bbc9e85489c41d29f0b 100644 (file)
@@ -533,10 +533,13 @@ ssize_t ProtocolV2::write_message(Message *m, bool more) {
     ldout(cct, 10) << __func__ << " sending " << m
                    << (rc ? " continuely." : " done.") << dendl;
   }
+
+#if defined(WITH_LTTNG) && defined(WITH_EVENTTRACE)
   if (m->get_type() == CEPH_MSG_OSD_OP)
     OID_EVENT_TRACE_WITH_MSG(m, "SEND_MSG_OSD_OP_END", false);
   else if (m->get_type() == CEPH_MSG_OSD_OPREPLY)
     OID_EVENT_TRACE_WITH_MSG(m, "SEND_MSG_OSD_OPREPLY_END", false);
+#endif
   m->put();
 
   return rc;