]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: pollers: add name hint for large memory areas used by pollers
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 21 May 2024 08:21:24 +0000 (10:21 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Tue, 21 May 2024 15:55:14 +0000 (17:55 +0200)
commitabb8412d20ba3b933165b7584c6c50b2c4aac009
tree0ab12cf25b9a063e31c593694ad53ec02b74ab7f
parent6c5869f8461a0be2b4839690f446a3aaa6e34006
DEBUG: pollers: add name hint for large memory areas used by pollers

Thanks to ("MINOR: tools: add vma_set_name() helper"), set a name hint
for large memory areas allocated by pollers upon init so that they can
be easily indentified in /proc/<pid>/maps.

For now, only linux-compatible pollers are considered since vma_set_name()
requires a recent linux kernel (>= 5.17).

Depending on malloc() implementation, such memory areas will normally be
merged on the heap under MMAP_THRESHOLD (128 kB by default) and will
have a dedicated memory area once the threshold is exceeded. As such, when
large enough, they will appear like this in /proc/<pid>/maps:

7ec6b2d40000-7ec6b2d61000 rw-p 00000000 00:00 0                          [anon:ev_poll:fd_evts_wr]
7ec6b2d61000-7ec6b2d82000 rw-p 00000000 00:00 0                          [anon:ev_poll:fd_evts_rd]
src/ev_epoll.c
src/ev_poll.c
src/ev_select.c