X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=9ae5cff392d49ae67ea83eeb99acf1340bf19508;hp=546da2e53d69cc84280ec0b9ca0aec7556962b80;hb=a9ad0c8fb50ac8cf9e9812dd9c9b4f949bac19a8;hpb=bd39b88b61f8a17e1ca4c49706fe047d9253fb23 diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 546da2e53..9ae5cff39 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -926,6 +926,8 @@ error: /* * Command LTTNG_TRACK_PID processed by the client thread. + * + * Called with session lock held. */ int cmd_track_pid(struct ltt_session *session, int domain, int pid) { @@ -949,6 +951,17 @@ int cmd_track_pid(struct ltt_session *session, int domain, int pid) break; } case LTTNG_DOMAIN_UST: + { + struct ltt_ust_session *usess; + + usess = session->ust_session; + + ret = trace_ust_track_pid(usess, pid); + if (ret != LTTNG_OK) { + goto error; + } + break; + } default: ret = LTTNG_ERR_UNKNOWN_DOMAIN; goto error; @@ -963,6 +976,8 @@ error: /* * Command LTTNG_UNTRACK_PID processed by the client thread. + * + * Called with session lock held. */ int cmd_untrack_pid(struct ltt_session *session, int domain, int pid) { @@ -986,6 +1001,17 @@ int cmd_untrack_pid(struct ltt_session *session, int domain, int pid) break; } case LTTNG_DOMAIN_UST: + { + struct ltt_ust_session *usess; + + usess = session->ust_session; + + ret = trace_ust_untrack_pid(usess, pid); + if (ret != LTTNG_OK) { + goto error; + } + break; + } default: ret = LTTNG_ERR_UNKNOWN_DOMAIN; goto error; @@ -1925,6 +1951,8 @@ ssize_t cmd_list_syscalls(struct lttng_event **events) /* * Command LTTNG_START_TRACE processed by the client thread. + * + * Called with session mutex held. */ int cmd_start_trace(struct ltt_session *session) { @@ -2285,6 +2313,8 @@ error: /* * Command LTTNG_DESTROY_SESSION processed by the client thread. + * + * Called with session lock held. */ int cmd_destroy_session(struct ltt_session *session, int wpipe) {