Don't call the noop version of ltt_write_commit_counter
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 15 Feb 2010 05:20:06 +0000 (00:20 -0500)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 15 Feb 2010 05:40:37 +0000 (00:40 -0500)
libust/buffers.c
libust/buffers.h

index 02eaec61b03defe0995c525b407bbc023ea1c4ef..849cad7ad9326031cf7a42ef0a086f60d8b3300b 100644 (file)
@@ -1359,7 +1359,7 @@ static void ltt_reserve_switch_old_subbuf(
                  &buf->commit_count[oldidx].cc);
        commit_count = local_read(&buf->commit_count[oldidx].cc);
        ltt_check_deliver(chan, buf, offsets->old - 1, commit_count, oldidx);
-       ltt_write_commit_counter(buf, oldidx,
+       ltt_write_commit_counter(chan, buf, oldidx,
                offsets->old, commit_count, padding_size);
 }
 
@@ -1390,7 +1390,7 @@ static void ltt_reserve_switch_new_subbuf(
        commit_count = local_read(&buf->commit_count[beginidx].cc);
        /* Check if the written buffer has to be delivered */
        ltt_check_deliver(chan, buf, offsets->begin, commit_count, beginidx);
-       ltt_write_commit_counter(buf, beginidx,
+       ltt_write_commit_counter(chan, buf, beginidx,
                offsets->begin, commit_count, ltt_subbuffer_header_size());
 }
 
@@ -1436,7 +1436,7 @@ static void ltt_reserve_end_switch_current(
        commit_count = local_read(&buf->commit_count[endidx].cc);
        ltt_check_deliver(chan, buf,
                offsets->end - 1, commit_count, endidx);
-       ltt_write_commit_counter(buf, endidx,
+       ltt_write_commit_counter(chan, buf, endidx,
                offsets->end, commit_count, padding_size);
 }
 
index 951c9b01bddf64432a543a9ab0d0321e4e8516b7..28faad79551ab8a0839c2be043875a7246a71cf8 100644 (file)
@@ -417,10 +417,10 @@ static __inline__ void ltt_force_switch(struct ust_buffer *buf,
  * commit count reaches back the reserve offset (module subbuffer size). It is
  * useful for crash dump.
  */
-#ifdef CONFIG_LTT_VMCORE
-static __inline__ void ltt_write_commit_counter(struct rchan_buf *buf,
-               struct ltt_channel_buf_struct *ltt_buf,
-               long idx, long buf_offset, long commit_count, size_t data_size)
+//ust// #ifdef CONFIG_LTT_VMCORE
+static __inline__ void ltt_write_commit_counter(struct ust_channel *chan,
+               struct ust_buffer *buf, long idx, long buf_offset,
+               long commit_count, size_t data_size)
 {
        long offset;
        long commit_seq_old;
@@ -436,17 +436,19 @@ static __inline__ void ltt_write_commit_counter(struct rchan_buf *buf,
        if (unlikely(SUBBUF_OFFSET(offset - commit_count, buf->chan)))
                return;
 
-       commit_seq_old = local_read(&ltt_buf->commit_seq[idx]);
+       commit_seq_old = local_read(&buf->commit_seq[idx]);
        while (commit_seq_old < commit_count)
-               commit_seq_old = local_cmpxchg(&ltt_buf->commit_seq[idx],
+               commit_seq_old = local_cmpxchg(&buf->commit_seq[idx],
                                         commit_seq_old, commit_count);
+
+       DBG("commit_seq for channel %s_%d, subbuf %ld is now %ld", buf->chan->channel_name, buf->cpu, idx, commit_count);
 }
-#else
-static __inline__ void ltt_write_commit_counter(struct ust_buffer *buf,
-               long idx, long buf_offset, long commit_count, size_t data_size)
-{
-}
-#endif
+//ust// #else
+//ust// static __inline__ void ltt_write_commit_counter(struct ust_buffer *buf,
+//ust//                long idx, long buf_offset, long commit_count, size_t data_size)
+//ust// {
+//ust// }
+//ust// #endif
 
 /*
  * Atomic unordered slot commit. Increments the commit count in the
@@ -504,7 +506,7 @@ static __inline__ void ltt_commit_slot(
         * Update data_size for each commit. It's needed only for extracting
         * ltt buffers from vmcore, after crash.
         */
-       ltt_write_commit_counter(buf, endidx, buf_offset, commit_count, data_size);
+       ltt_write_commit_counter(chan, buf, endidx, buf_offset, commit_count, data_size);
 }
 
 void _ust_buffers_write(struct ust_buffer *buf, size_t offset,
This page took 0.0261 seconds and 4 git commands to generate.