offset += sizeof(uint32_t); /* id */
offset += lib_ring_buffer_align(offset, ltt_alignof(uint64_t));
offset += sizeof(uint64_t); /* timestamp */
-
}
break;
default:
}
offset += ctx_get_size(offset, event->ctx);
offset += ctx_get_size(offset, ltt_chan->ctx);
- offset += ctx_get_size(offset, ltt_chan->session->ctx);
*pre_header_padding = padding;
return offset - orig_offset;
case 2: /* large */
{
uint32_t timestamp = (uint32_t) ctx->tsc;
+ uint16_t id = event_id;
- lib_ring_buffer_write(config, ctx, &event_id, sizeof(event_id));
+ lib_ring_buffer_write(config, ctx, &id, sizeof(id));
lib_ring_buffer_align_ctx(ctx, ltt_alignof(uint32_t));
lib_ring_buffer_write(config, ctx, ×tamp, sizeof(timestamp));
break;
ctx_record(ctx, ltt_chan, event->ctx);
ctx_record(ctx, ltt_chan, ltt_chan->ctx);
- ctx_record(ctx, ltt_chan, ltt_chan->session->ctx);
return;
{
if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTT_RFLAG_EXTENDED))) {
uint32_t timestamp = (uint32_t) ctx->tsc;
+ uint16_t id = event_id;
- lib_ring_buffer_write(config, ctx, &event_id, sizeof(event_id));
+ lib_ring_buffer_write(config, ctx, &id, sizeof(id));
lib_ring_buffer_align_ctx(ctx, ltt_alignof(uint32_t));
lib_ring_buffer_write(config, ctx, ×tamp, sizeof(timestamp));
} else {
}
ctx_record(ctx, ltt_chan, event->ctx);
ctx_record(ctx, ltt_chan, ltt_chan->ctx);
- ctx_record(ctx, ltt_chan, ltt_chan->session->ctx);
}
static const struct lib_ring_buffer_config client_config;
void ltt_buffer_read_close(struct lib_ring_buffer *buf)
{
lib_ring_buffer_release_read(buf);
-
}
static
}
static
-wait_queue_head_t *ltt_get_reader_wait_queue(struct ltt_channel *chan)
+wait_queue_head_t *ltt_get_reader_wait_queue(struct channel *chan)
+{
+ return &chan->read_wait;
+}
+
+static
+wait_queue_head_t *ltt_get_hp_wait_queue(struct channel *chan)
+{
+ return &chan->hp_wait;
+}
+
+static
+int ltt_is_finalized(struct channel *chan)
+{
+ return lib_ring_buffer_channel_is_finalized(chan);
+}
+
+static
+int ltt_is_disabled(struct channel *chan)
{
- return &chan->chan->read_wait;
+ return lib_ring_buffer_channel_is_disabled(chan);
}
static struct ltt_transport ltt_relay_transport = {
.event_write = ltt_event_write,
.packet_avail_size = NULL, /* Would be racy anyway */
.get_reader_wait_queue = ltt_get_reader_wait_queue,
+ .get_hp_wait_queue = ltt_get_hp_wait_queue,
+ .is_finalized = ltt_is_finalized,
+ .is_disabled = ltt_is_disabled,
},
};