Fix large event header event id
[lttng-modules.git] / ltt-ring-buffer-client.h
index 8095eb6e73abf53a242abafc424559f7ddb3f54a..1c9308e04f7151e9d38db7aeb83609bdca8c51c3 100644 (file)
@@ -134,7 +134,6 @@ unsigned char record_header_size(const struct lib_ring_buffer_config *config,
                        offset += sizeof(uint32_t);     /* id */
                        offset += lib_ring_buffer_align(offset, ltt_alignof(uint64_t));
                        offset += sizeof(uint64_t);     /* timestamp */
-                       
                }
                break;
        default:
@@ -142,7 +141,6 @@ unsigned char record_header_size(const struct lib_ring_buffer_config *config,
        }
        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;
@@ -188,8 +186,9 @@ void ltt_write_event_header(const struct lib_ring_buffer_config *config,
        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, &timestamp, sizeof(timestamp));
                break;
@@ -200,7 +199,6 @@ void ltt_write_event_header(const struct lib_ring_buffer_config *config,
 
        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;
 
@@ -240,8 +238,9 @@ void ltt_write_event_header_slow(const struct lib_ring_buffer_config *config,
        {
                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, &timestamp, sizeof(timestamp));
                } else {
@@ -262,7 +261,6 @@ void ltt_write_event_header_slow(const struct lib_ring_buffer_config *config,
        }
        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;
@@ -405,7 +403,6 @@ static
 void ltt_buffer_read_close(struct lib_ring_buffer *buf)
 {
        lib_ring_buffer_release_read(buf);
-       
 }
 
 static
This page took 0.026403 seconds and 4 git commands to generate.