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 ]
+0x0020200e 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 ]
TRC_TRACE_IRQ = 0x1f004
TRC_PV_HYPERCALL_V2 = 0x20100d
+TRC_PV_HYPERCALL_SUBCALL = 0x20100e
NR_VECTORS = 256
irq_measure = [{'count':0, 'tot_cycles':0, 'max_cycles':0}] * NR_VECTORS
d3 = irq_measure[d1]['tot_cycles']
d4 = irq_measure[d1]['max_cycles']
- if event == TRC_PV_HYPERCALL_V2:
+ if event == TRC_PV_HYPERCALL_V2 or event == TRC_PV_HYPERCALL_SUBCALL:
# Mask off the argument present bits.
d1 &= 0x000fffff
args[5] = regs->r9;
}
- __trace_hypercall(regs->eax, args);
+ __trace_hypercall(TRC_PV_HYPERCALL_V2, regs->eax, args);
}
void __trace_pv_trap(int trapnr, unsigned long eip,
#include <xen/config.h>
#include <xen/types.h>
#include <xen/multicall.h>
+#include <xen/trace.h>
#define COMPAT
typedef int ret_t;
#define do_multicall(l, n) compat_multicall(_##l, n)
#define _XEN_GUEST_HANDLE(t) XEN_GUEST_HANDLE(t)
+static void __trace_multicall_call(multicall_entry_t *call)
+{
+ unsigned long args[6];
+ int i;
+
+ for ( i = 0; i < ARRAY_SIZE(args); i++ )
+ args[i] = call->args[i];
+
+ __trace_hypercall(TRC_PV_HYPERCALL_SUBCALL, call->op, args);
+}
+
#include "../multicall.c"
/*
#include <xen/multicall.h>
#include <xen/guest_access.h>
#include <xen/perfc.h>
+#include <xen/trace.h>
#include <asm/current.h>
#include <asm/hardirq.h>
#ifndef COMPAT
typedef long ret_t;
#define xlat_multicall_entry(mcs)
+
+static void __trace_multicall_call(multicall_entry_t *call)
+{
+ __trace_hypercall(TRC_PV_HYPERCALL_SUBCALL, call->op, call->args);
+}
#endif
+static void trace_multicall_call(multicall_entry_t *call)
+{
+ if ( !tb_init_done )
+ return;
+
+ __trace_multicall_call(call);
+}
+
ret_t
do_multicall(
XEN_GUEST_HANDLE(multicall_entry_t) call_list, unsigned int nr_calls)
break;
}
+ trace_multicall_call(&mcs->call);
+
do_multicall_call(&mcs->call);
#ifndef NDEBUG
tasklet_schedule(&trace_notify_dom0_tasklet);
}
-void __trace_hypercall(unsigned long op, const unsigned long *args)
+void __trace_hypercall(uint32_t event, unsigned long op,
+ const unsigned long *args)
{
struct {
uint32_t op;
break;
}
- __trace_var(TRC_PV_HYPERCALL_V2, 1,
- sizeof(uint32_t) * (1 + (a - d.args)), &d);
+ __trace_var(event, 1, sizeof(uint32_t) * (1 + (a - d.args)), &d);
}
/*
#define TRC_MEM_POD_ZERO_RECLAIM (TRC_MEM + 17)
#define TRC_MEM_POD_SUPERPAGE_SPLINTER (TRC_MEM + 18)
-#define TRC_PV_ENTRY 0x00201000 /* Hypervisor entry points for PV guests. */
+#define TRC_PV_ENTRY 0x00201000 /* Hypervisor entry points for PV guests. */
+#define TRC_PV_SUBCALL 0x00202000 /* Sub-call in a multicall hypercall */
#define TRC_PV_HYPERCALL (TRC_PV_ENTRY + 1)
#define TRC_PV_TRAP (TRC_PV_ENTRY + 3)
#define TRC_PV_PTWR_EMULATION (TRC_PV_ENTRY + 11)
#define TRC_PV_PTWR_EMULATION_PAE (TRC_PV_ENTRY + 12)
#define TRC_PV_HYPERCALL_V2 (TRC_PV_ENTRY + 13)
+#define TRC_PV_HYPERCALL_SUBCALL (TRC_PV_SUBCALL + 14)
/*
* TRC_PV_HYPERCALL_V2 format
__trace_var(event, cycles, extra, extra_data);
}
-void __trace_hypercall(unsigned long call, const unsigned long *args);
+void __trace_hypercall(uint32_t event, unsigned long op,
+ const unsigned long *args);
/* Convenience macros for calling the trace function. */
#define TRACE_0D(_e) \