]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pools/memprof: store and report the pool's name in each bin
authorWilly Tarreau <w@1wt.eu>
Wed, 17 Aug 2022 07:35:16 +0000 (09:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 17 Aug 2022 08:34:00 +0000 (10:34 +0200)
commit42b180dcdb0fd51467ce69882d48649b160bcdf4
tree452407e4d73b03bd52501fb84e2de4a1e3724f9c
parentfacfad2b64518e2e43ed20ae0bccce4e77503f1b
MINOR: pools/memprof: store and report the pool's name in each bin

Storing the pointer to the pool along with the stats is quite useful as
it allows to report the name. That's what we're doing here. We could
store it in place of another field but that's not convenient as it would
require to change all functions that manipulate counters. Thus here we
store one extra field, as well as some padding because the struct turns
56 bytes long, thus better go to 64 directly. Example of output from
"show profiling memory":

      2      0       48         0|  0x4bfb2c ha_quic_set_encryption_secrets+0xcc/0xb5e p_alloc(24) [pool=quic_tls_iv]
      0  55252        0  10608384|  0x4bed32 main+0x2beb2 free(-192)
     15      0     2760         0|  0x4be855 main+0x2b9d5 p_alloc(184) [pool=quic_frame]
      1      0     1048         0|  0x4be266 ha_quic_add_handshake_data+0x2b6/0x66d p_alloc(1048) [pool=quic_crypto]
      3      0      552         0|  0x4be142 ha_quic_add_handshake_data+0x192/0x66d p_alloc(184) [pool=quic_frame]
  31276      0  6755616         0|  0x4bb8f9 quic_sock_fd_iocb+0x689/0x69b p_alloc(216) [pool=quic_dgram]
      0  31424        0   6787584|  0x4bb7f3 quic_sock_fd_iocb+0x583/0x69b p_free(-216) [pool=quic_dgram]
    152      0    32832         0|  0x4bb4d9 quic_sock_fd_iocb+0x269/0x69b p_alloc(216) [pool=quic_dgram]
include/haproxy/activity-t.h
src/activity.c
src/pool.c