aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-04-06 17:27:17 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-04-06 17:27:17 +0200
commit2ea950f70bb3c2bee32be7f98442df8d8d2f008a (patch)
tree0438b76786bb8c1aac788600a85e1856aa7acbf1 /erts/configure.in
parentdc599847686a683441617eb507539d68dab88d6b (diff)
parent58762e934f603b3fe036aa3b9d8a5930b77ae5f1 (diff)
downloadotp-2ea950f70bb3c2bee32be7f98442df8d8d2f008a.tar.gz
otp-2ea950f70bb3c2bee32be7f98442df8d8d2f008a.tar.bz2
otp-2ea950f70bb3c2bee32be7f98442df8d8d2f008a.zip
Merge branch 'egil/erts/tracing-beam-lttng/OTP-10282'
* egil/erts/tracing-beam-lttng/OTP-10282: erts: Don't use ratio in carrier lttng tracepoints Add lttng testcases erts: Extend erlang:system_info/1 with lttng Refactor and fix dtrace define in erl_message erts: Add lttng tracepoints for async pool queue erts: Add lttng tracepoints for drivers erts: Add lttng tracepoints for scheduler events erts: Add lttng tracepoints for memory carriers erts: Update lttng-wrapper with mfa conversion erts: Teach lttng to configure and build system
Diffstat (limited to 'erts/configure.in')
-rw-r--r--erts/configure.in59
1 files changed, 51 insertions, 8 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 77a4d32787..0257079c3b 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -234,8 +234,8 @@ AS_HELP_STRING([--enable-m32-build],
],enable_m32_build=no)
AC_ARG_WITH(dynamic-trace,
-AS_HELP_STRING([--with-dynamic-trace={dtrace|systemtap}],
- [specify use of dynamic trace framework, dtrace or systemtap])
+AS_HELP_STRING([--with-dynamic-trace={dtrace|lttng|systemtap}],
+ [specify use of dynamic trace framework, dtrace, lttng or systemtap])
AS_HELP_STRING([--without-dynamic-trace],
[don't enable any dynamic tracing (default)]))
@@ -245,6 +245,10 @@ fi
case "$with_dynamic_trace" in
no) DYNAMIC_TRACE_FRAMEWORK=;;
+ lttng)
+ AC_DEFINE(USE_LTTNG,[1],
+ [Define if you want to use lttng for dynamic tracing])
+ DYNAMIC_TRACE_FRAMEWORK=lttng;;
dtrace)
AC_DEFINE(USE_DTRACE,[1],
[Define if you want to use dtrace for dynamic tracing])
@@ -280,10 +284,12 @@ AS_HELP_STRING([--enable-vm-probes],
fi)
AC_SUBST(USE_VM_PROBES)
-if test X"$use_vm_probes" = X"yes"; then
- USE_VM_PROBES=yes
- AC_DEFINE(USE_VM_PROBES,[1],
- [Define to enable VM dynamic trace probes])
+if test X"$DYNAMIC_TRACE_FRAMEWORK" != X"lttng"; then
+ if test X"$use_vm_probes" = X"yes"; then
+ USE_VM_PROBES=yes
+ AC_DEFINE(USE_VM_PROBES,[1],
+ [Define to enable VM dynamic trace probes])
+ fi
fi
AC_ARG_WITH(assumed-cache-line-size,
@@ -3756,14 +3762,20 @@ dnl
LM_FIND_EMU_CC
dnl
-dnl DTrace
+dnl DTrace & LTTNG
dnl
case $DYNAMIC_TRACE_FRAMEWORK in
dtrace|systemtap)
AC_CHECK_TOOL(DTRACE, dtrace, none)
test "$DTRACE" = "none" && AC_MSG_ERROR([No dtrace utility found.]);
+ enable_lttng_test=no
enable_dtrace_test=yes;;
- *) enable_dtrace_test=no;;
+ lttng)
+ enable_lttng_test=yes
+ enable_dtrace_test=no;;
+ *)
+ enable_lttng_test=no
+ enable_dtrace_test=no;;
esac
AC_SUBST(DTRACE)
@@ -3830,6 +3842,37 @@ if test "$enable_dtrace_test" = "yes" ; then
fi
fi
+if test "$enable_lttng_test" = "yes" ; then
+ AC_CHECK_HEADERS(lttng/tracepoint.h)
+ AC_CHECK_HEADERS(lttng/tracepoint-event.h)
+ dnl The macro tracepoint_enabled is not present in older lttng versions
+ dnl checking for tracepoint_enabled
+ AC_MSG_CHECKING([for tracepoint_enabled in lttng/tracepoint.h])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <lttng/tracepoint.h>
+ #define TRACEPOINT_PROVIDER com_ericsson_otp
+ TRACEPOINT_EVENT(
+ com_ericsson_otp,
+ dummy,
+ TP_ARGS(int, my_int),
+ TP_FIELDS(ctf_integer(int, my_int, my_int)))
+ #define TRACEPOINT_CREATE_PROBES
+ #define TRACEPOINT_DEFINE],
+ [if(tracepoint_enabled(com_ericsson_otp,dummy)) do {} while(0)])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_ERROR([no (must be present)])])
+ if test "x$ac_cv_header_lttng_tracepoint_h" = "xyes" \
+ -a "x$ac_cv_header_lttng_tracepoint_event_h" = "xyes"; then
+ # No straight forward way to test for liblttng-ust when no public symbol exists,
+ # just add the lib.
+ LIBS="$LIBS -llttng-ust -ldl"
+ else
+ AC_MSG_ERROR([No LTTng support found.])
+ fi
+fi
+
+
dnl
dnl SSL, SSH and CRYPTO need the OpenSSL libraries
dnl