From: David Goulet Date: Fri, 16 Sep 2011 15:34:12 +0000 (-0400) Subject: Merge branch 'master' into benchmark X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=bd1c8ff6e5f8850bc3e57a02c1368501144d9960;p=lttng-tools.git Merge branch 'master' into benchmark Signed-off-by: David Goulet --- bd1c8ff6e5f8850bc3e57a02c1368501144d9960 diff --cc ltt-sessiond/main.c index 92dffaa66,97569f6d1..6667adb49 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@@ -1005,11 -984,10 +1021,12 @@@ static void *thread_manage_apps(void *d 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; @@@ -1034,9 -1010,9 +1051,10 @@@ 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 { @@@ -2448,57 -2540,14 +2599,18 @@@ static int process_client_msg(struct co } 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: