projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: support VPATH build for tests
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
ust-app.c
diff --git
a/src/bin/lttng-sessiond/ust-app.c
b/src/bin/lttng-sessiond/ust-app.c
index 7e263a7636f9188f492131a0824b2b4b127f4a89..cf4b7ca772f467712f2f0d1c715ca98e77d8b353 100644
(file)
--- a/
src/bin/lttng-sessiond/ust-app.c
+++ b/
src/bin/lttng-sessiond/ust-app.c
@@
-364,6
+364,7
@@
void delete_ust_app_channel(int sock, struct ust_app_channel *ua_chan,
/* Wipe context */
cds_lfht_for_each_entry(ua_chan->ctx->ht, &iter.iter, ua_ctx, node.node) {
/* Wipe context */
cds_lfht_for_each_entry(ua_chan->ctx->ht, &iter.iter, ua_ctx, node.node) {
+ cds_list_del(&ua_ctx->list);
ret = lttng_ht_del(ua_chan->ctx, &iter);
assert(!ret);
delete_ust_app_ctx(sock, ua_ctx);
ret = lttng_ht_del(ua_chan->ctx, &iter);
assert(!ret);
delete_ust_app_ctx(sock, ua_ctx);
@@
-825,6
+826,7
@@
struct ust_app_channel *alloc_ust_app_channel(char *name,
lttng_ht_node_init_str(&ua_chan->node, ua_chan->name);
CDS_INIT_LIST_HEAD(&ua_chan->streams.head);
lttng_ht_node_init_str(&ua_chan->node, ua_chan->name);
CDS_INIT_LIST_HEAD(&ua_chan->streams.head);
+ CDS_INIT_LIST_HEAD(&ua_chan->ctx_list);
/* Copy attributes */
if (attr) {
/* Copy attributes */
if (attr) {
@@
-916,6
+918,8
@@
struct ust_app_ctx *alloc_ust_app_ctx(struct lttng_ust_context *uctx)
goto error;
}
goto error;
}
+ CDS_INIT_LIST_HEAD(&ua_ctx->list);
+
if (uctx) {
memcpy(&ua_ctx->ctx, uctx, sizeof(ua_ctx->ctx));
}
if (uctx) {
memcpy(&ua_ctx->ctx, uctx, sizeof(ua_ctx->ctx));
}
@@
-1395,7
+1399,7
@@
static void shadow_copy_channel(struct ust_app_channel *ua_chan,
ua_chan->enabled = uchan->enabled;
ua_chan->tracing_channel_id = uchan->id;
ua_chan->enabled = uchan->enabled;
ua_chan->tracing_channel_id = uchan->id;
- cds_l
fht_for_each_entry(uchan->ctx->ht, &iter.iter, uctx, node.node
) {
+ cds_l
ist_for_each_entry(uctx, &uchan->ctx_list, list
) {
ua_ctx = alloc_ust_app_ctx(&uctx->ctx);
if (ua_ctx == NULL) {
continue;
ua_ctx = alloc_ust_app_ctx(&uctx->ctx);
if (ua_ctx == NULL) {
continue;
@@
-1403,6
+1407,7
@@
static void shadow_copy_channel(struct ust_app_channel *ua_chan,
lttng_ht_node_init_ulong(&ua_ctx->node,
(unsigned long) ua_ctx->ctx.ctx);
lttng_ht_add_unique_ulong(ua_chan->ctx, &ua_ctx->node);
lttng_ht_node_init_ulong(&ua_ctx->node,
(unsigned long) ua_ctx->ctx.ctx);
lttng_ht_add_unique_ulong(ua_chan->ctx, &ua_ctx->node);
+ cds_list_add_tail(&ua_ctx->list, &ua_chan->ctx_list);
}
/* Copy all events from ltt ust channel to ust app channel */
}
/* Copy all events from ltt ust channel to ust app channel */
@@
-1795,6
+1800,7
@@
int create_ust_app_channel_context(struct ust_app_session *ua_sess,
lttng_ht_node_init_ulong(&ua_ctx->node, (unsigned long) ua_ctx->ctx.ctx);
lttng_ht_add_unique_ulong(ua_chan->ctx, &ua_ctx->node);
lttng_ht_node_init_ulong(&ua_ctx->node, (unsigned long) ua_ctx->ctx.ctx);
lttng_ht_add_unique_ulong(ua_chan->ctx, &ua_ctx->node);
+ cds_list_add_tail(&ua_ctx->list, &ua_chan->ctx_list);
ret = create_ust_channel_context(ua_chan, ua_ctx, app);
if (ret < 0) {
ret = create_ust_channel_context(ua_chan, ua_ctx, app);
if (ret < 0) {
@@
-4052,7
+4058,7
@@
int ust_app_destroy_trace_all(struct ltt_ust_session *usess)
void ust_app_global_update(struct ltt_ust_session *usess, int sock)
{
int ret = 0;
void ust_app_global_update(struct ltt_ust_session *usess, int sock)
{
int ret = 0;
- struct lttng_ht_iter iter, uiter
, iter_ctx
;
+ struct lttng_ht_iter iter, uiter;
struct ust_app *app;
struct ust_app_session *ua_sess = NULL;
struct ust_app_channel *ua_chan;
struct ust_app *app;
struct ust_app_session *ua_sess = NULL;
struct ust_app_channel *ua_chan;
@@
-4124,8
+4130,11
@@
void ust_app_global_update(struct ltt_ust_session *usess, int sock)
}
}
}
}
- cds_lfht_for_each_entry(ua_chan->ctx->ht, &iter_ctx.iter, ua_ctx,
- node.node) {
+ /*
+ * Add context using the list so they are enabled in the same order the
+ * user added them.
+ */
+ cds_list_for_each_entry(ua_ctx, &ua_chan->ctx_list, list) {
ret = create_ust_channel_context(ua_chan, ua_ctx, app);
if (ret < 0) {
goto error_unlock;
ret = create_ust_channel_context(ua_chan, ua_ctx, app);
if (ret < 0) {
goto error_unlock;
@@
-4655,7
+4664,8
@@
static int add_event_ust_registry(int sock, int sobjd, int cobjd, char *name,
*/
ret_code = ust_registry_create_event(registry, chan_reg_key,
sobjd, cobjd, name, sig, nr_fields, fields, loglevel,
*/
ret_code = ust_registry_create_event(registry, chan_reg_key,
sobjd, cobjd, name, sig, nr_fields, fields, loglevel,
- model_emf_uri, ua_sess->buffer_type, &event_id);
+ model_emf_uri, ua_sess->buffer_type, &event_id,
+ app);
/*
* The return value is returned to ustctl so in case of an error, the
/*
* The return value is returned to ustctl so in case of an error, the
@@
-4940,7
+4950,7
@@
int ust_app_snapshot_record(struct ltt_ust_session *usess,
reg_chan->subbuf_size > max_stream_size) {
ret = -EINVAL;
DBG3("UST app snapshot record maximum stream size %" PRIu64
reg_chan->subbuf_size > max_stream_size) {
ret = -EINVAL;
DBG3("UST app snapshot record maximum stream size %" PRIu64
- " is smaller than subbuffer size of %
" PRIu64
,
+ " is smaller than subbuffer size of %
zu"
,
max_stream_size, reg_chan->subbuf_size);
goto error;
}
max_stream_size, reg_chan->subbuf_size);
goto error;
}
This page took
0.025106 seconds
and
4
git commands to generate.