* @name: name of the channel
* @priv_data: ring buffer client private data area pointer (output)
* @priv_data_size: length, in bytes, of the private data area.
+ * @priv_data_init: initialization data for private data.
* @buf_addr: pointer the the beginning of the preallocated buffer contiguous
* address mapping. It is used only by RING_BUFFER_STATIC
* configuration. It can be set to NULL for other backends.
void **priv_data,
size_t priv_data_align,
size_t priv_data_size,
+ void *priv_data_init,
void *buf_addr, size_t subbuf_size,
size_t num_subbuf, unsigned int switch_timer_interval,
unsigned int read_timer_interval,
if (!shmp(handle, priv_data_alloc))
goto error_append;
*priv_data = channel_get_private(chan);
+ memcpy(*priv_data, priv_data_init, priv_data_size);
} else {
chan->priv_data_offset = -1;
*priv_data = NULL;
commit_count_sb = v_read(config, &shmp_index(handle, buf->commit_cold, cons_idx)->cc_sb);
if (subbuf_offset(commit_count, chan) != 0)
- ERRMSG("ring buffer %s, cpu %d: "
+ DBG("ring buffer %s, cpu %d: "
"commit count in subbuffer %lu,\n"
"expecting multiples of %lu bytes\n"
" [ %lu bytes committed, %lu bytes reader-visible ]\n",
chan->backend.subbuf_size,
commit_count, commit_count_sb);
- ERRMSG("ring buffer: %s, cpu %d: %lu bytes committed\n",
+ DBG("ring buffer: %s, cpu %d: %lu bytes committed\n",
chan->backend.name, cpu, commit_count);
}
write_offset = v_read(config, &buf->offset);
cons_offset = uatomic_read(&buf->consumed);
if (write_offset != cons_offset)
- ERRMSG("ring buffer %s, cpu %d: "
+ DBG("ring buffer %s, cpu %d: "
"non-consumed data\n"
" [ %lu bytes written, %lu bytes read ]\n",
chan->backend.name, cpu, write_offset, cons_offset);
const struct lttng_ust_lib_ring_buffer_config *config = &chan->backend.config;
void *priv = channel_get_private(chan);
- ERRMSG("ring buffer %s, cpu %d: %lu records written, "
+ DBG("ring buffer %s, cpu %d: %lu records written, "
"%lu records overrun\n",
chan->backend.name, cpu,
v_read(config, &buf->records_count),
if (v_read(config, &buf->records_lost_full)
|| v_read(config, &buf->records_lost_wrap)
|| v_read(config, &buf->records_lost_big))
- ERRMSG("ring buffer %s, cpu %d: records were lost. Caused by:\n"
+ DBG("ring buffer %s, cpu %d: records were lost. Caused by:\n"
" [ %lu buffer full, %lu nest buffer wrap-around, "
"%lu event too big ]\n",
chan->backend.name, cpu,