Mheap.c has its own highly accurate memory leak checker. I haven’t tried the
valgrind integration in many years. Valgrind makes vpp run slowly enough to
make it unusable.
To use the built-in leakfinder: build TAG=vpp_debug, set #define
MHEAP_HAVE_SMALL_OBJECT_CACHE to 0 in .../src/vppinfra/mheap_bootstrap.h.
Then:
* Start vpp, configure it, and so forth.
* “memory-trace on”
*
* “show memory”
“show memory” prints a nice report of all memory allocated during .
HTH… Dave
P.S. You probably won’t want to see all of the initial memory allocations, but
if you do supply the command line stanza “ ... vlib { ... memory-trace ... }”
From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On
Behalf Of Saeed P
Sent: Monday, January 8, 2018 3:23 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Memory Leakage Test By Valgrind
Hi,
I want to check memory leakage on VPP so I use Valgrind memcheck tool to do it,
but it gives me a lot of errors on output, like "Invalid read of size ..." and
at the end of the valgrind memcheck report is saying :
"This is usually caused by using VALGRIND_MALLOCLIKE_BLOCK in an inappropriate
way."
I compile VPP with CLIB_DEBUG=1 (make build command) so the code includes the
signals
to valgrind regarding VPP has its own memory allocator.
I use command with options below:
valgrind --leak-check=full
--show-leak-kinds=all
--read-var-info=yes
--trace-children=yes
--fair-sched=yes
--log-file=memcheck-output.log
/root/vpp/build-root/install-vpp_debug-native/vpp/bin/vpp \
-c /etc/vpp/startup.conf
Do you test Valgrind Memcheck on VPP successfully?
which command and configuration use?
Is there any useful tool for that, except internal commands:
"show memory" , "memory-trace"
Thanks,
-Saeed
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev