mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-08 16:23:24 -04:00
BUG/MINOR: debug: make ha_task_dump() actually dump the requested task
It used to only dump the current task, which isn't different for now but the purpose clearly is to dump the requested task. No backport is needed.
This commit is contained in:
parent
231ec395c1
commit
14a1ab75d0
1 changed files with 10 additions and 10 deletions
20
src/debug.c
20
src/debug.c
|
|
@ -75,27 +75,27 @@ void ha_thread_dump(int thr)
|
|||
*/
|
||||
void ha_task_dump(const struct task *task, const char *pfx)
|
||||
{
|
||||
if (!curr_task) {
|
||||
if (!task) {
|
||||
chunk_appendf(&trash, "0\n");
|
||||
return;
|
||||
}
|
||||
|
||||
chunk_appendf(&trash,
|
||||
"%p (%s) calls=%u last=%llu%s\n",
|
||||
curr_task, TASK_IS_TASKLET(curr_task) ? "tasklet" : "task",
|
||||
curr_task->calls,
|
||||
curr_task->call_date ? (unsigned long long)(now_mono_time() - curr_task->call_date) : 0,
|
||||
curr_task->call_date ? " ns ago" : "");
|
||||
task, TASK_IS_TASKLET(task) ? "tasklet" : "task",
|
||||
task->calls,
|
||||
task->call_date ? (unsigned long long)(now_mono_time() - task->call_date) : 0,
|
||||
task->call_date ? " ns ago" : "");
|
||||
|
||||
chunk_appendf(&trash, "%s"
|
||||
" fct=%p (%s) ctx=%p\n",
|
||||
pfx,
|
||||
curr_task->process,
|
||||
curr_task->process == process_stream ? "process_stream" :
|
||||
curr_task->process == task_run_applet ? "task_run_applet" :
|
||||
curr_task->process == si_cs_io_cb ? "si_cs_io_cb" :
|
||||
task->process,
|
||||
task->process == process_stream ? "process_stream" :
|
||||
task->process == task_run_applet ? "task_run_applet" :
|
||||
task->process == si_cs_io_cb ? "si_cs_io_cb" :
|
||||
"?",
|
||||
curr_task->context);
|
||||
task->context);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue