]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
lttng: Remove tracing-specfic local variables when lttng disabled
authorAdam Crume <adamcrume@gmail.com>
Mon, 18 Aug 2014 20:14:02 +0000 (13:14 -0700)
committerSage Weil <sage@redhat.com>
Thu, 21 Aug 2014 17:57:35 +0000 (10:57 -0700)
Signed-off-by: Adam Crume <adamcrume@gmail.com>
src/os/FileStore.cc
src/osd/OSD.cc
src/osd/OpRequest.cc
src/osd/PG.cc
src/osd/ReplicatedPG.cc

index afda6192a1d07d2c3eb33c75a86c59427270d803..511dc4d1e2df67d3107746af594222f6f3496b43 100644 (file)
@@ -2219,7 +2219,9 @@ unsigned FileStore::_do_transaction(
 {
   dout(10) << "_do_transaction on " << &t << dendl;
 
+#ifdef WITH_LTTNG
   const char *osr_name = t.get_osr() ? ((OpSequencer*)t.get_osr())->get_name().c_str() : "<NULL>";
+#endif
 
   Transaction::iterator i = t.begin();
   
@@ -4469,7 +4471,7 @@ bool FileStore::collection_empty(coll_t c)
   }
   bool ret = ls.empty();
   tracepoint(objectstore, collection_empty_exit, ret);
-  return ls.empty();
+  return ret;
 }
 
 int FileStore::collection_list_range(coll_t c, ghobject_t start, ghobject_t end,
index 9a5c15e899982af6d4753bd44b73f4e5f6ab866a..1171b7072d8da08ff88b60044a35fe5ed3c9cbab 100644 (file)
@@ -5531,7 +5531,9 @@ void OSD::ms_fast_dispatch(Message *m)
   }
   OpRequestRef op = op_tracker.create_request<OpRequest>(m);
   {
+#ifdef WITH_LTTNG
     osd_reqid_t reqid = op->get_reqid();
+#endif
     tracepoint(osd, ms_fast_dispatch, reqid.name._type,
         reqid.name._num, reqid.tid, reqid.inc);
   }
@@ -8291,7 +8293,9 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb )
   // osd:opwq_process marks the point at which an operation has been dequeued
   // and will begin to be handled by a worker thread.
   {
+#ifdef WITH_LTTNG
     osd_reqid_t reqid = op->get_reqid();
+#endif
     tracepoint(osd, opwq_process_start, reqid.name._type,
         reqid.name._num, reqid.tid, reqid.inc);
   }
@@ -8308,7 +8312,9 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb )
   osd->dequeue_op(item.first, op, tp_handle);
 
   {
+#ifdef WITH_LTTNG
     osd_reqid_t reqid = op->get_reqid();
+#endif
     tracepoint(osd, opwq_process_finish, reqid.name._type,
         reqid.name._num, reqid.tid, reqid.inc);
   }
index d45de6f028623b84eb2383bb35e8722a5cd1b639..8193556312e84ac530266ec34633e308d39733c2 100644 (file)
@@ -94,7 +94,9 @@ bool OpRequest::need_class_write_cap() {
 }
 
 void OpRequest::set_rmw_flags(int flags) {
+#ifdef WITH_LTTNG
   int old_rmw_flags = rmw_flags;
+#endif
   rmw_flags |= flags;
   tracepoint(oprequest, set_rmw_flags, reqid.name._type,
             reqid.name._num, reqid.tid, reqid.inc,
@@ -109,7 +111,9 @@ void OpRequest::set_pg_op() { set_rmw_flags(CEPH_OSD_RMW_FLAG_PGOP); }
 void OpRequest::set_cache() { set_rmw_flags(CEPH_OSD_RMW_FLAG_CACHE); }
 
 void OpRequest::mark_flag_point(uint8_t flag, string s) {
+#ifdef WITH_LTTNG
   uint8_t old_flags = hit_flag_points;
+#endif
   mark_event(s);
   current = s;
   hit_flag_points |= flag;
index 7e4883382c9a95daf12be8b7bff3e35aac08468f..902335ac6e72fbd6c5ab3c1db466d07e5755c9b9 100644 (file)
@@ -1727,7 +1727,9 @@ void PG::queue_op(OpRequestRef& op)
   osd->op_wq.queue(make_pair(PGRef(this), op));
   {
     // after queue() to include any locking costs
+#ifdef WITH_LTTNG
     osd_reqid_t reqid = op->get_reqid();
+#endif
     tracepoint(pg, queue_op, reqid.name._type,
         reqid.name._num, reqid.tid, reqid.inc, op->rmw_flags);
   }
index 0b17d609cc4e4af7f55218fd33e66e07f8ab4136..3e283cc3fdbbd653e409db3d17af2f77d3c853f2 100644 (file)
@@ -1846,7 +1846,9 @@ void ReplicatedPG::execute_ctx(OpContext *ctx)
   }
 
   {
+#ifdef WITH_LTTNG
     osd_reqid_t reqid = ctx->op->get_reqid();
+#endif
     tracepoint(osd, prepare_tx_enter, reqid.name._type,
         reqid.name._num, reqid.tid, reqid.inc);
   }
@@ -1854,7 +1856,9 @@ void ReplicatedPG::execute_ctx(OpContext *ctx)
   int result = prepare_transaction(ctx);
 
   {
+#ifdef WITH_LTTNG
     osd_reqid_t reqid = ctx->op->get_reqid();
+#endif
     tracepoint(osd, prepare_tx_exit, reqid.name._type,
         reqid.name._num, reqid.tid, reqid.inc);
   }