- header.id_time = 0;
- }
-
- header.id_time |= (u32)ctx->tsc & LTT_TSC_MASK;
- lib_ring_buffer_write(config, ctx, &header, sizeof(header));
-
- switch (ctx->rflags) {
- case LTT_RFLAG_ID_SIZE_TSC:
- small_size = (u16)min_t(u32, event_size, LTT_MAX_SMALL_SIZE);
- lib_ring_buffer_write(config, ctx, &eID, sizeof(u16));
- lib_ring_buffer_write(config, ctx, &small_size, sizeof(u16));
- if (small_size == LTT_MAX_SMALL_SIZE)
- lib_ring_buffer_write(config, ctx, &event_size,
- sizeof(u32));
- lib_ring_buffer_align_ctx(ctx, sizeof(u64));
- lib_ring_buffer_write(config, ctx, &ctx->tsc, sizeof(u64));
- break;
- case LTT_RFLAG_ID_SIZE:
- small_size = (u16)min_t(u32, event_size, LTT_MAX_SMALL_SIZE);
- lib_ring_buffer_write(config, ctx, &eID, sizeof(u16));
- lib_ring_buffer_write(config, ctx, &small_size, sizeof(u16));
- if (small_size == LTT_MAX_SMALL_SIZE)
- lib_ring_buffer_write(config, ctx, &event_size,
- sizeof(u32));
- break;
- case LTT_RFLAG_ID:
- lib_ring_buffer_write(config, ctx, &eID, sizeof(u16));
- break;