MINOR: mux-h1: make the "show fd" helper also decode the h1s subscriber when known

When dumping a live h1 stream, also take the opportunity for reporting
the subscriber including the event, tasklet, handler and context. Example:

   3030 : st=0x21(R:rA W:Ra) ev=0x04(heOpi) [Lc] tmask=0x4 umask=0x0 owner=0x7f97805c1f70 iocb=0x65b847(sock_conn_iocb) back=1 cflg=0x00002300 sv=s1/recv mux=H1 ctx=0x7f97805c21b0 h1c.flg=0x80000200 .sub=1 .ibuf=0@(nil)+0/0 .obuf=0@(nil)+0/0 h1s=0x7f97805c2380 h1s.flg=0x4010 .req.state=MSG_DATA .res.state=MSG_RPBEFORE .meth=POST status=0 .cs.flg=0x00000000 .cs.data=0x7f97805c1720 .subs=0x7f97805c1748(ev=1 tl=0x7f97805c1990 tl.calls=2 tl.ctx=0x7f97805c1720 tl.fct=si_cs_io_cb) xprt=RAW
This commit is contained in:
Willy Tarreau 2021-01-20 17:05:58 +01:00
parent 98e40b9818
commit 150c4f8b72

View File

@ -3168,6 +3168,18 @@ static void h1_show_fd(struct buffer *msg, struct connection *conn)
if (h1s->cs)
chunk_appendf(msg, " .cs.flg=0x%08x .cs.data=%p",
h1s->cs->flags, h1s->cs->data);
chunk_appendf(&trash, " .subs=%p", h1s->subs);
if (h1s->subs) {
if (h1s->subs) {
chunk_appendf(&trash, "(ev=%d tl=%p", h1s->subs->events, h1s->subs->tasklet);
chunk_appendf(&trash, " tl.calls=%d tl.ctx=%p tl.fct=",
h1s->subs->tasklet->calls,
h1s->subs->tasklet->context);
resolve_sym_name(&trash, NULL, h1s->subs->tasklet->process);
chunk_appendf(&trash, ")");
}
}
}
}