projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Error reported if no domain is provided for start/stop
[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 ff61166d735190754a6315130270b9428c42bf9d..5511575ec20630156c313084d1e923c42b4a0d74 100644
(file)
--- a/
src/bin/lttng-sessiond/cmd.c
+++ b/
src/bin/lttng-sessiond/cmd.c
@@
-2144,7
+2144,15
@@
int cmd_stop_trace(struct ltt_session *session)
if (ksession && ksession->active) {
DBG("Stop kernel tracing");
if (ksession && ksession->active) {
DBG("Stop kernel tracing");
- /* Flush metadata if exist */
+ ret = kernel_stop_session(ksession);
+ if (ret < 0) {
+ ret = LTTNG_ERR_KERN_STOP_FAIL;
+ goto error;
+ }
+
+ kernel_wait_quiescent(kernel_tracer_fd);
+
+ /* Flush metadata after stopping (if exists) */
if (ksession->metadata_stream_fd >= 0) {
ret = kernel_metadata_flush_buffer(ksession->metadata_stream_fd);
if (ret < 0) {
if (ksession->metadata_stream_fd >= 0) {
ret = kernel_metadata_flush_buffer(ksession->metadata_stream_fd);
if (ret < 0) {
@@
-2152,7
+2160,7
@@
int cmd_stop_trace(struct ltt_session *session)
}
}
}
}
- /* Flush all buffers
before
stopping */
+ /* Flush all buffers
after
stopping */
cds_list_for_each_entry(kchan, &ksession->channel_list.head, list) {
ret = kernel_flush_buffer(kchan);
if (ret < 0) {
cds_list_for_each_entry(kchan, &ksession->channel_list.head, list) {
ret = kernel_flush_buffer(kchan);
if (ret < 0) {
@@
-2160,14
+2168,6
@@
int cmd_stop_trace(struct ltt_session *session)
}
}
}
}
- ret = kernel_stop_session(ksession);
- if (ret < 0) {
- ret = LTTNG_ERR_KERN_STOP_FAIL;
- goto error;
- }
-
- kernel_wait_quiescent(kernel_tracer_fd);
-
ksession->active = 0;
}
ksession->active = 0;
}
This page took
0.02442 seconds
and
4
git commands to generate.