Fix metadata header
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 22 May 2011 04:56:10 +0000 (00:56 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 22 May 2011 04:56:10 +0000 (00:56 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
ltt-events.c
ltt-ring-buffer-client.h

index 8a6f8e9930fa24acb27bb2fee4a7d2534fc8ccad..71fb8c70cdf99945534118674268fa77046dd0e7 100644 (file)
@@ -169,12 +169,12 @@ struct ltt_channel *ltt_channel_create(struct ltt_session *session,
                goto nomem;
        chan->session = session;
        init_waitqueue_head(&chan->notify_wait);
+       chan->id = session->free_chan_id++;
        chan->chan = transport->ops.channel_create("[lttng]", chan, buf_addr,
                        subbuf_size, num_subbuf, switch_timer_interval,
                        read_timer_interval);
        if (!chan->chan)
                goto create_error;
-       chan->id = session->free_chan_id++;
        chan->ops = &transport->ops;
        list_add(&chan->list, &session->chan);
        mutex_unlock(&sessions_mutex);
index caf949cdc414659a4f164ca5987621a3ebb9d1fd..0177d48b6cfab82926dce3ccb0330879eea6647e 100644 (file)
@@ -304,8 +304,8 @@ static void client_buffer_end(struct lib_ring_buffer *buf, u64 tsc,
        unsigned long records_lost = 0;
 
        header->ctx.timestamp_end = tsc;
-       header->ctx.content_size = data_size;
-       header->ctx.packet_size = PAGE_ALIGN(data_size);
+       header->ctx.content_size = data_size * CHAR_BIT;        /* in bits */
+       header->ctx.packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */
        records_lost += lib_ring_buffer_get_records_lost_full(&client_config, buf);
        records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, buf);
        records_lost += lib_ring_buffer_get_records_lost_big(&client_config, buf);
This page took 0.02722 seconds and 4 git commands to generate.