]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: activity: better report nil than ffff in unknown callers
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Nov 2024 09:28:14 +0000 (10:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 21 Nov 2024 18:58:06 +0000 (19:58 +0100)
commitf3547d0b74ea1afe479538851ad2bddb44eded0a
tree41457dc4e7e73a3075d18e4d17aac576f3eac054
parented3ed358676edf058663bde7ec6098b51f8bc745
MINOR: activity: better report nil than ffff in unknown callers

For unknown callers we try to get the lowest known address and we
purposely ignore NULL during calculation of the min. But the side
effect is that we also report ffff in the per-DSO address. Better
catch this case and finally accept to report nil. Before it would
report this:

  $ socat - /tmp/sock1 <<< "show profiling memory" |grep nil
        50000          10        9600000           9440|            (nil) [other] unknown(192) [delta=9590560] [pool=http_txn]
        50000          10        9600000           9440|            (nil) DSO:other; delta_calls=49990; delta_bytes=9590560

now it reports this:

  $ socat - /tmp/sock1 <<< "show profiling memory" |grep nil
        50000          11        9600000           9656|            (nil) [other] unknown(192) [delta=9590344] [pool=connection]
        50000          11        9600000           9656|            (nil) DSO:other; delta_calls=49989; delta_bytes=9590344
src/activity.c