MINOR: debug: report the number of entries in the backtrace
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Mar 2020 06:38:23 +0000 (07:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 May 2020 15:09:20 +0000 (17:09 +0200)
It's useful to get an indication of unresolved stuff or memory
corruption to have the apparent depth of the stack trace in the
output, especially if we dump nothing.

(cherry picked from commit cdd8074433d8ada867ba9b2bc11db098fd363035)
Signed-off-by: Willy Tarreau <w@1wt.eu>

src/debug.c

index bd9d6f3..045756b 100644 (file)
@@ -108,7 +108,7 @@ void ha_thread_dump(struct buffer *buf, int thr, int calling_tid)
                   would produce similar output to the following: */
 
                if (nptrs)
-                       chunk_appendf(buf, "             call trace:\n");
+                       chunk_appendf(buf, "             call trace(%d):\n", nptrs);
 
 #ifndef USE_DL
                /* if we can't rely on dladdr1() we won't figure what level is