All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Glenn Enright <glenn@rimuhosting.com>
Cc: Wei Liu <wei.liu2@citrix.com>, xen-devel@lists.xen.org
Subject: Re: valgrind support for xen4.7+
Date: Wed, 12 Apr 2017 10:25:40 +0100	[thread overview]
Message-ID: <20170412092540.3z65nl7bfnw4cowl@citrix.com> (raw)
In-Reply-To: <dff9b988-2ef6-7470-4f8a-bb3762052d80@rimuhosting.com>

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@lists.xen.org
> https://lists.xen.org/xen-devel

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

  reply	other threads:[~2017-04-12  9:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12  5:04 valgrind support for xen4.7+ Glenn Enright
2017-04-12  9:25 ` Wei Liu [this message]
2017-07-05  6:59 ` Olaf Hering

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170412092540.3z65nl7bfnw4cowl@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=glenn@rimuhosting.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.