sessiond: add missing testpoints
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Jan 2014 04:01:06 +0000 (23:01 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 28 Jan 2014 21:20:45 +0000 (16:20 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng-sessiond/ht-cleanup.c
src/bin/lttng-sessiond/main.c
src/bin/lttng-sessiond/testpoint.h
src/bin/lttng-sessiond/ust-thread.c

index 48b0be6e4c3b6cbfb829fb563ec101fdd1b846ad..a201506c0eb1da3ad94ac110c351ad3fc0d064e7 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "lttng-sessiond.h"
 #include "health-sessiond.h"
+#include "testpoint.h"
 
 void *thread_ht_cleanup(void *data)
 {
@@ -39,6 +40,10 @@ void *thread_ht_cleanup(void *data)
 
        health_register(health_sessiond, HEALTH_SESSIOND_TYPE_HT_CLEANUP);
 
+       if (testpoint(sessiond_thread_ht_cleanup)) {
+               goto error_testpoint;
+       }
+
        health_code_update();
 
        ret = sessiond_set_thread_pollset(&events, 2);
@@ -125,6 +130,7 @@ exit:
 error:
        lttng_poll_clean(&events);
 error_poll_create:
+error_testpoint:
        utils_close_pipe(ht_cleanup_pipe);
        ht_cleanup_pipe[0] = ht_cleanup_pipe[1] = -1;
        DBG("[ust-thread] cleanup complete.");
index 8ea9924686fca679863446c62e3573835f85347c..f01ca2e84b1f6e63bc0070d73d15fa06c6b01043 100644 (file)
@@ -1564,6 +1564,10 @@ static void *thread_dispatch_ust_registration(void *data)
 
        health_register(health_sessiond, HEALTH_SESSIOND_TYPE_APP_REG_DISPATCH);
 
+       if (testpoint(sessiond_thread_app_reg_dispatch)) {
+               goto error_testpoint;
+       }
+
        health_code_update();
 
        CDS_INIT_LIST_HEAD(&wait_queue.head);
@@ -1768,6 +1772,7 @@ error:
                free(wait_node);
        }
 
+error_testpoint:
        DBG("Dispatch thread dying");
        if (err) {
                health_error();
@@ -1956,11 +1961,6 @@ static void *thread_registration_apps(void *data)
 
 exit:
 error:
-       if (err) {
-               health_error();
-               ERR("Health error occurred in %s", __func__);
-       }
-
        /* Notify that the registration thread is gone */
        notify_ust_apps(0);
 
@@ -1985,6 +1985,10 @@ error_listen:
 error_create_poll:
 error_testpoint:
        DBG("UST Registration thread cleanup complete");
+       if (err) {
+               health_error();
+               ERR("Health error occurred in %s", __func__);
+       }
        health_unregister(health_sessiond);
 
        return NULL;
index 623b061f8eb4be2c44fea0308078735e7ed2f945..f213e431d8a2acada360f81b0ba74bcd448a1cd5 100644 (file)
@@ -29,5 +29,8 @@ TESTPOINT_DECL(sessiond_thread_manage_apps_before_loop);
 TESTPOINT_DECL(sessiond_thread_manage_kernel);
 TESTPOINT_DECL(sessiond_thread_manage_kernel_before_loop);
 TESTPOINT_DECL(sessiond_thread_manage_consumer);
+TESTPOINT_DECL(sessiond_thread_ht_cleanup);
+TESTPOINT_DECL(sessiond_thread_app_manage_notify);
+TESTPOINT_DECL(sessiond_thread_app_reg_dispatch);
 
 #endif /* SESSIOND_TESTPOINT_H */
index 0248d7a0aa305a17cfba12cb8ceb60deb2266472..080afa53a692487d2e7bc12f29ae0bee9c932f72 100644 (file)
@@ -24,6 +24,7 @@
 #include "lttng-sessiond.h"
 #include "ust-thread.h"
 #include "health-sessiond.h"
+#include "testpoint.h"
 
 /*
  * This thread manage application notify communication.
@@ -43,6 +44,10 @@ void *ust_thread_manage_notify(void *data)
        health_register(health_sessiond,
                HEALTH_SESSIOND_TYPE_APP_MANAGE_NOTIFY);
 
+       if (testpoint(sessiond_thread_app_manage_notify)) {
+               goto error_testpoint;
+       }
+
        health_code_update();
 
        ret = sessiond_set_thread_pollset(&events, 2);
@@ -170,6 +175,7 @@ exit:
 error:
        lttng_poll_clean(&events);
 error_poll_create:
+error_testpoint:
        utils_close_pipe(apps_cmd_notify_pipe);
        apps_cmd_notify_pipe[0] = apps_cmd_notify_pipe[1] = -1;
        DBG("Application notify communication apps thread cleanup complete");
This page took 0.029625 seconds and 4 git commands to generate.