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);
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);