X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=libust%2Fbuffers.c;h=206d5e7404f75a793ae3ae949dcdf23c6081022b;hb=719569e4967369c8a2e952346250f3bf97fec5f4;hp=a36453dbb1a45e171eaccab01e7f5e746d0bec71;hpb=02af3e607f471e9fcfe7ea6902cab56efb4c4516;p=lttng-ust.git diff --git a/libust/buffers.c b/libust/buffers.c index a36453db..206d5e74 100644 --- a/libust/buffers.c +++ b/libust/buffers.c @@ -331,6 +331,9 @@ static notrace void ltt_buffer_end(struct ust_buffer *buf, header->cycle_count_end = tsc; header->events_lost = local_read(&buf->events_lost); header->subbuf_corrupt = local_read(&buf->corrupted_subbuffers); + if(unlikely(header->events_lost > 0)) { + DBG("Some events (%d) were lost in %s_%d", header->events_lost, buf->chan->channel_name, buf->cpu); + } } /* @@ -1359,7 +1362,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 +1393,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 +1439,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); } @@ -1521,6 +1524,7 @@ void ltt_force_switch_lockless_slow(struct ust_buffer *buf, offsets.size = 0; + DBG("Switching (forced) %s_%d", chan->channel_name, buf->cpu); /* * Perform retryable operations. */ @@ -1738,6 +1742,7 @@ int ltt_reserve_slot_lockless_slow(struct ust_trace *trace, if (unlikely(offsets.end_switch_old)) { //ust// ltt_clear_noref_flag(chan, buf, SUBBUF_INDEX(offsets.old - 1, chan)); ltt_reserve_switch_old_subbuf(chan, buf, &offsets, tsc); + DBG("Switching %s_%d", chan->channel_name, cpu); } /*