Lazily initialize max poll set size
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 27 Jun 2016 19:18:38 +0000 (15:18 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 27 Jun 2016 19:38:24 +0000 (15:38 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-consumerd/lttng-consumerd.c
src/bin/lttng-relayd/main.c
src/bin/lttng-sessiond/main.c
src/common/compat/compat-epoll.c

index 00660fcd6a7d401aa3096236026eabd1900d5f64..1cc1eb9ae567c5a957bbf4d0704a2805337050f8 100644 (file)
@@ -362,12 +362,6 @@ int main(int argc, char **argv)
                goto exit_health_consumerd_cleanup;
        }
 
-       /* Set up max poll set size */
-       if (lttng_poll_set_max_size()) {
-               retval = -1;
-               goto exit_init_data;
-       }
-
        if (*command_sock_path == '\0') {
                switch (opt_type) {
                case LTTNG_CONSUMER_KERNEL:
index 6ad6566254260a8af071e2c2ce26348fd148486c..007f9513158d20aed0d89941f34e6f598e0606b9 100644 (file)
@@ -2802,12 +2802,6 @@ int main(int argc, char **argv)
        /* Init relay command queue. */
        cds_wfcq_init(&relay_conn_queue.head, &relay_conn_queue.tail);
 
-       /* Set up max poll set size */
-       if (lttng_poll_set_max_size()) {
-               retval = -1;
-               goto exit_init_data;
-       }
-
        /* Initialize communication library */
        lttcomm_init();
        lttcomm_inet_init();
index ee19ef840d339cc6b4a4342b529e1c4f6b375a44..0c97b1cb64fe196370fae53634e7c65246f53729 100644 (file)
@@ -5662,12 +5662,6 @@ 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);
@@ -6246,7 +6240,6 @@ exit_init_data:
                retval = -1;
        }
 exit_ht_cleanup:
-exit_set_max_size:
 
        utils_close_pipe(ht_cleanup_pipe);
 exit_ht_cleanup_pipe:
index 6259fd3895e46b9b27826944c1b7574b72b72ff3..9c2688d33e09c3c774b914b366226424504324e7 100644 (file)
@@ -76,8 +76,9 @@ int compat_epoll_create(struct lttng_poll_event *events, int size, int flags)
        }
 
        if (!poll_max_size) {
-               ERR("poll_max_size not initialized yet");
-               goto error;
+               if (lttng_poll_set_max_size()) {
+                       goto error;
+               }
        }
 
        /* Don't bust the limit here */
This page took 0.03017 seconds and 4 git commands to generate.