]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: shctx: name shared memory using vma_set_name()
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 20 May 2024 12:11:31 +0000 (14:11 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Tue, 21 May 2024 15:55:03 +0000 (17:55 +0200)
commit6de0da1b54295fdac46e16b5e7707b2199b305f9
treec28ab4991a032b132e769241fcc4ceac3c6731a7
parent51a8f134efcd26d29c3deabbb10084716d05cee9
DEBUG: shctx: name shared memory using vma_set_name()

In 98d22f212 ("MEDIUM: shctx: Naming shared memory context"), David
implemented prctl/PR_SET_VMA support to give a name to shctx maps when
supported. Maps were named after "HAProxy $name". It turns out that it
is not relevant to include "HAProxy" in the map name, given that we're
already looking at maps for a given PID (and here it's HAProxy's pid).

Instead, let's name shctx maps by making use of the new vma_set_name()
helper introduced by previous commit. Resulting maps will be named
"shctx:$name", e.g.: "shctx:globalCache", they will appear like this in
/proc/<pid>/maps:

7ec6aab0f000-7ec6ac000000 rw-s 00000000 00:01 405                        [anon_shmem:shctx:custom_name]
src/shctx.c