projects
/
deliverable
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add kernel enable event support
[deliverable/lttng-tools.git]
/
lttng
/
lttng.c
diff --git
a/lttng/lttng.c
b/lttng/lttng.c
index 10ce2ddfc08539bb121c2a0aa8b3bfe017a93f20..c7c88f6315a0a8987912dc003979d0f8454247bd 100644
(file)
--- a/
lttng/lttng.c
+++ b/
lttng/lttng.c
@@
-131,11
+131,12
@@
static int process_client_opt(void)
if (opt_event_list != NULL) {
ret = process_opt_kernel_event();
if (opt_event_list != NULL) {
ret = process_opt_kernel_event();
+ if (ret < 0) {
+ goto end;
+ }
} else {
// Enable all events
}
} else {
// Enable all events
}
-
- goto error;
}
if (opt_trace_pid != 0) {
}
if (opt_trace_pid != 0) {
@@
-181,7
+182,24
@@
error: /* fall through */
*/
static int process_kernel_create_trace(void)
{
*/
static int process_kernel_create_trace(void)
{
+ int ret;
+
+ /* Setup kernel session */
+ ret = lttng_kernel_create_session();
+ if (ret < 0) {
+ goto error;
+ }
+
+ /* Create an empty channel (with no event) */
+ ret = lttng_kernel_create_channel();
+ if (ret < 0) {
+ goto error;
+ }
+
return 0;
return 0;
+
+error:
+ return ret;
}
/*
}
/*
@@
-504,7
+522,7
@@
static int validate_options(void)
}
/* If start trace, auto start tracing */
}
/* If start trace, auto start tracing */
- if (opt_start_trace) {
+ if (opt_start_trace
|| opt_event_list != NULL
) {
DBG("Requesting auto tracing");
auto_trace = 1;
}
DBG("Requesting auto tracing");
auto_trace = 1;
}
This page took
0.024573 seconds
and
5
git commands to generate.