X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=e084aba61437961fe0f2d505bef57ed0f991c283;hp=80eebf163a10af74b1edfdc1069ccd830050bdbb;hb=d07ceecd2f35ccf383c7529a18dcc9b9c4b8cb17;hpb=fd20dac985126e84929d657f5a1042222c7d5017 diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 80eebf163..e084aba61 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -1059,12 +1059,14 @@ static void *thread_manage_kernel(void *data) update_poll_flag = 0; } - DBG("Thread kernel polling on %d fds", LTTNG_POLL_GETNB(&events)); + DBG("Thread kernel polling"); /* Poll infinite value of time */ restart: health_poll_entry(); ret = lttng_poll_wait(&events, -1); + DBG("Thread kernel return from poll on %d fds", + LTTNG_POLL_GETNB(&events)); health_poll_exit(); if (ret < 0) { /* @@ -1527,12 +1529,14 @@ static void *thread_manage_apps(void *data) health_code_update(); while (1) { - DBG("Apps thread polling on %d fds", LTTNG_POLL_GETNB(&events)); + DBG("Apps thread polling"); /* Inifinite blocking call, waiting for transmission */ restart: health_poll_entry(); ret = lttng_poll_wait(&events, -1); + DBG("Apps thread return from poll on %d fds", + LTTNG_POLL_GETNB(&events)); health_poll_exit(); if (ret < 0) { /* @@ -5205,6 +5209,12 @@ int main(int argc, char **argv) goto exit_ht_cleanup_pipe; } + /* Set up max poll set size */ + if (lttng_poll_set_max_size()) { + retval = -1; + goto exit_set_max_size; + } + /* Create thread to clean up RCU hash tables */ ret = pthread_create(&ht_cleanup_thread, NULL, thread_ht_cleanup, (void *) NULL); @@ -5539,9 +5549,6 @@ int main(int argc, char **argv) */ session_list_ptr = session_get_list(); - /* Set up max poll set size */ - lttng_poll_set_max_size(); - cmd_init(); /* Check for the application socket timeout env variable. */ @@ -5771,6 +5778,7 @@ exit_init_data: retval = -1; } exit_ht_cleanup: +exit_set_max_size: utils_close_pipe(ht_cleanup_pipe); exit_ht_cleanup_pipe: