modprobe_remove_lttng_all();
}
- close(thread_quit_pipe[0]);
- close(thread_quit_pipe[1]);
+ /*
+ * Closing all pipes used for communication between threads.
+ */
+ for (i = 0; i < 2; i++) {
+ if (kernel_poll_pipe[i] >= 0) {
+ ret = close(kernel_poll_pipe[i]);
+ if (ret) {
+ PERROR("close");
+ }
+
+ }
+ }
+ for (i = 0; i < 2; i++) {
+ if (thread_quit_pipe[i] >= 0) {
+ ret = close(thread_quit_pipe[i]);
+ if (ret) {
+ PERROR("close");
+ }
+ }
+ }
+ for (i = 0; i < 2; i++) {
+ if (apps_cmd_pipe[i] >= 0) {
+ ret = close(apps_cmd_pipe[i]);
+ if (ret) {
+ PERROR("close");
+ }
+ }
+ }
+ /* OUTPUT BENCHMARK RESULTS */
+ bench_init();
+
+ if (getenv("BENCH_UST_NOTIFY")) {
+ bench_print_ust_notification();
+ }
+
+ if (getenv("BENCH_UST_REGISTER")) {
+ bench_print_ust_register();
+ bench_print_ust_unregister();
+ }
+
+ if (getenv("BENCH_BOOT_PROCESS")) {
+ bench_print_boot_process();
+ }
+
+ bench_close();
+ /* END BENCHMARK */
+
/* <fun> */
DBG("%c[%d;%dm*** assert failed :-) *** ==> %c[%dm%c[%d;%dm"
"Matthew, BEET driven development works!%c[%dm",
/* Empty pipe */
ret = read(apps_cmd_pipe[0], &ust_cmd, sizeof(ust_cmd));
if (ret < 0 || ret < sizeof(ust_cmd)) {
- perror("read apps cmd pipe");
+ PERROR("read apps cmd pipe");
goto error;
}
+ tracepoint(ust_register_read_stop);
+ tracepoint(ust_register_add_start);
/* Register applicaton to the session daemon */
ret = ust_app_register(&ust_cmd.reg_msg,
ust_cmd.sock);
goto exit_kernel;
}
+ tracepoint(sessiond_boot_end);
+
ret = pthread_join(kernel_thread, &status);
if (ret != 0) {
- perror("pthread_join");
+ PERROR("pthread_join");
goto error; /* join error, exit without cleanup */
}