projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use common functions for module loading and unloading
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
cmd.c
diff --git
a/src/bin/lttng-sessiond/cmd.c
b/src/bin/lttng-sessiond/cmd.c
index 161680a6cdbda4ae27397efee2d6f4d694946083..bb9329f308ac90d56dd28c0e66254a3378b0022b 100644
(file)
--- a/
src/bin/lttng-sessiond/cmd.c
+++ b/
src/bin/lttng-sessiond/cmd.c
@@
-823,7
+823,7
@@
static int start_kernel_session(struct ltt_kernel_session *ksess, int wpipe)
/* Quiescent wait after starting trace */
kernel_wait_quiescent(kernel_tracer_fd);
/* Quiescent wait after starting trace */
kernel_wait_quiescent(kernel_tracer_fd);
- ksess->
started
= 1;
+ ksess->
active
= 1;
ret = LTTNG_OK;
ret = LTTNG_OK;
@@
-1445,7
+1445,7
@@
int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain,
tmp_dom.type = LTTNG_DOMAIN_UST;
ret = cmd_enable_event(session, &tmp_dom, DEFAULT_JUL_CHANNEL_NAME,
tmp_dom.type = LTTNG_DOMAIN_UST;
ret = cmd_enable_event(session, &tmp_dom, DEFAULT_JUL_CHANNEL_NAME,
- &uevent,
NULL, NULL
, NULL, wpipe);
+ &uevent,
filter_expression, filter
, NULL, wpipe);
if (ret != LTTNG_OK && ret != LTTNG_ERR_UST_EVENT_ENABLED) {
goto error;
}
if (ret != LTTNG_OK && ret != LTTNG_ERR_UST_EVENT_ENABLED) {
goto error;
}
@@
-1819,7
+1819,11
@@
int cmd_start_trace(struct ltt_session *session)
/* Flag session that trace should start automatically */
if (usess) {
/* Flag session that trace should start automatically */
if (usess) {
- usess->start_trace = 1;
+ /*
+ * Even though the start trace might fail, flag this session active so
+ * other application coming in are started by default.
+ */
+ usess->active = 1;
ret = ust_app_start_trace_all(usess);
if (ret < 0) {
ret = ust_app_start_trace_all(usess);
if (ret < 0) {
@@
-1861,7
+1865,7
@@
int cmd_stop_trace(struct ltt_session *session)
}
/* Kernel tracer */
}
/* Kernel tracer */
- if (ksession && ksession->
started
) {
+ if (ksession && ksession->
active
) {
DBG("Stop kernel tracing");
/* Flush metadata if exist */
DBG("Stop kernel tracing");
/* Flush metadata if exist */
@@
-1888,11
+1892,15
@@
int cmd_stop_trace(struct ltt_session *session)
kernel_wait_quiescent(kernel_tracer_fd);
kernel_wait_quiescent(kernel_tracer_fd);
- ksession->
started
= 0;
+ ksession->
active
= 0;
}
}
- if (usess && usess->start_trace) {
- usess->start_trace = 0;
+ if (usess && usess->active) {
+ /*
+ * Even though the stop trace might fail, flag this session inactive so
+ * other application coming in are not started by default.
+ */
+ usess->active = 0;
ret = ust_app_stop_trace_all(usess);
if (ret < 0) {
ret = ust_app_stop_trace_all(usess);
if (ret < 0) {
This page took
0.024352 seconds
and
4
git commands to generate.