aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2012-03-02 18:41:17 +0100
committerPatrik Nyblom <[email protected]>2012-03-22 18:16:14 +0100
commitcca350ef2206a81c0f8969071f412f07b87413a1 (patch)
tree1e6a1f5a07940a3e3d39ef7b4d6a7b8010002e06 /erts/configure.in
parentc15f94e7922040b63f3abf8680cd77d5548fecf3 (diff)
downloadotp-cca350ef2206a81c0f8969071f412f07b87413a1.tar.gz
otp-cca350ef2206a81c0f8969071f412f07b87413a1.tar.bz2
otp-cca350ef2206a81c0f8969071f412f07b87413a1.zip
Change to more specific configure options for dtrace
Diffstat (limited to 'erts/configure.in')
-rw-r--r--erts/configure.in76
1 files changed, 61 insertions, 15 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 88c73a7371..15ca2209b7 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -276,6 +276,59 @@ else
[Define to enable hrvtime() on Linux systems with perfctr extension])
fi
+
+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([--without-dynamic-trace],
+ [don't enable any dynamic tracing (default)]))
+
+if test X"$with_dynamic_trace" = X""; then
+ with_dynamic_trace=no
+fi
+
+case "$with_dynamic_trace" in
+ no) DYNAMIC_TRACE_FRAMEWORK=;;
+ dtrace)
+ AC_DEFINE(USE_DTRACE,[1],
+ [Define if you want to use dtrace for dynamic tracing])
+ DYNAMIC_TRACE_FRAMEWORK=dtrace;;
+ systemtap)
+ AC_DEFINE(USE_SYSTEMTAP,[1],
+ [Define if you want to use systemtap for dynamic tracing])
+ DYNAMIC_TRACE_FRAMEWORK=systemtap;;
+ *)
+ AC_MSG_ERROR(Unknown dynamic tracing framework specified with --with-dynamic-trace!);;
+esac
+
+if test X"$DYNAMIC_TRACE_FRAMEWORK" != X""; then
+ AC_DEFINE(USE_DYNAMIC_TRACE,[1],
+ [Define if you want to use dynamic tracing])
+fi
+
+AC_ARG_ENABLE(vm-probes,
+AS_HELP_STRING([--enable-vm-probes],
+ [add dynamic trace probes to the Beam VM (only possible if --with-dynamic-trace is enabled, and then default)]),
+ [ case "$enableval" in
+ no) use_vm_probes=no ;;
+ *)
+ if test X"$DYNAMIC_TRACE_FRAMEWORK" != X""; then
+ use_vm_probes=yes ;
+ else
+ AC_MSG_ERROR(Can not enable VM probes without any dynamic tracing framework!);
+ fi;;
+ esac ], if test X"$DYNAMIC_TRACE_FRAMEWORK" != X""; then
+ use_vm_probes=yes ;
+ else
+ use_vm_probes=no
+ fi)
+
+if test X"$use_vm_probes" = X"yes"; then
+ AC_DEFINE(USE_VM_PROBES,[1],
+ [Define to enable VM dynamic trace probes])
+fi
+
+
AC_ARG_ENABLE(clock-gettime,
AS_HELP_STRING([--enable-clock-gettime],
[use clock-gettime for time correction]),
@@ -3548,20 +3601,14 @@ LM_FIND_EMU_CC
dnl
dnl DTrace
dnl
-
-AC_MSG_CHECKING(if --enable-dtrace option specified)
-AC_ARG_ENABLE(dtrace,
- [AC_HELP_STRING([--enable-dtrace],
- [Configure with dtrace static probes])],
- [enable_dtrace="$enable_dtrace"]) dnl, [enable_dtrace="no"])
-
-if test "$enable_dtrace" = "yes"; then
+case $DYNAMIC_TRACE_FRAMEWORK in
+ dtrace|systemtap)
AC_CHECK_TOOL(DTRACE, dtrace, none)
- test "$DTRACE" = "none" && AC_MSG_ERROR([No dtrace utility found.])
-else
- AC_MSG_RESULT([not specified])
-fi
-
+ test "$DTRACE" = "none" && AC_MSG_ERROR([No dtrace utility found.]);
+ enable_dtrace_test=yes;;
+ *) enable_dtrace_test=no;;
+esac
+
AC_SUBST(DTRACE)
AC_SUBST(DTRACE_CPP)
@@ -3584,7 +3631,7 @@ case $OPSYS in
: # Nothing to do
;;
esac
-if test "$enable_dtrace" = "yes" ; then
+if test "$enable_dtrace_test" = "yes" ; then
if test "$DTRACE" = "dtrace" ; then
AC_CHECK_HEADERS(sys/sdt.h)
# The OS X version of dtrace prints a spurious line here.
@@ -3603,7 +3650,6 @@ if test "$enable_dtrace" = "yes" ; then
AC_MSG_NOTICE([dtrace precompilation for 1-stage DTrace successful])
fi
DTRACE_ENABLED=yes
- AC_DEFINE(HAVE_DTRACE, 1, [Define to enable DTrace probes (or SystemTap probes on Linux systems)])
case $OPSYS in
linux)
: # No extra libs to add to LIBS