From ac3bd9c0d406b3230680d06ab189bcb95337b9cc Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 30 Nov 2011 18:32:15 -0500 Subject: [PATCH] Update following loglevel support UST API change Signed-off-by: Mathieu Desnoyers --- lttng-sessiond/main.c | 5 +++++ lttng-sessiond/ust-app.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lttng-sessiond/main.c b/lttng-sessiond/main.c index 56a12518e..fcae0235c 100644 --- a/lttng-sessiond/main.c +++ b/lttng-sessiond/main.c @@ -2073,6 +2073,11 @@ static int list_lttng_ust_global_events(char *channel_name, case LTTNG_UST_FUNCTION: tmp[i].type = LTTNG_EVENT_FUNCTION; break; + case LTTNG_UST_TRACEPOINT_LOGLEVEL: + /* TODO */ + ret = -LTTCOMM_NOT_IMPLEMENTED; + goto error; + break; } i++; } diff --git a/lttng-sessiond/ust-app.c b/lttng-sessiond/ust-app.c index 12ac39404..69164126b 100644 --- a/lttng-sessiond/ust-app.c +++ b/lttng-sessiond/ust-app.c @@ -1372,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) { + 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", @@ -1380,7 +1382,9 @@ int ust_app_list_events(struct lttng_event **events) } while ((ret = ustctl_tracepoint_list_get(app->key.sock, handle, - tmp[count].name)) != -ENOENT) { + &iter)) != -ENOENT) { + memcpy(tmp[count].name, iter.name, LTTNG_UST_SYM_NAME_LEN); + /* TODO : get loglevel too */ if (count > nbmem) { DBG2("Reallocating event list from %zu to %zu bytes", nbmem, nbmem + UST_APP_EVENT_LIST_SIZE); -- 2.34.1