switch (dom) {
case LTTNG_DOMAIN_KERNEL:
- chan->attr.subbuf_size = DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE;
+ chan->attr.subbuf_size =
+ default_get_kernel_channel_subbuf_size();
chan->attr.num_subbuf = DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM;
chan->attr.output = DEFAULT_KERNEL_CHANNEL_OUTPUT;
break;
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
case LTTNG_DOMAIN_UST_EXEC_NAME:
#endif
- chan->attr.subbuf_size = DEFAULT_UST_CHANNEL_SUBBUF_SIZE;
+ chan->attr.subbuf_size = default_get_ust_channel_subbuf_size();
chan->attr.num_subbuf = DEFAULT_UST_CHANNEL_SUBBUF_NUM;
chan->attr.output = DEFAULT_UST_CHANNEL_OUTPUT;
break;
}
if (ret < 0) {
- if (ret != -EEXIST) {
+ if (ret != -LTTNG_UST_ERR_EXIST) {
ret = LTTNG_ERR_UST_CHAN_ENABLE_FAIL;
goto error;
} else {
goto error;
}
+ if (attr->attr.output != LTTNG_EVENT_MMAP) {
+ ret = LTTNG_ERR_NOT_SUPPORTED;
+ goto error;
+ }
+
/* Create UST channel */
uchan = trace_ust_create_channel(attr, usess->pathname);
if (uchan == NULL) {
goto error_free_chan;
}
- if (ret < 0 && ret != -EEXIST) {
+ if (ret < 0 && ret != -LTTNG_UST_ERR_EXIST) {
ret = LTTNG_ERR_UST_CHAN_FAIL;
goto error_free_chan;
}
goto error;
}
- if (ret < 0 && ret != -EEXIST) {
+ if (ret < 0 && ret != -LTTNG_UST_ERR_EXIST) {
ret = LTTNG_ERR_UST_CHAN_DISABLE_FAIL;
goto error;
}