perror("read apps cmd pipe");
goto error;
}
+ tracepoint(ust_register_read_stop);
+ tracepoint(ust_register_add_start);
/* Register applicaton to the session daemon */
- ret = register_traceable_app(&ust_cmd.reg_msg, ust_cmd.sock);
+ ret = register_traceable_app(&ust_cmd.reg_msg,
+ ust_cmd.sock);
if (ret < 0) {
/* Only critical ENOMEM error can be returned here */
goto error;
goto error;
}
- DBG("Apps with sock %d added to poll set", ust_cmd.sock);
+ DBG("Apps with sock %d added to poll set",
+ ust_cmd.sock);
}
+ tracepoint(ust_register_done_stop);
break;
}
} else {
}
case LTTNG_CREATE_SESSION:
{
- /* Setup lttng message with no payload */
- ret = setup_lttng_msg(cmd_ctx, 0);
- if (ret < 0) {
- goto setup_error;
- }
-
+ tracepoint(create_session_start);
- ret = create_session(cmd_ctx->lsm->session.name, cmd_ctx->lsm->session.path);
+ ret = cmd_create_session(cmd_ctx->lsm->session.name,
+ cmd_ctx->lsm->session.path);
+ tracepoint(create_session_end);
- if (ret < 0) {
- if (ret == -EEXIST) {
- ret = LTTCOMM_EXIST_SESS;
- } else {
- ret = LTTCOMM_FATAL;
- }
- goto error;
- }
-
- ret = LTTCOMM_OK;
break;
}
case LTTNG_DESTROY_SESSION:
{
- /* Setup lttng message with no payload */
- ret = setup_lttng_msg(cmd_ctx, 0);
- if (ret < 0) {
- goto setup_error;
- }
-
- /* Clean kernel session teardown */
- teardown_kernel_session(cmd_ctx->session);
-
+ tracepoint(destroy_session_start);
- ret = destroy_session(cmd_ctx->lsm->session.name);
+ ret = cmd_destroy_session(cmd_ctx->session,
+ cmd_ctx->lsm->session.name);
+ tracepoint(destroy_session_end);
- if (ret < 0) {
- ret = LTTCOMM_FATAL;
- goto error;
- }
-
- /*
- * Must notify the kernel thread here to update it's poll setin order
- * to remove the channel(s)' fd just destroyed.
- */
- ret = notify_kernel_channels_update();
- if (ret < 0) {
- ret = LTTCOMM_FATAL;
- goto error;
- }
-
- ret = LTTCOMM_OK;
break;
}
case LTTNG_LIST_DOMAINS: