* Assumes the ownership of kctx.
*/
static int add_kctx_all_channels(struct ltt_kernel_session *ksession,
* Assumes the ownership of kctx.
*/
static int add_kctx_all_channels(struct ltt_kernel_session *ksession,
/* Ownership of kctx_copy is transferred to the callee. */
ret = kernel_add_channel_context(kchan, kctx_copy);
/* Ownership of kctx_copy is transferred to the callee. */
ret = kernel_add_channel_context(kchan, kctx_copy);
/* Ownership of kctx is transferred to the callee. */
ret = kernel_add_channel_context(kchan, kctx);
/* Ownership of kctx is transferred to the callee. */
ret = kernel_add_channel_context(kchan, kctx);
* Add UST context to channel.
*/
static int add_uctx_to_channel(struct ltt_ust_session *usess,
* Add UST context to channel.
*/
static int add_uctx_to_channel(struct ltt_ust_session *usess,
- enum lttng_domain_type domain,
- struct ltt_ust_channel *uchan,
- const struct lttng_event_context *ctx)
+ enum lttng_domain_type domain,
+ struct ltt_ust_channel *uchan,
+ const struct lttng_event_context *ctx)
if (trace_ust_match_context(uctx, ctx)) {
ret = LTTNG_ERR_UST_CONTEXT_EXIST;
goto duplicate;
}
}
if (trace_ust_match_context(uctx, ctx)) {
ret = LTTNG_ERR_UST_CONTEXT_EXIST;
goto duplicate;
}
}
* Add kernel context to tracer.
*/
int context_kernel_add(struct ltt_kernel_session *ksession,
* Add kernel context to tracer.
*/
int context_kernel_add(struct ltt_kernel_session *ksession,
- const struct lttng_event_context *ctx,
- const char *channel_name)
+ const struct lttng_event_context *ctx,
+ const char *channel_name)
kctx->ctx.u.perf_counter.type = ctx->u.perf_counter.type;
kctx->ctx.u.perf_counter.config = ctx->u.perf_counter.config;
kctx->ctx.u.perf_counter.type = ctx->u.perf_counter.type;
kctx->ctx.u.perf_counter.config = ctx->u.perf_counter.config;
- strncpy(kctx->ctx.u.perf_counter.name, ctx->u.perf_counter.name,
- LTTNG_SYMBOL_NAME_LEN);
+ strncpy(kctx->ctx.u.perf_counter.name, ctx->u.perf_counter.name, LTTNG_SYMBOL_NAME_LEN);
kctx->ctx.u.perf_counter.name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
if (*channel_name == '\0') {
ret = add_kctx_all_channels(ksession, kctx);
/* Ownership of kctx is transferred to the callee. */
kctx->ctx.u.perf_counter.name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
if (*channel_name == '\0') {
ret = add_kctx_all_channels(ksession, kctx);
/* Ownership of kctx is transferred to the callee. */
ret = LTTNG_ERR_KERN_CHAN_NOT_FOUND;
goto error;
}
ret = add_kctx_to_channel(kctx, kchan);
/* Ownership of kctx is transferred to the callee. */
ret = LTTNG_ERR_KERN_CHAN_NOT_FOUND;
goto error;
}
ret = add_kctx_to_channel(kctx, kchan);
/* Ownership of kctx is transferred to the callee. */
* Add UST context to tracer.
*/
int context_ust_add(struct ltt_ust_session *usess,
* Add UST context to tracer.
*/
int context_ust_add(struct ltt_ust_session *usess,
- enum lttng_domain_type domain,
- const struct lttng_event_context *ctx,
- const char *channel_name)
+ enum lttng_domain_type domain,
+ const struct lttng_event_context *ctx,
+ const char *channel_name)
/* Get UST channel if defined */
if (channel_name[0] != '\0') {
uchan = trace_ust_find_channel_by_name(chan_ht, channel_name);
/* Get UST channel if defined */
if (channel_name[0] != '\0') {
uchan = trace_ust_find_channel_by_name(chan_ht, channel_name);
- cds_lfht_for_each_entry(chan_ht->ht, &iter.iter, uchan, node.node) {
+ cds_lfht_for_each_entry (chan_ht->ht, &iter.iter, uchan, node.node) {
ret = add_uctx_to_channel(usess, domain, uchan, ctx);
if (ret) {
ret = add_uctx_to_channel(usess, domain, uchan, ctx);
if (ret) {