All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 1/2] trace: improve usefulness of hypercall trace record
Date: Thu, 24 May 2012 17:14:21 +0100	[thread overview]
Message-ID: <4FBE5E5D.6040407@citrix.com> (raw)
In-Reply-To: <CAFLBxZY8aKAaUagDfktXR9KOZV1AHDgjVdYOAtV9HCt-5LyPVQ@mail.gmail.com>

On 24/05/12 17:11, George Dunlap wrote:
> On Thu, May 24, 2012 at 11:37 AM, David Vrabel <david.vrabel@citrix.com> wrote:
>> From: David Vrabel <david.vrabel@citrix.com>
>>
>> Trace hypercalls using a more useful trace record format.
>>
>> The EIP field is removed (it was always somewhere in the hypercall
>> page) and include selected hypercall arguments (the number of calls in
>> a multicall, and the number of PTE updates in an mmu_update).
>>
>> To allow tracing tools to distinguish between the two formats, the new
>> format uses a new event ID (TRC_PV_HYPERCALL_V2).
>>
>> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
> 
> The problem with tracing all the hypercall arguments is that it will
> significantly increase the size of traces.  How many arguments to most
> hypercalls actually use -- and how many of those are actually just
> pointers to guest memory, and useless in a trace record anyway?

This patch only adds selected arguments to the trace record.

See __trace_hypercall() where we have:

+    switch (op) {
+    case __HYPERVISOR_multicall:
+        *a++ = args[1]; /* count */
+        break;
+    case __HYPERVISOR_mmu_update:
+        *a++ = args[1]; /* count */
+        break;
+    }
+
+    __trace_var(TRC_PV_HYPERCALL_V2, 1,
+                sizeof(uint32_t) * (1 + (a - d.args)), &d);

So, for these calls only one 32-bit argument is added to the trace record.

David

  reply	other threads:[~2012-05-24 16:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 10:37 [PATCH 0/2] trace: improve hypercall tracing David Vrabel
2012-05-24 10:37 ` [PATCH 1/2] trace: improve usefulness of hypercall trace record David Vrabel
2012-05-24 16:11   ` George Dunlap
2012-05-24 16:14     ` David Vrabel [this message]
2012-05-28 16:03   ` Frediano Ziglio
2012-05-28 16:07     ` David Vrabel
2012-05-24 10:37 ` [PATCH 2/2] trace: trace hypercalls inside a multicall David Vrabel
2012-05-28 16:03   ` Frediano Ziglio
2012-05-28 16:09     ` David Vrabel

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=4FBE5E5D.6040407@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.