CLEANUP: debug: remove the now unused ha_thread_dump_all_to_trash()
The function isn't used anymore since each call place performs its
own loop. Let's get rid of it.
diff --git a/include/haproxy/debug.h b/include/haproxy/debug.h
index 2889c0e..17880e4 100644
--- a/include/haproxy/debug.h
+++ b/include/haproxy/debug.h
@@ -30,7 +30,6 @@
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 */
diff --git a/src/debug.c b/src/debug.c
index d23904d..ce9d44c 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -117,9 +117,9 @@
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 @@
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 @@
}
#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