X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=84b3f20ed5420b03210e8c80c4f638f4f5072d3b;hb=855060f867357c4ed856d7b5940cf77513f7fccf;hp=859223a11216b1d342b0899ebdd4e66bc657d657;hpb=840cb59cfc335e2ca44841f6fd57972ac3a623be;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 859223a11..84b3f20ed 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -746,9 +746,9 @@ static void *thread_manage_kernel(void *data) /* Poll infinite value of time */ restart: - health_poll_update(); + health_poll_entry(); ret = lttng_poll_wait(&events, -1); - health_poll_update(); + health_poll_exit(); if (ret < 0) { /* * Restart interrupted system call. @@ -867,24 +867,7 @@ static void *thread_manage_consumer(void *data) health_register(HEALTH_TYPE_CONSUMER); - /* - * Since the consumer thread can be spawned at any moment in time, we init - * the health to a poll status (1, which is a valid health over time). - * When the thread starts, we update here the health to a "code" path being - * an even value so this thread, when reaching a poll wait, does not - * trigger an error with an even value. - * - * Here is the use case we avoid. - * - * +1: the first poll update during initialization (main()) - * +2 * x: multiple code update once in this thread. - * +1: poll wait in this thread (being a good health state). - * == even number which after the wait period shows as a bad health. - * - * In a nutshell, the following poll update to the health state brings back - * the state to an even value meaning a code path. - */ - health_poll_update(); + health_code_update(); /* * Pass 2 as size here for the thread quit pipe and kconsumerd_err_sock. @@ -909,14 +892,14 @@ static void *thread_manage_consumer(void *data) /* Inifinite blocking call, waiting for transmission */ restart: - health_poll_update(); + health_poll_entry(); if (testpoint(thread_manage_consumer)) { goto error; } ret = lttng_poll_wait(&events, -1); - health_poll_update(); + health_poll_exit(); if (ret < 0) { /* * Restart interrupted system call. @@ -1008,9 +991,9 @@ restart: /* Inifinite blocking call, waiting for transmission */ restart_poll: - health_poll_update(); + health_poll_entry(); ret = lttng_poll_wait(&events, -1); - health_poll_update(); + health_poll_exit(); if (ret < 0) { /* * Restart interrupted system call. @@ -1150,9 +1133,9 @@ static void *thread_manage_apps(void *data) /* Inifinite blocking call, waiting for transmission */ restart: - health_poll_update(); + health_poll_entry(); ret = lttng_poll_wait(&events, -1); - health_poll_update(); + health_poll_exit(); if (ret < 0) { /* * Restart interrupted system call. @@ -1430,9 +1413,9 @@ static void *thread_registration_apps(void *data) /* Inifinite blocking call, waiting for transmission */ restart: - health_poll_update(); + health_poll_entry(); ret = lttng_poll_wait(&events, -1); - health_poll_update(); + health_poll_exit(); if (ret < 0) { /* * Restart interrupted system call. @@ -3208,9 +3191,9 @@ static void *thread_manage_clients(void *data) /* Inifinite blocking call, waiting for transmission */ restart: - health_poll_update(); + health_poll_entry(); ret = lttng_poll_wait(&events, -1); - health_poll_update(); + health_poll_exit(); if (ret < 0) { /* * Restart interrupted system call.