mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-03-13 19:11:08 +01:00
MINOR: actions: also report execution contexts registered directly
This now reports directly registered actions using new type TH_EX_CTX_ACTION which will report the first keyword of the list.
This commit is contained in:
parent
861d1111c3
commit
43b56c22c7
@ -84,6 +84,7 @@ enum thread_exec_ctx_type {
|
||||
TH_EX_CTX_SMPF, /* directly registered sample fetch function, using .smpf_kwl */
|
||||
TH_EX_CTX_CONV, /* directly registered converter function, using .conv_kwl */
|
||||
TH_EX_CTX_FUNC, /* hopefully recognizable function/callback, using .pointer */
|
||||
TH_EX_CTX_ACTION, /* directly registered action function, using .action_kwl */
|
||||
};
|
||||
|
||||
struct thread_exec_ctx {
|
||||
@ -95,6 +96,7 @@ struct thread_exec_ctx {
|
||||
const struct ha_caller *ha_caller; /* used with TH_EX_CTX_CALLER */
|
||||
const struct sample_fetch_kw_list *smpf_kwl; /* used with TH_EX_CTX_SMPF */
|
||||
const struct sample_conv_kw_list *conv_kwl; /* used with TH_EX_CTX_CONV */
|
||||
const struct action_kw_list *action_kwl; /* used with TH_EX_CTX_ACTION */
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -400,6 +400,9 @@ void act_add_list(struct list *head, struct action_kw_list *kw_list)
|
||||
if (caller_initcall) {
|
||||
kw_list->kw[i].exec_ctx.type = TH_EX_CTX_INITCALL;
|
||||
kw_list->kw[i].exec_ctx.initcall = caller_initcall;
|
||||
} else {
|
||||
kw_list->kw[i].exec_ctx.type = TH_EX_CTX_ACTION;
|
||||
kw_list->kw[i].exec_ctx.action_kwl = kw_list;
|
||||
}
|
||||
}
|
||||
LIST_APPEND(head, &kw_list->list);
|
||||
|
||||
@ -7539,6 +7539,9 @@ void chunk_append_thread_ctx(struct buffer *output, const struct thread_exec_ctx
|
||||
resolve_sym_name(output, "func '", ctx->pointer);
|
||||
chunk_appendf(output,"'");
|
||||
break;
|
||||
case TH_EX_CTX_ACTION:
|
||||
chunk_appendf(output,"act kwl starting with '%s'", ctx->action_kwl->kw[0].kw);
|
||||
break;
|
||||
default:
|
||||
chunk_appendf(output,"other ctx %p", ctx->pointer);
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user