aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/compat
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2012-10-03 11:11:35 +0100
committerDavid Vrabel <david.vrabel@citrix.com>2012-10-03 11:11:35 +0100
commitcaf512bef7b2801c7f11c924b9bdfb8c0840fbe2 (patch)
tree2779aa6b25e6005c8f8761d30af3d4404bde1160 /xen/common/compat
parent86b35acb001f977eb1f82df6c07edaef173f4232 (diff)
downloadxen-caf512bef7b2801c7f11c924b9bdfb8c0840fbe2.tar.gz
xen-caf512bef7b2801c7f11c924b9bdfb8c0840fbe2.tar.bz2
xen-caf512bef7b2801c7f11c924b9bdfb8c0840fbe2.zip
trace: trace hypercalls inside a multicall
Add a trace record for every hypercall inside a multicall. These use a new event ID (with a different sub-class ) so they may be filtered out if only the calls into hypervisor are of interest. 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 'xen/common/compat')
-rw-r--r--xen/common/compat/multicall.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/xen/common/compat/multicall.c b/xen/common/compat/multicall.c
index 0eb1212772..e7e2a40eb4 100644
--- a/xen/common/compat/multicall.c
+++ b/xen/common/compat/multicall.c
@@ -5,6 +5,7 @@
#include <xen/config.h>
#include <xen/types.h>
#include <xen/multicall.h>
+#include <xen/trace.h>
#define COMPAT
typedef int ret_t;
@@ -25,6 +26,17 @@ DEFINE_XEN_GUEST_HANDLE(multicall_entry_compat_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"
/*