summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-10-16 19:19:09 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-10-16 19:34:59 +0200
commitf75e802d8aa635185f67220901034dbdbae35b32 (patch)
tree1c6d22875ce0127d7e73b87403487c07eb703792 /configure.ac
parentMerge pull request #5155 from GalaxyGorilla/libyang_debug_logging (diff)
downloadfrr-f75e802d8aa635185f67220901034dbdbae35b32.tar.xz
frr-f75e802d8aa635185f67220901034dbdbae35b32.zip
*: Allow disabling of `getrusage` calls
getrusage, in a heavily stressed system, can account for signficant running time due to process switching to the kernel. Allow the end-operator to specify `--disable-cpu-time` to avoid this call. Additionally we cause `show thread cpu` to not show up if this is selected. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 730e2ae6f..6147ebf0d 100755
--- a/configure.ac
+++ b/configure.ac
@@ -536,6 +536,8 @@ AC_ARG_ENABLE([backtrace],
AS_HELP_STRING([--disable-backtrace,], [disable crash backtraces (default autodetect)]))
AC_ARG_ENABLE([time-check],
AS_HELP_STRING([--disable-time-check], [disable slow thread warning messages]))
+AC_ARG_ENABLE([cpu-time],
+ AS_HELP_STRING([--disable-cpu-time], [disable cpu usage data gathering]))
AC_ARG_ENABLE([pcreposix],
AS_HELP_STRING([--enable-pcreposix], [enable using PCRE Posix libs for regex functions]))
AC_ARG_ENABLE([fpm],
@@ -614,6 +616,14 @@ if test x"${enable_time_check}" != x"no" ; then
fi
fi
+case "${enable_cpu_time}" in
+ "no")
+ AC_DEFINE([EXCLUDE_CPU_TIME], [1], [Exclude getrusage data gathering])
+ ;;
+ "*")
+ ;;
+esac
+
case "${enable_systemd}" in
"no") ;;
"yes")