struct task;
struct buffer;
extern unsigned int debug_commands_issued;
+extern unsigned int warn_blocked_issued;
+
void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx);
void ha_thread_dump_one(int thr, int from_signal);
void ha_dump_backtrace(struct buffer *buf, const char *prefix, int dump);
ST_I_INF_NICED_TASKS,
ST_I_INF_CURR_STRM,
ST_I_INF_CUM_STRM,
+ ST_I_INF_WARN_BLOCKED,
/* must always be the last one */
ST_I_INF_MAX
} post_mortem ALIGNED(256) HA_SECTION("_post_mortem") = { };
unsigned int debug_commands_issued = 0;
+unsigned int warn_blocked_issued = 0;
/* dumps a backtrace of the current thread that is appended to buffer <buf>.
* Lines are prefixed with the string <prefix> which may be empty (used for
return;
}
+ HA_ATOMIC_INC(&warn_blocked_issued);
+
buf = b_make(msg_buf, sizeof(msg_buf), 0, 0);
p = HA_ATOMIC_LOAD(&ha_thread_ctx[thr].prev_cpu_time);
[ST_I_INF_NICED_TASKS] = { .name = "Niced_tasks", .desc = "Total number of active tasks+tasklets in the current worker process (Run_queue) that are niced" },
[ST_I_INF_CURR_STRM] = { .name = "CurrStreams", .desc = "Current number of streams on this worker process" },
[ST_I_INF_CUM_STRM] = { .name = "CumStreams", .desc = "Total number of streams created on this worker process since started" },
+ [ST_I_INF_WARN_BLOCKED] = { .name = "BlockedTrafficWarnings", .desc = "Total number of warnings issued about traffic being blocked by too slow a task" },
};
/* one line of info */
line[ST_I_INF_NICED_TASKS] = mkf_u32(0, total_niced_running_tasks());
line[ST_I_INF_CURR_STRM] = mkf_u64(0, glob_curr_strms);
line[ST_I_INF_CUM_STRM] = mkf_u64(0, glob_cum_strms);
+ line[ST_I_INF_WARN_BLOCKED] = mkf_u32(0, warn_blocked_issued);
return 1;
}