From: David Goulet Date: Mon, 5 Dec 2011 18:54:47 +0000 (-0500) Subject: Merge branch 'master' into benchmark X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;ds=sidebyside;h=bb3037a945835e64e852fbadc9c0e9f0d8a79b01;p=lttng-tools.git Merge branch 'master' into benchmark Signed-off-by: David Goulet --- bb3037a945835e64e852fbadc9c0e9f0d8a79b01 diff --cc Makefile.am index 279a73ae5,fa5beea9a..ae88bcaa0 --- a/Makefile.am +++ b/Makefile.am @@@ -6,13 -5,14 +6,17 @@@ SUBDIRS = benchmark liblttng-kconsumer \ liblttng-ustconsumer \ liblttng-consumer \ - lttng-consumerd \ - liblttngctl \ - lttng \ - lttng-sessiond \ - tests \ - include \ - doc + lttng-consumerd + + if ! BUILD_CONSUMERD_ONLY + SUBDIRS += liblttngctl \ + lttng \ + lttng-sessiond + endif + + SUBDIRS += tests \ + include \ + doc + +bench: + ./benchmark/runall.sh diff --cc configure.ac index 59c6a2838,621f091fd..d259b290c --- a/configure.ac +++ b/configure.ac @@@ -29,11 -57,9 +57,14 @@@ AC_CHECK_LIB([popt], [poptGetContext], [AC_MSG_ERROR([Cannot find libpopt. Use [LDFLAGS]=-Ldir to specify its location.])] ) +# Needed for benchmark time +AC_CHECK_DECL([caa_get_cycles], [], + [AC_MSG_ERROR([liburcu liburcu_version or newer is needed])], [[#include ]] +) + + # URCU library version needed or newer + liburcu_version=">= 0.6.6" + # Check liburcu needed function calls AC_CHECK_DECL([cds_list_add], [], [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include ]] diff --cc lttng-sessiond/Makefile.am index 425a0d583,7f97d9d2f..db621d8e3 --- a/lttng-sessiond/Makefile.am +++ b/lttng-sessiond/Makefile.am @@@ -1,5 -1,6 +1,6 @@@ -AM_CPPFLAGS = -I$(top_srcdir)/include \ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/benchmark \ - -DINSTALL_BIN_PATH=\"$(bindir)\" + -DINSTALL_BIN_PATH=\""$(bindir)"\" \ + -DINSTALL_LIB_PATH=\""$(libdir)"\" AM_CFLAGS = -fno-strict-aliasing @@@ -35,12 -36,11 +36,12 @@@ endi lttng_sessiond_SOURCES += lttng-sessiond.h main.c # link on liblttngctl for check if sessiond is already alive. - lttng_sessiond_LDADD = -lrt -lurcu-cds -lurcu \ + lttng_sessiond_LDADD = -lrt -lurcu-common -lurcu \ $(top_builddir)/liblttng-sessiond-comm/liblttng-sessiond-comm.la \ $(top_builddir)/libkernelctl/libkernelctl.la \ - $(top_builddir)/liblttngctl/liblttngctl.la + $(top_builddir)/liblttngctl/liblttngctl.la \ + $(top_builddir)/benchmark/liblttng-benchmark.la - if LTTNG_TOOLS_HAVE_UST - lttng_sessiond_LDADD += -llttng-ust-comm -lustctl + if HAVE_LIBLTTNG_UST_CTL + lttng_sessiond_LDADD += -llttng-ust-ctl endif diff --cc lttng-sessiond/main.c index 04e5efb4f,75732a334..db0d66101 --- a/lttng-sessiond/main.c +++ b/lttng-sessiond/main.c @@@ -391,24 -468,11 +470,30 @@@ static void cleanup(void close(thread_quit_pipe[0]); close(thread_quit_pipe[1]); + /* 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 */ ++ + /* */ + MSG("%c[%d;%dm*** assert failed :-) *** ==> %c[%dm%c[%d;%dm" + "Matthew, BEET driven development works!%c[%dm", + 27, 1, 31, 27, 0, 27, 1, 33, 27, 0); + /* */ } /* @@@ -1077,13 -1137,18 +1177,20 @@@ static void *thread_manage_apps(void *d /* Register applicaton to the session daemon */ ret = ust_app_register(&ust_cmd.reg_msg, ust_cmd.sock); - if (ret < 0) { - /* Only critical ENOMEM error can be returned here */ + if (ret == -ENOMEM) { goto error; + } else if (ret < 0) { + break; } + tracepoint(ust_register_add_stop); + tracepoint(ust_register_done_start); + /* + * Add channel(s) and event(s) to newly registered apps + * from lttng global UST domain. + */ + update_ust_app(ust_cmd.sock); + ret = ustctl_register_done(ust_cmd.sock); if (ret < 0) { /*