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.
This commit is contained in:
parent
009b5519e6
commit
e69919d1ba
|
@ -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 */
|
||||
|
|
18
src/debug.c
18
src/debug.c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue