Skip to contentSkip to conversation

How to use valgrind to detect xen hypervisor's memory leak

DISCUSSION hellokitty 2 participants 13 messages Jul 15, 2011 – Jul 16, 2011

lore
Share & tools
lore

hellokitty

author
#0 lore raw

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.

#1 lore raw
Quoted 9 lines · hellokitty

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)

Please post your modified version of the patch.

Quoted 5 lines

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 :

You seem to have missed step 0) which is to regenerate configure and Makefile.* using autoconf/automake as I described in a previous mail.

Quoted 5 lines

1) ./configure --with-xen=/usr/include/xen/
2) make && make install
here i encounter the following error messages, how to fix it ?

--------------------------------------------------------------------------------------

[..]

Quoted 1 line

gcc: @XEN_CFLAGS@doesn't exist the file or directory

The configure script should have substituted this out, but if you didn't regenerate it after apply the patch then it won't know to do this.

Quoted 7 lines

[...]

--------------------------------------------------------------------------------------
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)

Wait, are you trying to use valgrind on the hypervisor itself?

The Xen hypervisor is an "Operating System" and runs on bare metal -- you can't run it as a process under Linux and therefore you cannot run a tool like valgrind on it.

The valgrind support in my patch is useful for debugging the Xen toolstack (e.g. "xl"), but not the hypervisor itself.

Quoted 3 lines

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 ?

Either Valgrind or Xen does not work how you seem to think it works. I think you should consult with your advisor before trying to progress this approach any further.

You might want to investigate the Linux kernel's "kmemleak" stuff, I suppose something like that could be ported to Xen (although I expect it to be a non-trivial amount of work).

Ian.

author
#2 lore raw
Quoted 1 line

Please post your modified version of the patch.

My patch is in the attach file named xen_patch.patch
http://xen.1045712.n5.nabble.com/file/n4589993/xen_patch.patch
xen_patch.patch

Quoted 2 lines

You seem to have missed step 0) which is to regenerate configure and Makefile.* using autoconf/automake as I described in a previous mail.

Oh , here before i run
1) ./configure --with-xen=/usr/include/xen/ &&
2) make && make install
i had run automake/autoconf tool , and the errors still like what i got .
So how to fix it ?

Quoted 7 lines

Wait, are you trying to use valgrind on the hypervisor itself? The Xen hypervisor is an "Operating System" and runs on bare metal -- you can't run it as a process under Linux and therefore you cannot run a tool like valgrind on it.

The valgrind support in my patch is useful for debugging the Xen toolstack (e.g. "xl"), but not the hypervisor itself.

Oh , I know that, maybe i didn't express the right meaning . Now , i am more clearer . Yes , what i want to detect is the Xen toolstack's memory leak not the hypervisor itself .

and so 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 xm"

and more does someone have the valgrind tool support for hypervisor well , can you send me one ?

Thank you and best wishes .

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

#3 lore raw
Quoted 5 lines · hellokitty
Quoted 1 line

Please post your modified version of the patch.

My patch is in the attach file named xen_patch.patch
http://xen.1045712.n5.nabble.com/file/n4589993/xen_patch.patch
xen_patch.patch

Quoted 7 lines
Quoted 2 lines

You seem to have missed step 0) which is to regenerate configure and Makefile.* using autoconf/automake as I described in a previous mail.

Oh , here before i run
1) ./configure --with-xen=/usr/include/xen/ &&
2) make && make install
i had run automake/autoconf tool , and the errors still like what i got .
So how to fix it ?

I'm not sure to be honest. It would help if you would post the actual patch you are using (including your modifications etc). Also which specific baseline valgrind are you using?

I'm afraid you will most likely need to roll your sleeves up and get stuck into the build system to figure out why the @XEN_CFLAGS@ macro isn't getting substituted.

Quoted 8 lines
Quoted 7 lines

Wait, are you trying to use valgrind on the hypervisor itself? The Xen hypervisor is an "Operating System" and runs on bare metal -- you can't run it as a process under Linux and therefore you cannot run a tool like valgrind on it.

The valgrind support in my patch is useful for debugging the Xen toolstack (e.g. "xl"), but not the hypervisor itself.

Quoted 7 lines

Oh , I know that, maybe i didn't express the right meaning . Now , i am more clearer . Yes , what i want to detect is the Xen toolstack's memory leak not the hypervisor itself .

and so 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 xm"

I think you can use any of the valgrind options in the normal way.

Personally I was using (with xl)

	--track-origins=yes --trace-children=yes --leak-check=full --show-reachable=yes

I've not got any experience with running valgrind on python programs but since python is interpreted and garbage collected I expect that what you will actually end up tracking is bugs in the python runtime and what you will miss is any kind of leak due to something not getting garbage collected when you might expect etc. I'm not sure what kind of tools are available for tracking memory "leaks" of this sort in python. (In other words I'm not sure there is much utility to running python programs under valgrind, but I suppose you know different)

Note that xm is really just an RPC client to the xend server, so you won't actually be checking the toolstack by running valgrind on xm, only the client RPC implementation. To actually measure anything useful you would need to measure xend itself (also note that xend is not generally well supported these days and xl is generally preferred for new development).

My patch was written to support all the hypercalls done by "xl create" on my specific guest configuration -- you may find you need to implement support within Valgrind for other hypercalls if you step outside this limited usage.

Quoted 2 lines

and more does someone have the valgrind tool support for hypervisor well , can you send me one ?

Um, I think I explained in my previous mail why this isn't possible and that this request doesn't make sense. (plus you stated right above that you don't want to do this on the hypervisor!)

Ian.

author
#4 lore raw
Quoted 1 line

It would help if you would post the actual patch you are using (including

your modifications etc). Also which specific baseline valgrind are you using?
The patch i upload is the actual one i am using , and i just modify some lines that do not match the valgrind source code . such as 1608 of "@@ -1608,6 +1608,11 @@ " , and the version of valgrind is 3.6.1 .

Thanks to your advise , now i know i should focus on the detection of xend(xl create) , but first i have to use the upload patch to build in the source code of valgrind , but that's the point , and i can't fix it . sigh...

Quoted 5 lines

and more does someone have the valgrind tool support for hypervisor well , can you send me one ?

Um, I think I explained in my previous mail why this isn't possible and that this request doesn't make sense

Sorry , i know the discipline , and but can you tell me your version of valgrind according to your patch ??

Thank you and Best Wishes!

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

#5 lore raw
Quoted 4 lines · hellokitty
Quoted 1 line

It would help if you would post the actual patch you are using (including

your modifications etc). Also which specific baseline valgrind are you using?
The patch i upload

upload where? Please post the patch you are using as an attachment to an email on this list.

Quoted 10 lines

is the actual one i am using , and i just modify some
lines that do not match the valgrind source code . such as 1608 of "@@ -1608,6 +1608,11 @@ " , and the version of valgrind is 3.6.1 .

Thanks to your advise , now i know i should focus on the detection of xend(xl create) , but first i have to use the upload patch to build in the source code of valgrind , but that's the point , and i can't fix it . sigh...

Quoted 8 lines
Quoted 5 lines

and more does someone have the valgrind tool support for hypervisor well , can you send me one ?

Um, I think I explained in my previous mail why this isn't possible and that this request doesn't make sense

Sorry , i know the discipline , and but can you tell me your version of valgrind according to your patch ??

My patch was based on r11231 from the valgrind subversion repository.

Quoted 11 lines

Thank you and Best Wishes!

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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#7 lore raw
In reply to hellokitty
Quoted 6 lines · hellokitty
Quoted 1 line

It would help if you would post the actual patch you are using (including

your modifications etc). Also which specific baseline valgrind are you using?
The patch i upload is the actual one i am using , and i just modify some lines that do not match the valgrind source code . such as 1608 of "@@ -1608,6 +1608,11 @@ " , and the version of valgrind is 3.6.1 .

I downloaded 3.6.1, applied the attached patch and ran:

        aclocal && autoheader && automake -a && autoconf

(per the autogen.sh in valgrind SVN)

Then I ran:

        ./configure --with-xen && make

and it built fine (since it defaults to looking in /usr/include for headers).

I also tried "./configure --with-xen=/usr/include" which also worked.

However --with-xen=/usr/include/xen (as you had) did not work because the path is wrong and should not include the final /xen (since the #includes in the code are of the form <xen/thing.h>), although my error messages in this case were not the same as yours.

Ian.

commit c86b82b0c6bfceb7bd15b024fd24b938c4c07b81

Author: Ian Campbell <[email protected]>
Date:   Thu Aug 19 13:51:04 2010 +0100

patch xen.patch

configure.in +5 -0
index 62e1837..e71ecd6 100644
@@ -1558,6 +1558,11 @@ elif test x$VGCONF_PLATFORM_SEC_CAPS = xPPC32_AIX5 ; then
   mflag_secondary=-q32
 fi
 
+AC_ARG_WITH(xen,
+   [  --with-xen=             Specify location of Xen headers],
+   XEN_CFLAGS=-I$withval
+)
+AC_SUBST(XEN_CFLAGS)
 
 AC_ARG_WITH(mpicc,
    [  --with-mpicc=           Specify name of MPI2-ised C compiler],
coregrind/Makefile.am +3 -1
index d9d1bca..d7216f9 100644
@@ -211,6 +211,7 @@ noinst_HEADERS = \
 	m_syswrap/priv_syswrap-aix5.h \
 	m_syswrap/priv_syswrap-darwin.h \
 	m_syswrap/priv_syswrap-main.h \
+	m_syswrap/priv_syswrap-xen.h \
 	m_ume/priv_ume.h
 
 #----------------------------------------------------------------------------
@@ -338,6 +339,7 @@ COREGRIND_SOURCES_COMMON = \
 	m_syswrap/syswrap-ppc64-aix5.c \
 	m_syswrap/syswrap-x86-darwin.c \
 	m_syswrap/syswrap-amd64-darwin.c \
+	m_syswrap/syswrap-xen.c \
 	m_ume/elf.c \
 	m_ume/macho.c \
 	m_ume/main.c \
@@ -350,7 +352,7 @@ nodist_libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
     $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
-    $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
+    $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) @XEN_CFLAGS@
 libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CCASFLAGS = \
     $(AM_CCASFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
 if VGCONF_HAVE_PLATFORM_SEC
coregrind/m_debuginfo/debuginfo.c +5 -0
index 08babd0..5272fae 100644
@@ -637,6 +637,11 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV )
    if (!filename)
       return 0;
 
+   if (strncmp(filename, "/proc/xen/", 10) == 0) {
+      //VG_(printf)("ignoring mmap of %s\n", filename);
+      return 0;
+   }
+
    if (debug)
       VG_(printf)("di_notify_mmap-2: %s\n", filename);
 
coregrind/m_syswrap/priv_syswrap-xen.h new file +13 -0
new file mode 100644
index 0000000..42505bb
@@ -0,0 +1,13 @@
+#ifndef __PRIV_SYSWRAP_XEN_H
+#define __PRIV_SYSWRAP_XEN_H
+
+DECL_TEMPLATE(xen, ioctl_privcmd_hypercall);
+DECL_TEMPLATE(xen, ioctl_privcmd_mmap);
+DECL_TEMPLATE(xen, ioctl_privcmd_mmapbatch);
+DECL_TEMPLATE(xen, ioctl_privcmd_mmapbatch_v2);
+
+#endif   // __PRIV_SYSWRAP_XEN_H
+
+/*--------------------------------------------------------------------*/
+/*--- end                                                          ---*/
+/*--------------------------------------------------------------------*/
coregrind/m_syswrap/syswrap-linux.c +28 -1
index 247402d..baa33c2 100644
@@ -57,7 +57,7 @@
 #include "priv_types_n_macros.h"
 #include "priv_syswrap-generic.h"
 #include "priv_syswrap-linux.h"
-
+#include "priv_syswrap-xen.h"
 
 // Run a thread from beginning to end and return the thread's
 // scheduler-return-code.
@@ -4821,6 +4821,20 @@ PRE(sys_ioctl)
       }
       break;
 
+
+   case VKI_XEN_IOCTL_PRIVCMD_HYPERCALL:
+      WRAPPER_PRE_NAME(xen, ioctl_privcmd_hypercall)(tid, layout, arrghs, status, flags);
+      break;
+   case VKI_XEN_IOCTL_PRIVCMD_MMAP:
+      WRAPPER_PRE_NAME(xen, ioctl_privcmd_mmap)(tid, layout, arrghs, status, flags);
+      break;
+   case VKI_XEN_IOCTL_PRIVCMD_MMAPBATCH:
+      WRAPPER_PRE_NAME(xen, ioctl_privcmd_mmapbatch)(tid, layout, arrghs, status, flags);
+      break;
+   case VKI_XEN_IOCTL_PRIVCMD_MMAPBATCH_V2:
+      WRAPPER_PRE_NAME(xen, ioctl_privcmd_mmapbatch_v2)(tid, layout, arrghs, status, flags);
+      break;
+
    default:
       /* EVIOC* are variable length and return size written on success */
       switch (ARG2 & ~(_VKI_IOC_SIZEMASK << _VKI_IOC_SIZESHIFT)) {
@@ -5633,6 +5647,19 @@ POST(sys_ioctl)
       }
       break;
 
+   case VKI_XEN_IOCTL_PRIVCMD_HYPERCALL:
+      WRAPPER_POST_NAME(xen, ioctl_privcmd_hypercall)(tid, arrghs, status);
+      break;
+   case VKI_XEN_IOCTL_PRIVCMD_MMAP:
+      WRAPPER_POST_NAME(xen, ioctl_privcmd_mmap)(tid, arrghs, status);
+      break;
+   case VKI_XEN_IOCTL_PRIVCMD_MMAPBATCH:
+      WRAPPER_POST_NAME(xen, ioctl_privcmd_mmapbatch)(tid, arrghs, status);
+      break;
+   case VKI_XEN_IOCTL_PRIVCMD_MMAPBATCH_V2:
+      WRAPPER_POST_NAME(xen, ioctl_privcmd_mmapbatch_v2)(tid, arrghs, status);
+      break;
+
    default:
       /* EVIOC* are variable length and return size written on success */
       switch (ARG2 & ~(_VKI_IOC_SIZEMASK << _VKI_IOC_SIZESHIFT)) {
coregrind/m_syswrap/syswrap-xen.c new file +750 -0

750 lines not on this page · raw message

glibc-2.7.supp +102 -0

105 lines not on this page · raw message

include/Makefile.am +2 -1
index 33d0857..22bffa7 100644
@@ -54,7 +54,8 @@ nobase_pkginclude_HEADERS = \
 	vki/vki-scnums-ppc64-linux.h	\
 	vki/vki-scnums-x86-linux.h	\
 	vki/vki-scnums-arm-linux.h	\
-	vki/vki-scnums-darwin.h
+	vki/vki-scnums-darwin.h		
+	vki/vki-xen.h
 
 noinst_HEADERS = \
 	vki/vki-ppc32-aix5.h		\
include/pub_tool_vki.h +1 -0
index 73a4174..c4c117f 100644
@@ -47,6 +47,7 @@
 
 #if defined(VGO_linux)
 #  include "vki/vki-linux.h"
+#  include "vki/vki-xen.h"
 #elif defined(VGP_ppc32_aix5)
 #  include "vki/vki-ppc32-aix5.h"
 #elif defined(VGP_ppc64_aix5)
include/vki/vki-linux.h +45 -0

51 lines not on this page · raw message

include/vki/vki-xen.h new file +8 -0
new file mode 100644
index 0000000..7842cc9
@@ -0,0 +1,8 @@
+#ifndef __VKI_XEN_H
+#define __VKI_XEN_H
+
+#endif // __VKI_XEN_H
+
+/*--------------------------------------------------------------------*/
+/*--- end                                                          ---*/
+/*--------------------------------------------------------------------*/

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

author
#8 lore raw
Quoted 5 lines

I downloaded 3.6.1, applied the attached patch and ran:
aclocal && autoheader && automake -a && autoconf (per the autogen.sh in
valgrind SVN)
Then I ran:

        ./configure --with-xen && make
Quoted 8 lines

and it built fine (since it defaults to looking in /usr/include for headers).
I also tried "./configure --with-xen=/usr/include" which also worked. However --with-xen=/usr/include/xen (as you had) did not work because the path is wrong and should not include the final /xen (since the #includes in the code are of the form &lt;xen/thing.h&gt;), although my error
messages in this case were not the same as yours.

Here , i follow your step , and use the "X" patch you uploaded , and run "aclocal && autoheader && automake -a && autoconf " ,goes well and then run "./configure --with-xen && make" , and when it comes to make , it has the errors below :

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 -Iyes -Wno-long-long -Wno-pointer-sign -fno-stack-protector -MT libcoregrind_x86_linux_a-syswrap-xen.o -MD -MP -MF .deps/libcoregrind_x86_linux_a-syswrap-xen.Tpo -c -o libcoregrind_x86_linux_a-syswrap-xen.o test -f 'm_syswrap/syswrap-xen.c' || echo './'m_syswrap/syswrap-xen.c
m_syswrap/syswrap-xen.c: In function ‘vgSysWrap_xen_ioctl_privcmd_hypercall_before’:
m_syswrap/syswrap-xen.c:119: error: ‘MMUEXT_MARK_SUPER’ undeclared (first use in this function)
m_syswrap/syswrap-xen.c:119: error: (Each undeclared identifier is reported only once
m_syswrap/syswrap-xen.c:119: error: for each function it appears in.) m_syswrap/syswrap-xen.c:120: error: ‘MMUEXT_UNMARK_SUPER’ undeclared (first use in this function)
m_syswrap/syswrap-xen.c:136: error: ‘MMUEXT_FLUSH_CACHE_GLOBAL’ undeclared (first use in this function)
m_syswrap/syswrap-xen.c:263: error: ‘XEN_SYSCTL_cpupool_op’ undeclared (first use in this function)
m_syswrap/syswrap-xen.c:264: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:264: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:266: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:267: error: ‘XEN_SYSCTL_CPUPOOL_OP_CREATE’ undeclared (first use in this function) m_syswrap/syswrap-xen.c:268: error: ‘XEN_SYSCTL_CPUPOOL_OP_DESTROY’ undeclared (first use in this function) m_syswrap/syswrap-xen.c:269: error: ‘XEN_SYSCTL_CPUPOOL_OP_INFO’ undeclared (first use in this function)
m_syswrap/syswrap-xen.c:270: error: ‘XEN_SYSCTL_CPUPOOL_OP_ADDCPU’ undeclared (first use in this function) m_syswrap/syswrap-xen.c:271: error: ‘XEN_SYSCTL_CPUPOOL_OP_RMCPU’ undeclared (first use in this function)
m_syswrap/syswrap-xen.c:272: error: ‘XEN_SYSCTL_CPUPOOL_OP_MOVEDOMAIN’ undeclared (first use in this function) m_syswrap/syswrap-xen.c:273: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:273: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:276: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:277: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:277: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:279: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:280: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:280: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:282: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:283: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:284: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:284: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c: In function ‘vgSysWrap_xen_ioctl_privcmd_hypercall_after’:
m_syswrap/syswrap-xen.c:558: error: ‘XEN_SYSCTL_cpupool_op’ undeclared (first use in this function)
m_syswrap/syswrap-xen.c:559: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:559: error: ‘XEN_SYSCTL_CPUPOOL_OP_CREATE’ undeclared (first use in this function) m_syswrap/syswrap-xen.c:560: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:560: error: ‘XEN_SYSCTL_CPUPOOL_OP_INFO’ undeclared (first use in this function)
m_syswrap/syswrap-xen.c:561: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:561: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:562: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:563: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:563: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:564: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:564: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:566: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:567: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:567: error: ‘XEN_SYSCTL_CPUPOOL_OP_FREEINFO’ undeclared (first use in this function) m_syswrap/syswrap-xen.c:568: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:568: error: ‘union <anonymous>’ has no member named ‘cpupool_op’
m_syswrap/syswrap-xen.c:576: error: ‘struct xen_sysctl_physinfo’ has no member named ‘nr_nodes’
m_syswrap/syswrap-xen.c:576: error: ‘struct xen_sysctl_physinfo’ has no member named ‘nr_nodes’
m_syswrap/syswrap-xen.c:658: error: ‘struct xen_domctl_getdomaininfo’ has no member named ‘cpupool’
m_syswrap/syswrap-xen.c:658: error: ‘struct xen_domctl_getdomaininfo’ has no member named ‘cpupool’
make[3]: *** [libcoregrind_x86_linux_a-syswrap-xen.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

How about you ? and i don't know how to fix it yet .....

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

#9 lore raw
Quoted 3 lines · hellokitty

‘vgSysWrap_xen_ioctl_privcmd_hypercall_before’:
m_syswrap/syswrap-xen.c:119: error: ‘MMUEXT_MARK_SUPER’ undeclared (first use in this function)

The patch requires Xen 4.1 or later.

Ian.

#11 lore raw
Quoted 3 lines · hellokitty
Quoted 1 line

The patch requires Xen 4.1 or later.

So in all , the problem is the version problem ? and do you have the patch for valgrind requires Xen 3.3.0 ?

No I don't.

3.3.0 is a pretty ancient version of Xen (released in 2008, 3 major releases ago). If you don't want to base your work on something newer then I'm afraid you will need to backport the patch yourself.

Ian.

Quoted 9 lines

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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel