]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Drop deprecated enable-time-check, enable-cpu-time compile options 14482/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Sun, 24 Sep 2023 17:41:24 +0000 (20:41 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Sun, 24 Sep 2023 17:41:24 +0000 (20:41 +0300)
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
configure.ac
doc/user/basic.rst
doc/user/installation.rst
lib/command.c
lib/event.c
lib/frrevent.h

index 97f9e6a826bce54f4626d31bd26f3377c98ef143..b28fc737e0b27c7231e38b572994ac9244147cf6 100644 (file)
@@ -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])
index 337cfff9378ff1b969cf63696f840f5e26997916..bbf24c5eed94cb27c03a956c52c63f24d68fad21 100644 (file)
@@ -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
 
index 8e8fb246086b89461a1bbd0a36f940c4bb542dce..24c6c223e3e1d53497850b3fe9ea8180e3256eb9 100644 (file)
@@ -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.
index affb551b459816ed4557538dc145e34abd3c5504..1977dc4faed4582e46fc18d336d77a92e6276c54 100644 (file)
@@ -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);
 
index 458e29f2481bc26b6593b97bfb3bef5efc013f24..122d3cd9a1fa0359fd210dafda608684ce87579c 100644 (file)
@@ -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;
 
index ab779d90889d07154d31ba240cb582aaaa85b0a8..3f74df359bc204930bb659187b7ae7a93a313595 100644 (file)
@@ -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