From: hellokitty Subject: How to use valgrind to detect xen hypervisor's memory leak Date: Thu, 14 Jul 2011 19:42:54 -0700 (PDT) Message-ID: <1310697774774-4589174.post@n5.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi all, Thanks to Ian Campbell, I am a student and now i am doing a research about using valgrind to detect xen hypervisor's memory leak . The procedure of my detection is as follows: First I follow the patch http://xen.1045712.n5.nabble.com/PATCHv2-valgrind-support-for-Xen-privcmd-i= octls-hypercalls-tc2640861.html#a4568310=20 to let valgrind support Xen privcmd/hypercall. Second I compile the source code of valgrind (have patched the upper patch)=20 Third I use the valgrind tool to detect the hypervisor's memory leak = . =20 And the issues now i have are as follows: =091 , Now i come to second step , and i run the commands to compile the source code : 1) ./configure --with-xen=3D/usr/include/xen/ 2) make && make install here i encounter the following error messages, how to fix it ? =20 ---------------------------------------------------------------------------= ----------- =09=09echo "# This is a generated file, composed of the following suppressi= on =09=09rules:" > default.supp =09=09echo "# " exp-ptrcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.s= upp =09=09glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp >> default.supp =09=09cat exp-ptrcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp =09=09glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp >> default.supp =09=09make all-recursive =09=09make[1]: Entering directory `/home/popo/valgrind-3.6.1' =09=09Making all in include =09=09make[2]: Entering directory `/home/popo/valgrind-3.6.1/include' =09=09make[2]: Nothing to be done for `all'. =09=09make[2]: Leaving directory `/home/popo/valgrind-3.6.1/include' =09=09Making all in VEX =09=09make[2]: Entering directory `/home/popo/valgrind-3.6.1/VEX' =09=09make all-am =09=09make[3]: Entering directory `/home/popo/valgrind-3.6.1/VEX' =09=09make[3]: Nothing to be done for `all-am'. =09=09make[3]: Leaving directory `/home/popo/valgrind-3.6.1/VEX' =09=09make[2]: Leaving directory `/home/popo/valgrind-3.6.1/VEX' =09=09Making all in coregrind =09=09make[2]: Entering directory `/home/popo/valgrind-3.6.1/coregrind' =09=09make all-am =09=09make[3]: Entering directory `/home/popo/valgrind-3.6.1/coregrind' =09=09gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -DVGA_x8= 6=3D1 =09=09-DVGO_linux=3D1 -DVGP_x86_linux=3D1 -I../coregrind =09=09-DVG_LIBDIR=3D"\"/usr/local/lib/valgrind"\" -DVG_PLATFORM=3D"\"x86-li= nux\""=20 =09=09-m32 -mpreferred-stack-boundary=3D2 -O2 -g -Wall -Wmissing-prototypes -Wshadow =09=09-Wpointer-arith -Wstrict-prototypes -Wmissing-declarations =09=09-Wno-format-zero-length -fno-strict-aliasing @XEN_CFLAGS@ -Wno-long-l= ong=20 =09=09-Wno-pointer-sign -fno-stack-protector -MT =09=09libcoregrind_x86_linux_a-m_debuglog.o -MD -MP -MF =09=09.deps/libcoregrind_x86_linux_a-m_debuglog.Tpo -c -o =09=09libcoregrind_x86_linux_a-m_debuglog.o `test -f 'm_debuglog.c' || echo './'`m_debuglog.c =09=09gcc: @XEN_CFLAGS@=C3=AF=C5=92=C2=9Adoesn't exist the file or director= y =09=09make[3]: *** [libcoregrind_x86_linux_a-m_debuglog.o] error 1 =09=09make[3]: Leaving directory `/home/popo/valgrind-3.6.1/coregrind' =09=09make[2]: *** [all] error 2 =09=09make[2]: Leaving directory `/home/popo/valgrind-3.6.1/coregrind' =09=09make[1]: *** [all-recursive] error 1 =09=09make[1]: Leaving directory `/home/popo/valgrind-3.6.1' =09=09make: *** [all] error 2 =20 ---------------------------------------------------------------------------= ----------- =092, Suppose that i come to the third step, is it right to use the comman= d to do the detection ? "valgrind --tool=3Dmemcheck --leak-check=3Dyes ./xen" (here xen is = the binary file compiled by the source code of xen_4.0.1) 3,Does anyone here ever detect the xen hypervisor's memory leak before ? Does someone have the valgrind tool support for hypervisor well , can you send me one ? =20 Thank You & Best Wishes ! -- View this message in context: http://xen.1045712.n5.nabble.com/How-to-use-v= algrind-to-detect-xen-hypervisor-s-memory-leak-tp4589174p4589174.html Sent from the Xen - Dev mailing list archive at Nabble.com.