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

Re: [Xen-devel] valgrind support for xen4.7+



On Wed, Apr 12, 2017 at 05:04:41PM +1200, Glenn Enright wrote:
> Hi there
> 
> Has anyone seen or been working on patches for valgrind for recent versions
> of xen?
> 
> I was trying 3.13 from SVN against xen 4.7.2 and see that support for that
> version is not present. Per 
> https://blog.xenproject.org/2013/01/18/using-valgrind-to-debug-xen-toolstacks/
> 
> A starter patch is below, but its probably wrong or incomplete. It does let
> me run
> 
> If valgrind is not the way any more, can anyone suggest any alternatives on
> testing for memory leaks?
> 

It should still be useful.

> Regards, Glenn
> http://rimuhosting.com
> 
> Index: coregrind/m_syswrap/syswrap-xen.c
> ===================================================================
> --- coregrind/m_syswrap/syswrap-xen.c   (revision 16301)
> +++ coregrind/m_syswrap/syswrap-xen.c   (working copy)
> @@ -584,6 +584,7 @@
>     case 0x00000009:
>     case 0x0000000a:
>     case 0x0000000b:
> +   case 0x0000000d:

This is the version number of Xen sysctl. Sysctl is not a stable
interface. It's version number gets bumped from time to time.

It is currently at 0x0000000F. I suppose 0x0000000d is the version
number for 4.7.

>            break;
>     default:
>        bad_intf_version(tid, layout, arrghs, status, flags,
> @@ -626,6 +627,7 @@
>          break;
>        case 0x0000000a:
>        case 0x0000000b:
> +      case 0x0000000d:

Here you need to check if getdomaininfolist has changed between 0xb and
0xd. I suppose if you don't see anything unusual it should be OK.

>          PRE_XEN_SYSCTL_READ(getdomaininfolist_0000000a, first_domain);
>          PRE_XEN_SYSCTL_READ(getdomaininfolist_0000000a, max_domains);
>          PRE_XEN_SYSCTL_READ(getdomaininfolist_0000000a, buffer);
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> https://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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