projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix multiple enable events
[lttng-tools.git]
/
lttng
/
commands
/
enable_events.c
diff --git
a/lttng/commands/enable_events.c
b/lttng/commands/enable_events.c
index 747e5dd802fc63c11b9e83d2b726f9ee9bb558b8..5d025e7085cb881393b795c9816f2048bf1c6fd5 100644
(file)
--- a/
lttng/commands/enable_events.c
+++ b/
lttng/commands/enable_events.c
@@
-124,6
+124,7
@@
static int parse_probe_opts(struct lttng_event *ev, char *opt)
}
ev->attr.probe.offset = strtoul(s_hex, NULL, 0);
DBG("probe offset %" PRIu64, ev->attr.probe.offset);
}
ev->attr.probe.offset = strtoul(s_hex, NULL, 0);
DBG("probe offset %" PRIu64, ev->attr.probe.offset);
+ ev->attr.probe.addr = 0;
goto error;
}
goto error;
}
@@
-137,6
+138,8
@@
static int parse_probe_opts(struct lttng_event *ev, char *opt)
}
ev->attr.probe.addr = strtoul(s_hex, NULL, 0);
DBG("probe addr %" PRIu64, ev->attr.probe.addr);
}
ev->attr.probe.addr = strtoul(s_hex, NULL, 0);
DBG("probe addr %" PRIu64, ev->attr.probe.addr);
+ ev->attr.probe.offset = 0;
+ memset(ev->attr.probe.symbol_name, 0, LTTNG_SYMBOL_NAME_LEN);
goto error;
}
goto error;
}
@@
-159,11
+162,6
@@
static int enable_events(void)
struct lttng_event ev;
struct lttng_domain dom;
struct lttng_event ev;
struct lttng_domain dom;
- if (set_session_name(opt_session_name) < 0) {
- ret = CMD_ERROR;
- goto error;
- }
-
if (opt_channel_name == NULL) {
err = asprintf(&channel_name, DEFAULT_CHANNEL_NAME);
if (err < 0) {
if (opt_channel_name == NULL) {
err = asprintf(&channel_name, DEFAULT_CHANNEL_NAME);
if (err < 0) {
@@
-180,6
+178,11
@@
static int enable_events(void)
}
if (opt_enable_all) {
}
if (opt_enable_all) {
+ if (set_session_name(opt_session_name) < 0) {
+ ret = CMD_ERROR;
+ goto error;
+ }
+
if (opt_kernel) {
ret = lttng_enable_event(&dom, NULL, channel_name);
if (ret == 0) {
if (opt_kernel) {
ret = lttng_enable_event(&dom, NULL, channel_name);
if (ret == 0) {
@@
-194,6
+197,11
@@
static int enable_events(void)
/* Strip event list */
event_name = strtok(opt_event_list, ",");
while (event_name != NULL) {
/* Strip event list */
event_name = strtok(opt_event_list, ",");
while (event_name != NULL) {
+ if (set_session_name(opt_session_name) < 0) {
+ ret = CMD_ERROR;
+ goto error;
+ }
+
/* Kernel tracer action */
if (opt_kernel) {
DBG("Enabling kernel event %s for channel %s",
/* Kernel tracer action */
if (opt_kernel) {
DBG("Enabling kernel event %s for channel %s",
This page took
0.024828 seconds
and
5
git commands to generate.