From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH 1/2] trace: improve usefulness of hypercall trace record Date: Thu, 24 May 2012 17:14:21 +0100 Message-ID: <4FBE5E5D.6040407@citrix.com> References: <1337855829-15683-1-git-send-email-david.vrabel@citrix.com> <1337855829-15683-2-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 24/05/12 17:11, George Dunlap wrote: > On Thu, May 24, 2012 at 11:37 AM, David Vrabel wrote: >> From: David Vrabel >> >> 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 > > 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