subbuf_idx * buf->chan->subbuf_size);
header->cycle_count_begin = tsc;
- header->data_size = 0xFFFFFFFF; /* for debugging */
+ header->data_size = 0xFFFFFFFF; /* for recognizing crashed buffers */
+ header->sb_size = 0xFFFFFFFF; /* for recognizing crashed buffers */
+ /* FIXME: add memory barrier? */
ltt_write_trace_header(channel->trace, header);
}
&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);
}
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());
}
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);
}
offsets.size = 0;
+ DBG("Switching (forced) %s_%d", chan->channel_name, buf->cpu);
/*
* Perform retryable operations.
*/
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);
}
/*