BUG/MINOR: activity/memprofile: reinitialize the free calls on DSO summary
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Nov 2024 14:26:23 +0000 (15:26 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Nov 2024 14:49:33 +0000 (15:49 +0100)
commit992c3c2b67420de2f4eabc289bc097cc93081627
tree808b5b31d53d33d7d4be0591426a6049d4bf02ae
parent5e704ead9a8e79891b595e7a7e1311874e041a9e
BUG/MINOR: activity/memprofile: reinitialize the free calls on DSO summary

In commit 401fb0e87a ("MINOR: activity/memprofile: show per-DSO stats")
we added a summary per DSO. However the free calls/tot were not initialized
when creating a new entry because initially they were applied to any entry,
but since we don't update free calls for non-free capable callers, we still
need to reinitialize these entries when reassigning one. Because of this
bug, a "show profiling memory" output can randomly show highly negative
values on the DSO lines if it turns out that the DSO entry was created on
an alloc instead of a realloc/free.

Since the commit above was backported to 2.9, this one must go there as
well.

(cherry picked from commit c42a2b8c945d1b45672a2b1715dfa586daaec657)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/activity.c