projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update comment
[lttng-ust.git]
/
libringbuffer
/
ring_buffer_frontend.c
diff --git
a/libringbuffer/ring_buffer_frontend.c
b/libringbuffer/ring_buffer_frontend.c
index fdb4bdfcc9b4f0a289a2dac09facd5aefdb501a9..f8c106c6eb12f372f723e98668fdd10cd3bce625 100644
(file)
--- a/
libringbuffer/ring_buffer_frontend.c
+++ b/
libringbuffer/ring_buffer_frontend.c
@@
-175,7
+175,6
@@
int lib_ring_buffer_create(struct lttng_ust_lib_ring_buffer *buf,
const struct lttng_ust_lib_ring_buffer_config *config = &chanb->config;
struct channel *chan = caa_container_of(chanb, struct channel, backend);
void *priv = channel_get_private(chan);
const struct lttng_ust_lib_ring_buffer_config *config = &chanb->config;
struct channel *chan = caa_container_of(chanb, struct channel, backend);
void *priv = channel_get_private(chan);
- unsigned int num_subbuf;
size_t subbuf_header_size;
u64 tsc;
int ret;
size_t subbuf_header_size;
u64 tsc;
int ret;
@@
-207,9
+206,6
@@
int lib_ring_buffer_create(struct lttng_ust_lib_ring_buffer *buf,
goto free_commit;
}
goto free_commit;
}
- num_subbuf = chan->backend.num_subbuf;
- //init_waitqueue_head(&buf->read_wait);
-
/*
* Write the subbuffer header for first subbuffer so we know the total
* duration of data gathering.
/*
* Write the subbuffer header for first subbuffer so we know the total
* duration of data gathering.
@@
-411,6
+407,7
@@
static void channel_free(struct channel *chan, struct lttng_ust_shm_handle *hand
* @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.
* @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.
* @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.
@@
-429,6
+426,7
@@
struct lttng_ust_shm_handle *channel_create(const struct lttng_ust_lib_ring_buff
void **priv_data,
size_t priv_data_align,
size_t priv_data_size,
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,
void *buf_addr, size_t subbuf_size,
size_t num_subbuf, unsigned int switch_timer_interval,
unsigned int read_timer_interval,
@@
-486,6
+484,7
@@
struct lttng_ust_shm_handle *channel_create(const struct lttng_ust_lib_ring_buff
if (!shmp(handle, priv_data_alloc))
goto error_append;
*priv_data = channel_get_private(chan);
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;
} else {
chan->priv_data_offset = -1;
*priv_data = NULL;
@@
-970,7
+969,7
@@
void lib_ring_buffer_print_subbuffer_errors(struct lttng_ust_lib_ring_buffer *bu
commit_count_sb = v_read(config, &shmp_index(handle, buf->commit_cold, cons_idx)->cc_sb);
if (subbuf_offset(commit_count, chan) != 0)
commit_count_sb = v_read(config, &shmp_index(handle, buf->commit_cold, cons_idx)->cc_sb);
if (subbuf_offset(commit_count, chan) != 0)
-
ERRMS
G("ring buffer %s, cpu %d: "
+
DB
G("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",
"commit count in subbuffer %lu,\n"
"expecting multiples of %lu bytes\n"
" [ %lu bytes committed, %lu bytes reader-visible ]\n",
@@
-978,7
+977,7
@@
void lib_ring_buffer_print_subbuffer_errors(struct lttng_ust_lib_ring_buffer *bu
chan->backend.subbuf_size,
commit_count, commit_count_sb);
chan->backend.subbuf_size,
commit_count, commit_count_sb);
-
ERRMS
G("ring buffer: %s, cpu %d: %lu bytes committed\n",
+
DB
G("ring buffer: %s, cpu %d: %lu bytes committed\n",
chan->backend.name, cpu, commit_count);
}
chan->backend.name, cpu, commit_count);
}
@@
-1005,7
+1004,7
@@
void lib_ring_buffer_print_buffer_errors(struct lttng_ust_lib_ring_buffer *buf,
write_offset = v_read(config, &buf->offset);
cons_offset = uatomic_read(&buf->consumed);
if (write_offset != cons_offset)
write_offset = v_read(config, &buf->offset);
cons_offset = uatomic_read(&buf->consumed);
if (write_offset != cons_offset)
-
ERRMS
G("ring buffer %s, cpu %d: "
+
DB
G("ring buffer %s, cpu %d: "
"non-consumed data\n"
" [ %lu bytes written, %lu bytes read ]\n",
chan->backend.name, cpu, write_offset, cons_offset);
"non-consumed data\n"
" [ %lu bytes written, %lu bytes read ]\n",
chan->backend.name, cpu, write_offset, cons_offset);
@@
-1027,7
+1026,7
@@
void lib_ring_buffer_print_errors(struct channel *chan,
const struct lttng_ust_lib_ring_buffer_config *config = &chan->backend.config;
void *priv = channel_get_private(chan);
const struct lttng_ust_lib_ring_buffer_config *config = &chan->backend.config;
void *priv = channel_get_private(chan);
-
ERRMS
G("ring buffer %s, cpu %d: %lu records written, "
+
DB
G("ring buffer %s, cpu %d: %lu records written, "
"%lu records overrun\n",
chan->backend.name, cpu,
v_read(config, &buf->records_count),
"%lu records overrun\n",
chan->backend.name, cpu,
v_read(config, &buf->records_count),
@@
-1036,7
+1035,7
@@
void lib_ring_buffer_print_errors(struct channel *chan,
if (v_read(config, &buf->records_lost_full)
|| v_read(config, &buf->records_lost_wrap)
|| v_read(config, &buf->records_lost_big))
if (v_read(config, &buf->records_lost_full)
|| v_read(config, &buf->records_lost_wrap)
|| v_read(config, &buf->records_lost_big))
-
ERRMS
G("ring buffer %s, cpu %d: records were lost. Caused by:\n"
+
DB
G("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,
" [ %lu buffer full, %lu nest buffer wrap-around, "
"%lu event too big ]\n",
chan->backend.name, cpu,
This page took
0.030515 seconds
and
4
git commands to generate.