projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lttng add-context: add --list option
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
destroy.c
diff --git
a/src/bin/lttng/commands/destroy.c
b/src/bin/lttng/commands/destroy.c
index 87231858f96ded25cb05c189b1c0464dc2f09c3f..ad181d7c4343b72182269556bf689d593bd21d4d 100644
(file)
--- a/
src/bin/lttng/commands/destroy.c
+++ b/
src/bin/lttng/commands/destroy.c
@@
-23,6
+23,7
@@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
+#include <stdbool.h>
#include "../command.h"
#include "../command.h"
@@
-79,11
+80,13
@@
static int destroy_session(struct lttng_session *session)
{
int ret;
char *session_name = NULL;
{
int ret;
char *session_name = NULL;
+ bool session_was_stopped;
ret = lttng_stop_tracing_no_wait(session->name);
if (ret < 0 && ret != -LTTNG_ERR_TRACE_ALREADY_STOPPED) {
ERR("%s", lttng_strerror(ret));
}
ret = lttng_stop_tracing_no_wait(session->name);
if (ret < 0 && ret != -LTTNG_ERR_TRACE_ALREADY_STOPPED) {
ERR("%s", lttng_strerror(ret));
}
+ session_was_stopped = ret == -LTTNG_ERR_TRACE_ALREADY_STOPPED;
if (!opt_no_wait) {
_MSG("Waiting for data availability");
fflush(stdout);
if (!opt_no_wait) {
_MSG("Waiting for data availability");
fflush(stdout);
@@
-106,6
+109,13
@@
static int destroy_session(struct lttng_session *session)
} while (ret != 0);
MSG("");
}
} while (ret != 0);
MSG("");
}
+ if (!session_was_stopped) {
+ /*
+ * Don't print the event and packet loss warnings since the user
+ * already saw them when stopping the trace.
+ */
+ print_session_stats(session->name);
+ }
ret = lttng_destroy_session_no_wait(session->name);
if (ret < 0) {
ret = lttng_destroy_session_no_wait(session->name);
if (ret < 0) {
This page took
0.025262 seconds
and
4
git commands to generate.