TH_EX_CTX_OTHER, /* context only known by a generic pointer */
TH_EX_CTX_INITCALL, /* the pointer is an initcall providing file:line */
TH_EX_CTX_CALLER, /* the pointer is an ha_caller of the caller providing file:line etc */
+ TH_EX_CTX_SMPF, /* directly registered sample fetch function, using .smpf_kwl */
+ TH_EX_CTX_CONV, /* directly registered converter function, using .conv_kwl */
};
struct thread_exec_ctx {
const void *pointer; /* generic pointer (for other) */
const struct initcall *initcall; /* used with TH_EX_CTX_INITCALL */
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 */
};
};
if (caller_initcall) {
sf->exec_ctx.type = TH_EX_CTX_INITCALL;
sf->exec_ctx.initcall = caller_initcall;
+ } else {
+ sf->exec_ctx.type = TH_EX_CTX_SMPF;
+ sf->exec_ctx.smpf_kwl = kwl;
}
}
LIST_APPEND(&sample_fetches.list, &kwl->list);
if (caller_initcall) {
sc->exec_ctx.type = TH_EX_CTX_INITCALL;
sc->exec_ctx.initcall = caller_initcall;
+ } else {
+ sc->exec_ctx.type = TH_EX_CTX_CONV;
+ sc->exec_ctx.conv_kwl = pckl;
}
}
LIST_APPEND(&sample_convs.list, &pckl->list);
chunk_appendf(output,"ctx registered at %s@%s:%d", ctx->ha_caller->func, slash, ctx->ha_caller->line);
break;
}
+ case TH_EX_CTX_SMPF:
+ chunk_appendf(output,"smpf kwl starting with '%s'", ctx->smpf_kwl->kw[0].kw);
+ break;
+ case TH_EX_CTX_CONV:
+ chunk_appendf(output,"conv kwl starting with '%s'", ctx->conv_kwl->kw[0].kw);
+ break;
default:
chunk_appendf(output,"other ctx %p", ctx->pointer);
break;