]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: debug: remove the now unused ha_thread_dump_all_to_trash()
authorWilly Tarreau <w@1wt.eu>
Thu, 4 May 2023 17:19:04 +0000 (19:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 4 May 2023 17:19:04 +0000 (19:19 +0200)
The function isn't used anymore since each call place performs its
own loop. Let's get rid of it.

include/haproxy/debug.h
src/debug.c

index 2889c0ebba9e62c8e05891cea89dc7065ec7cf87..17880e4e3e24bc70f12b44e9efff0a5112850d74 100644 (file)
@@ -30,7 +30,6 @@ void ha_thread_dump_one(int thr, int from_signal);
 void ha_thread_dump(struct buffer *buf, int thr);
 void ha_dump_backtrace(struct buffer *buf, const char *prefix, int dump);
 void ha_backtrace_to_stderr(void);
-void ha_thread_dump_all_to_trash(void);
 void ha_panic(void);
 
 #endif /* _HAPROXY_DEBUG_H */
index d23904d70a3e42a518851a2ec9e7463add01ca5f..ce9d44cd6bc2c82c440ce997462dc7ef15b7e57a 100644 (file)
@@ -117,9 +117,9 @@ void ha_dump_backtrace(struct buffer *buf, const char *prefix, int dump)
                addr = resolve_sym_name(buf, ": ", callers[j]);
                if ((dump & 3) == 0) {
                        /* dump not started, will start *after* ha_thread_dump_one(),
-                        * ha_thread_dump_all_to_trash, ha_panic and ha_backtrace_to_stderr
+                        * ha_panic and ha_backtrace_to_stderr
                         */
-                       if (addr == ha_thread_dump_all_to_trash || addr == ha_panic ||
+                       if (addr == ha_panic ||
                            addr == ha_backtrace_to_stderr || addr == ha_thread_dump_one)
                                dump++;
                        *buf = bak;
@@ -128,7 +128,7 @@ void ha_dump_backtrace(struct buffer *buf, const char *prefix, int dump)
 
                if ((dump & 3) == 1) {
                        /* starting */
-                       if (addr == ha_thread_dump_all_to_trash || addr == ha_panic ||
+                       if (addr == ha_panic ||
                            addr == ha_backtrace_to_stderr || addr == ha_thread_dump_one) {
                                *buf = bak;
                                continue;
@@ -1693,18 +1693,6 @@ static void debug_release_memstats(struct appctx *appctx)
 }
 #endif
 
-/* This function dumps all threads' state to the trash. Depending on the
- * build options it will either inspect them directly or will signal each
- * thread in turn to report their own dump.
- */
-void ha_thread_dump_all_to_trash()
-{
-       unsigned int thr;
-
-       for (thr = 0; thr < global.nbthread; thr++)
-               ha_thread_dump(&trash, thr);
-}
-
 #ifdef USE_THREAD_DUMP
 
 /* handles DEBUGSIG to dump the state of the thread it's working on. This is