projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
listing and activation of loglevel by number
[lttng-tools.git]
/
lttng-sessiond
/
ust-app.c
diff --git
a/lttng-sessiond/ust-app.c
b/lttng-sessiond/ust-app.c
index 7276cbb63755113512bfd97e69da8b945c66f0b7..bd4160b9abcf2642903aeff217b35981b267282a 100644
(file)
--- a/
lttng-sessiond/ust-app.c
+++ b/
lttng-sessiond/ust-app.c
@@
-1136,7
+1136,9
@@
int create_ust_app_event(struct ust_app_session *ua_sess,
/* Create it on the tracer side */
ret = create_ust_event(app, ua_sess, ua_chan, ua_event);
if (ret < 0) {
/* Create it on the tracer side */
ret = create_ust_event(app, ua_sess, ua_chan, ua_event);
if (ret < 0) {
+ rcu_read_lock();
delete_ust_app_event(app->key.sock, ua_event);
delete_ust_app_event(app->key.sock, ua_event);
+ rcu_read_unlock();
goto error;
}
goto error;
}
@@
-1370,6
+1372,8
@@
int ust_app_list_events(struct lttng_event **events)
rcu_read_lock();
cds_lfht_for_each_entry(ust_app_ht, &iter, app, node) {
rcu_read_lock();
cds_lfht_for_each_entry(ust_app_ht, &iter, app, node) {
+ struct lttng_ust_tracepoint_iter iter;
+
handle = ustctl_tracepoint_list(app->key.sock);
if (handle < 0) {
ERR("UST app list events getting handle failed for app pid %d",
handle = ustctl_tracepoint_list(app->key.sock);
if (handle < 0) {
ERR("UST app list events getting handle failed for app pid %d",
@@
-1378,11
+1382,11
@@
int ust_app_list_events(struct lttng_event **events)
}
while ((ret = ustctl_tracepoint_list_get(app->key.sock, handle,
}
while ((ret = ustctl_tracepoint_list_get(app->key.sock, handle,
-
tmp[count].name
)) != -ENOENT) {
- if (count > nbmem) {
- DBG2("Reallocating event list from %zu to %zu
byt
es", nbmem,
-
nbmem + UST_APP_EVENT_LIST_SIZE
);
- nbmem
+= UST_APP_EVENT_LIST_SIZE
;
+
&iter
)) != -ENOENT) {
+ if (count >
=
nbmem) {
+ DBG2("Reallocating event list from %zu to %zu
entri
es", nbmem,
+
2 * nbmem
);
+ nbmem
*= 2
;
tmp = realloc(tmp, nbmem * sizeof(struct lttng_event));
if (tmp == NULL) {
PERROR("realloc ust app events");
tmp = realloc(tmp, nbmem * sizeof(struct lttng_event));
if (tmp == NULL) {
PERROR("realloc ust app events");
@@
-1390,7
+1394,9
@@
int ust_app_list_events(struct lttng_event **events)
goto rcu_error;
}
}
goto rcu_error;
}
}
-
+ memcpy(tmp[count].name, iter.name, LTTNG_UST_SYM_NAME_LEN);
+ memcpy(tmp[count].loglevel, iter.loglevel, LTTNG_UST_SYM_NAME_LEN);
+ tmp[count].loglevel_value = iter.loglevel_value;
tmp[count].type = LTTNG_UST_TRACEPOINT;
tmp[count].pid = app->key.pid;
tmp[count].enabled = -1;
tmp[count].type = LTTNG_UST_TRACEPOINT;
tmp[count].pid = app->key.pid;
tmp[count].enabled = -1;
This page took
0.025834 seconds
and
5
git commands to generate.