aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xentrace
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2012-10-03 11:11:06 +0100
committerDavid Vrabel <david.vrabel@citrix.com>2012-10-03 11:11:06 +0100
commit86b35acb001f977eb1f82df6c07edaef173f4232 (patch)
treea3c9bf5a4638b702a19a7b9ac630a1550d83883b /tools/xentrace
parent4e6967a47ad4caa3af3ada3045fb278a53fd202b (diff)
downloadxen-86b35acb001f977eb1f82df6c07edaef173f4232.tar.gz
xen-86b35acb001f977eb1f82df6c07edaef173f4232.tar.bz2
xen-86b35acb001f977eb1f82df6c07edaef173f4232.zip
trace: improve usefulness of hypercall trace record
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 (e.g., the number of calls in a multicall, and the number of PTE updates in an mmu_update etc.). 12 bits in the first extra word are used to indicate which arguments are present in the record and what size they are (32 or 64-bit). This is an incompatible record format so a new event ID is used so tools can distinguish between the two formats. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: George Dunlap <george.dunlap@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'tools/xentrace')
-rw-r--r--tools/xentrace/formats1
-rw-r--r--tools/xentrace/xentrace_format6
2 files changed, 7 insertions, 0 deletions
diff --git a/tools/xentrace/formats b/tools/xentrace/formats
index 71220c096c..fa935c8d06 100644
--- a/tools/xentrace/formats
+++ b/tools/xentrace/formats
@@ -104,6 +104,7 @@
0x0020110b CPU%(cpu)d %(tsc)d (+%(reltsc)8d) ptwr_emulation [ addr = 0x%(4)08x%(3)08x, rip = 0x%(6)08x%(5)08x, npte = 0x%(2)08x%(1)08x ]
0x0020100c CPU%(cpu)d %(tsc)d (+%(reltsc)8d) ptwr_emulation_pae [ addr = 0x%(3)08x, eip = 0x%(4)08x, npte = 0x%(2)08x%(1)08x ]
0x0020110c CPU%(cpu)d %(tsc)d (+%(reltsc)8d) ptwr_emulation_pae [ addr = 0x%(4)08x%(3)08x, rip = 0x%(6)08x%(5)08x, npte = 0x%(2)08x%(1)08x ]
+0x0020100d CPU%(cpu)d %(tsc)d (+%(reltsc)8d) hypercall [ op = 0x%(1)08x ]
0x0040f001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_not_shadow [ gl1e = 0x%(2)08x%(1)08x, va = 0x%(3)08x, flags = 0x%(4)08x ]
0x0040f101 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) shadow_not_shadow [ gl1e = 0x%(2)08x%(1)08x, va = 0x%(4)08x%(3)08x, flags = 0x%(5)08x ]
diff --git a/tools/xentrace/xentrace_format b/tools/xentrace/xentrace_format
index e13b05b734..bdcab096ea 100644
--- a/tools/xentrace/xentrace_format
+++ b/tools/xentrace/xentrace_format
@@ -111,6 +111,8 @@ D7REC = "IIIIIII"
last_tsc = [0]
TRC_TRACE_IRQ = 0x1f004
+TRC_PV_HYPERCALL_V2 = 0x20100d
+
NR_VECTORS = 256
irq_measure = [{'count':0, 'tot_cycles':0, 'max_cycles':0}] * NR_VECTORS
@@ -197,6 +199,10 @@ while not interrupted:
d3 = irq_measure[d1]['tot_cycles']
d4 = irq_measure[d1]['max_cycles']
+ if event == TRC_PV_HYPERCALL_V2:
+ # Mask off the argument present bits.
+ d1 &= 0x000fffff
+
#tsc = (tscH<<32) | tscL
#print i, tsc