goto error;
}
- ret = ust_app_add_ctx_channel_glb(usess, uchan, uctx);
- if (ret < 0) {
- goto error;
- }
-
- rcu_read_lock();
-
/* Add ltt UST context node to ltt UST channel */
lttng_ht_add_ulong(uchan->ctx, &uctx->node);
- rcu_read_unlock();
cds_list_add_tail(&uctx->list, &uchan->ctx_list);
+ if (!usess->active) {
+ goto end;
+ }
+
+ ret = ust_app_add_ctx_channel_glb(usess, uchan, uctx);
+ if (ret < 0) {
+ goto error;
+ }
+end:
DBG("Context UST %d added to channel %s", uctx->ctx.ctx, uchan->name);
return 0;
case LTTNG_EVENT_CONTEXT_MIGRATABLE:
kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_MIGRATABLE;
break;
+ case LTTNG_EVENT_CONTEXT_CALLSTACK_KERNEL:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_CALLSTACK_KERNEL;
+ break;
+ case LTTNG_EVENT_CONTEXT_CALLSTACK_USER:
+ kctx->ctx.ctx = LTTNG_KERNEL_CONTEXT_CALLSTACK_USER;
+ break;
default:
ret = LTTNG_ERR_KERN_CONTEXT_FAIL;
goto error;