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

Re: [Xen-devel] [PATCH 1/2] trace: improve usefulness of hypercall trace record



On 24/05/12 17:11, George Dunlap wrote:
> On Thu, May 24, 2012 at 11:37 AM, David Vrabel <david.vrabel@xxxxxxxxxx> 
> wrote:
>> From: David Vrabel <david.vrabel@xxxxxxxxxx>
>>
>> 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@xxxxxxxxxx>
> 
> 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

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


 


Rackspace

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