[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] How to use valgrind to detect xen hypervisor's memory leak



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-ioctls-hypercalls-tc2640861.html#a4568310
 
to let valgrind support Xen privcmd/hypercall.
      Second I compile the source code of valgrind (have patched the upper
patch) 
      Third I use the valgrind tool to detect the hypervisor's memory leak .
      
      And the issues now i have are as follows:
        1 , Now i come to second step , and i run the commands to compile the
source code :
            1)     ./configure --with-xen=/usr/include/xen/
            2)     make && make install
            here i encounter the following error messages, how to fix it ?
           
--------------------------------------------------------------------------------------
                echo "# This is a generated file, composed of the following 
suppression
                rules:" > default.supp
                echo "# " exp-ptrcheck.supp xfree-3.supp xfree-4.supp 
glibc-2.X-drd.supp
                glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp  >> default.supp
                cat exp-ptrcheck.supp xfree-3.supp xfree-4.supp 
glibc-2.X-drd.supp
                glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp  >> default.supp
                make  all-recursive
                make[1]: Entering directory `/home/popo/valgrind-3.6.1'
                Making all in include
                make[2]: Entering directory `/home/popo/valgrind-3.6.1/include'
                make[2]: Nothing to be done for `all'.
                make[2]: Leaving directory `/home/popo/valgrind-3.6.1/include'
                Making all in VEX
                make[2]: Entering directory `/home/popo/valgrind-3.6.1/VEX'
                make  all-am
                make[3]: Entering directory `/home/popo/valgrind-3.6.1/VEX'
                make[3]: Nothing to be done for `all-am'.
                make[3]: Leaving directory `/home/popo/valgrind-3.6.1/VEX'
                make[2]: Leaving directory `/home/popo/valgrind-3.6.1/VEX'
                Making all in coregrind
                make[2]: Entering directory 
`/home/popo/valgrind-3.6.1/coregrind'
                make  all-am
                make[3]: Entering directory 
`/home/popo/valgrind-3.6.1/coregrind'
                gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub 
-DVGA_x86=1
                -DVGO_linux=1 -DVGP_x86_linux=1 -I../coregrind
                -DVG_LIBDIR="\"/usr/local/lib/valgrind"\" 
-DVG_PLATFORM="\"x86-linux\"" 
                -m32 -mpreferred-stack-boundary=2 -O2 -g -Wall 
-Wmissing-prototypes
-Wshadow
                -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
                -Wno-format-zero-length -fno-strict-aliasing @XEN_CFLAGS@ 
-Wno-long-long 
                -Wno-pointer-sign -fno-stack-protector -MT
                libcoregrind_x86_linux_a-m_debuglog.o -MD -MP -MF
                .deps/libcoregrind_x86_linux_a-m_debuglog.Tpo -c -o
                libcoregrind_x86_linux_a-m_debuglog.o `test -f 'm_debuglog.c' 
|| echo
'./'`m_debuglog.c
                gcc: @XEN_CFLAGS@ÃÅÂdoesn't exist the file or directory
                make[3]: *** [libcoregrind_x86_linux_a-m_debuglog.o] error 1
                make[3]: Leaving directory `/home/popo/valgrind-3.6.1/coregrind'
                make[2]: *** [all] error 2
                make[2]: Leaving directory `/home/popo/valgrind-3.6.1/coregrind'
                make[1]: *** [all-recursive] error 1
                make[1]: Leaving directory `/home/popo/valgrind-3.6.1'
                make: *** [all] error 2
           
--------------------------------------------------------------------------------------
        2, Suppose that i come to the third step, is it right to use the command
to do the detection ?
        "valgrind --tool=memcheck --leak-check=yes ./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 ?
       
 Thank You & Best Wishes !

--
View this message in context: 
http://xen.1045712.n5.nabble.com/How-to-use-valgrind-to-detect-xen-hypervisor-s-memory-leak-tp4589174p4589174.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.