X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fchannel.c;h=d07e1d901fa3ba10170cb259411c105689a6a4a4;hp=dfc7892674bbe1f15dc74d818175ea3c60c3c65d;hb=f3f0db50cf3fbc658bb4ffaf79a7fb694ab05e1d;hpb=f73fabfda365d22e7dd180fb1614e37c446fbd9e diff --git a/src/bin/lttng-sessiond/channel.c b/src/bin/lttng-sessiond/channel.c index dfc789267..d07e1d901 100644 --- a/src/bin/lttng-sessiond/channel.c +++ b/src/bin/lttng-sessiond/channel.c @@ -54,7 +54,8 @@ struct lttng_channel *channel_new_default_attr(int dom) 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; @@ -64,7 +65,7 @@ struct lttng_channel *channel_new_default_attr(int dom) 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; @@ -203,7 +204,7 @@ int channel_ust_enable(struct ltt_ust_session *usess, int domain, } if (ret < 0) { - if (ret != -EEXIST) { + if (ret != -LTTNG_UST_ERR_EXIST) { ret = LTTNG_ERR_UST_CHAN_ENABLE_FAIL; goto error; } else { @@ -254,6 +255,11 @@ int channel_ust_create(struct ltt_ust_session *usess, int domain, 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) { @@ -279,7 +285,7 @@ int channel_ust_create(struct ltt_ust_session *usess, int domain, 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; } @@ -336,7 +342,7 @@ int channel_ust_disable(struct ltt_ust_session *usess, int domain, goto error; } - if (ret < 0 && ret != -EEXIST) { + if (ret < 0 && ret != -LTTNG_UST_ERR_EXIST) { ret = LTTNG_ERR_UST_CHAN_DISABLE_FAIL; goto error; }