]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: debug: store and report the pool's name in struct mem_stats
authorWilly Tarreau <w@1wt.eu>
Tue, 9 Aug 2022 06:15:27 +0000 (08:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 9 Aug 2022 06:26:59 +0000 (08:26 +0200)
commit55c950baa98b79759f3783c04415a628e0faa15a
treeedb8c2e2104acfcec2726cff75c04f951509fd62
parent4bc37086b8c46991692c6ac368762722ee3c87c6
MINOR: debug: store and report the pool's name in struct mem_stats

Let's add a generic "extra" pointer to the struct mem_stats to store
context-specific information. When tracing pool_alloc/pool_free, we
can now store a pointer to the pool, which allows to report the pool
name on an extra column. This significantly improves tracing
capabilities.

Example:

  proxy.c:1598      CALLOC   size:  28832  calls:  4     size/call:  7208
  dynbuf.c:55       P_FREE   size:  32768  calls:  2     size/call:  16384  buffer
  quic_tls.h:385    P_FREE   size:  34008  calls:  1417  size/call:  24     quic_tls_iv
  quic_tls.h:389    P_FREE   size:  34008  calls:  1417  size/call:  24     quic_tls_iv
  quic_tls.h:554    P_FREE   size:  34008  calls:  1417  size/call:  24     quic_tls_iv
  quic_tls.h:558    P_FREE   size:  34008  calls:  1417  size/call:  24     quic_tls_iv
  quic_tls.h:562    P_FREE   size:  34008  calls:  1417  size/call:  24     quic_tls_iv
  quic_tls.h:401    P_ALLOC  size:  34080  calls:  1420  size/call:  24     quic_tls_iv
  quic_tls.h:403    P_ALLOC  size:  34080  calls:  1420  size/call:  24     quic_tls_iv
  xprt_quic.c:4060  MALLOC   size:  45376  calls:  5672  size/call:  8
  quic_sock.c:328   P_ALLOC  size:  46440  calls:  215   size/call:  216    quic_dgram
include/haproxy/bug.h
include/haproxy/pool.h
src/debug.c