MINOR: mux-h2: count glitches when they're reported
authorWilly Tarreau <w@1wt.eu>
Thu, 14 Nov 2024 07:54:32 +0000 (08:54 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 14 Nov 2024 08:01:57 +0000 (09:01 +0100)
commitdf93cf72b9995c9580649e6e69a82692decc3f83
tree918300d5b95393acca99795a0c6d09e97aefabfc
parent502790ed7e76ccf73b481aa110c3e6607b2e75d2
MINOR: mux-h2: count glitches when they're reported

The h2c_report_glitch() function is now replaced with a macro to support
enumerating counters for each individual glitch line. For now this adds
43 such counters. The macro supports an optional description, though that
is not being used for now. It gives outputs like this (note that the last
one was purposely instrumented to pass a description):

   > debug dev counters glt all
   0          GLT mux_h2.c:5976 h2c_dec_hdrs()
   0          GLT mux_h2.c:5960 h2c_dec_hdrs()
   (...)
   0          GLT mux_h2.c:2207 h2c_frt_recv_preface()
   0          GLT mux_h2.c:1954 h2c_frt_stream_new(): new stream too early

As a reminder, this requires to build with -DDEBUG_GLITCHES=1.
src/mux_h2.c