summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-09-24 20:41:24 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2023-09-24 20:41:24 +0300
commitfd0fe0bb6adf2370256025b17a75c0061c1a977b (patch)
tree0da31732ec04700a273efb7ea1201cc75fa21bdb
parent9d9c6dc01e0d1b97303796e1c167a060102eba10 (diff)
lib: Drop deprecated enable-time-check, enable-cpu-time compile options
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
-rw-r--r--configure.ac26
-rw-r--r--doc/user/basic.rst9
-rw-r--r--doc/user/installation.rst14
-rw-r--r--lib/command.c19
-rw-r--r--lib/event.c9
-rw-r--r--lib/frrevent.h2
6 files changed, 6 insertions, 73 deletions
diff --git a/configure.ac b/configure.ac
index 97f9e6a826..b28fc737e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -721,10 +721,6 @@ AC_ARG_ENABLE([gcc_ultra_verbose],
AS_HELP_STRING([--enable-gcc-ultra-verbose], [enable ultra verbose GCC warnings]))
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([pcre2posix],
@@ -810,22 +806,6 @@ fi
AM_CONDITIONAL([NETLINK_DEBUG], [test "$enable_netlink_debug" != "no"])
-if test "$enable_time_check" != "no" ; then
- if test "$enable_time_check" = "yes" -o "$enable_time_check" = "" ; then
- AC_DEFINE([CONSUMED_TIME_CHECK], [5000000], [Consumed Time Check])
- else
- AC_DEFINE_UNQUOTED([CONSUMED_TIME_CHECK], [$enable_time_check], [Consumed Time Check])
- fi
-fi
-
-case "${enable_cpu_time}" in
- "no")
- AC_DEFINE([EXCLUDE_CPU_TIME], [1], [Exclude getrusage data gathering])
- ;;
- "*")
- ;;
-esac
-
if test "$enable_datacenter" = "yes" ; then
AC_DEFINE([HAVE_DATACENTER], [1], [Compile extensions for a DataCenter])
DFLT_NAME="datacenter"
@@ -2912,12 +2892,6 @@ directory and to the config files in the config file directory."
if test -n "$enable_datacenter"; then
AC_MSG_WARN([The --enable-datacenter compile time option is deprecated. Please modify the init script to pass -F datacenter to the daemons instead.])
fi
-if test -n "$enable_time_check"; then
- AC_MSG_WARN([The --enable-time-check compile time option is deprecated. Please use the service cputime-stats configuration option instead.])
-fi
-if test -n "$enable_cpu_time"; then
- AC_MSG_WARN([The --enable-cpu-time compile time option is deprecated. Please use the service cputime-warning NNN configuration option instead.])
-fi
if test "$enable_doc" != "no" -a "$frr_py_mod_sphinx" = "false"; then
AC_MSG_WARN([sphinx is missing but required to build documentation])
diff --git a/doc/user/basic.rst b/doc/user/basic.rst
index 337cfff937..bbf24c5eed 100644
--- a/doc/user/basic.rst
+++ b/doc/user/basic.rst
@@ -92,9 +92,6 @@ Basic Config Commands
of some routine in FRR mistakenly blocking/hogging the processing loop and
should be reported as a FRR bug.
- The default limit is 5 seconds (i.e. 5000), but this can be changed by the
- deprecated ``--enable-time-check=...`` compile-time option.
-
This command has no effect if :clicmd:`service cputime-stats` is disabled.
.. clicmd:: service walltime-warning (1-4294967295)
@@ -106,9 +103,6 @@ Basic Config Commands
provide an immediate sign that FRR is not operating correctly due to
externally caused starvation.)
- The default limit is 5 seconds as above, including the same deprecated
- ``--enable-time-check=...`` compile-time option.
-
.. clicmd:: log trap LEVEL
These commands are deprecated and are present only for historical
@@ -684,8 +678,7 @@ Terminal Mode Commands
This command displays system run statistics for all the different event
types. If no options is specified all different run types are displayed
together. Additionally you can ask to look at (r)ead, (w)rite, (t)imer,
- (e)vent and e(x)ecute thread event types. If you have compiled with
- disable-cpu-time then this command will not show up.
+ (e)vent and e(x)ecute thread event types.
.. clicmd:: show thread poll
diff --git a/doc/user/installation.rst b/doc/user/installation.rst
index 8e8fb24608..24c6c223e3 100644
--- a/doc/user/installation.rst
+++ b/doc/user/installation.rst
@@ -351,20 +351,6 @@ options from the list below.
Use libpam for PAM support in vtysh.
-.. option:: --enable-time-check XXX
-
- This option is deprecated as it was replaced by the
- :clicmd:`service cputime-stats` CLI command, which may be adjusted at
- runtime rather than being a compile-time setting. See there for further
- detail.
-
-.. option:: --disable-cpu-time
-
- This option is deprecated as it was replaced by the
- :clicmd:`service cputime-warning NNN` CLI command, which may be adjusted at
- runtime rather than being a compile-time setting. See there for further
- detail.
-
.. option:: --enable-pcreposix
Turn on the usage of PCRE Posix libs for regex functionality.
diff --git a/lib/command.c b/lib/command.c
index affb551b45..1977dc4fae 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -477,33 +477,18 @@ static int config_write_host(struct vty *vty)
}
log_config_write(vty);
- /* print disable always, but enable only if default is flipped
- * => prep for future removal of compile-time knob
- */
if (!cputime_enabled)
vty_out(vty, "no service cputime-stats\n");
-#ifdef EXCLUDE_CPU_TIME
- else
- vty_out(vty, "service cputime-stats\n");
-#endif
if (!cputime_threshold)
vty_out(vty, "no service cputime-warning\n");
-#if defined(CONSUMED_TIME_CHECK) && CONSUMED_TIME_CHECK != 5000000
- else /* again, always print non-default */
-#else
- else if (cputime_threshold != 5000000)
-#endif
+ else if (cputime_threshold != CONSUMED_TIME_CHECK)
vty_out(vty, "service cputime-warning %lu\n",
cputime_threshold / 1000);
if (!walltime_threshold)
vty_out(vty, "no service walltime-warning\n");
-#if defined(CONSUMED_TIME_CHECK) && CONSUMED_TIME_CHECK != 5000000
- else /* again, always print non-default */
-#else
- else if (walltime_threshold != 5000000)
-#endif
+ else if (walltime_threshold != CONSUMED_TIME_CHECK)
vty_out(vty, "service walltime-warning %lu\n",
walltime_threshold / 1000);
diff --git a/lib/event.c b/lib/event.c
index 458e29f248..122d3cd9a1 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -75,14 +75,7 @@ static struct list *masters;
static void thread_free(struct event_loop *master, struct event *thread);
-#ifndef EXCLUDE_CPU_TIME
-#define EXCLUDE_CPU_TIME 0
-#endif
-#ifndef CONSUMED_TIME_CHECK
-#define CONSUMED_TIME_CHECK 0
-#endif
-
-bool cputime_enabled = !EXCLUDE_CPU_TIME;
+bool cputime_enabled = true;
unsigned long cputime_threshold = CONSUMED_TIME_CHECK;
unsigned long walltime_threshold = CONSUMED_TIME_CHECK;
diff --git a/lib/frrevent.h b/lib/frrevent.h
index ab779d9088..3f74df359b 100644
--- a/lib/frrevent.h
+++ b/lib/frrevent.h
@@ -18,6 +18,8 @@
extern "C" {
#endif
+#define CONSUMED_TIME_CHECK 5000000
+
extern bool cputime_enabled;
extern unsigned long cputime_threshold;
/* capturing wallclock time is always enabled since it is fast (reading