mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
MINOR: debug: indicate the applet name when the task is task_run_applet()
This allows to figure what applet is currently being executed (and likely hung).
This commit is contained in:
parent
6f9fe36676
commit
a512b02f67
@ -89,6 +89,7 @@ void ha_thread_dump(struct buffer *buf, int thr, int calling_tid)
|
|||||||
void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
|
void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
|
||||||
{
|
{
|
||||||
const struct stream *s = NULL;
|
const struct stream *s = NULL;
|
||||||
|
const struct appctx __maybe_unused *appctx = NULL;
|
||||||
|
|
||||||
if (!task) {
|
if (!task) {
|
||||||
chunk_appendf(buf, "0\n");
|
chunk_appendf(buf, "0\n");
|
||||||
@ -109,7 +110,7 @@ void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
|
|||||||
task->call_date ? " ns ago" : "");
|
task->call_date ? " ns ago" : "");
|
||||||
|
|
||||||
chunk_appendf(buf, "%s"
|
chunk_appendf(buf, "%s"
|
||||||
" fct=%p (%s) ctx=%p\n",
|
" fct=%p (%s) ctx=%p",
|
||||||
pfx,
|
pfx,
|
||||||
task->process,
|
task->process,
|
||||||
task->process == process_stream ? "process_stream" :
|
task->process == process_stream ? "process_stream" :
|
||||||
@ -118,6 +119,11 @@ void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
|
|||||||
"?",
|
"?",
|
||||||
task->context);
|
task->context);
|
||||||
|
|
||||||
|
if (task->process == task_run_applet && (appctx = task->context))
|
||||||
|
chunk_appendf(buf, "(%s)\n", appctx->applet->name);
|
||||||
|
else
|
||||||
|
chunk_appendf(buf, "\n");
|
||||||
|
|
||||||
if (task->process == process_stream && task->context)
|
if (task->process == process_stream && task->context)
|
||||||
s = (struct stream *)task->context;
|
s = (struct stream *)task->context;
|
||||||
else if (task->process == task_run_applet && task->context)
|
else if (task->process == task_run_applet && task->context)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user