Fix: x86 kvm mmutrace instrumentation for kernel < 3.6
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 5 Apr 2016 12:36:44 +0000 (08:36 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 5 Apr 2016 12:36:44 +0000 (08:36 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h

index ad09313df1fb25d6ff104dc0e1e1d157c796a22c..e3f7abd5de787e73897cb90867338fd908f3a9ec 100644 (file)
@@ -32,6 +32,7 @@
 
 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
 /*
  * A pagetable walk has started
  */
@@ -45,7 +46,23 @@ LTTNG_TRACEPOINT_EVENT(
                ctf_integer(__u32, pferr, pferr)
        )
 )
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */
+/*
+ * A pagetable walk has started
+ */
+LTTNG_TRACEPOINT_EVENT(
+       kvm_mmu_pagetable_walk,
+       TP_PROTO(u64 addr, int write_fault, int user_fault, int fetch_fault),
+       TP_ARGS(addr, write_fault, user_fault, fetch_fault),
 
+       TP_FIELDS(
+               ctf_integer(__u64, addr, addr)
+               ctf_integer(__u32, pferr,
+                       (!!write_fault << 1) | (!!user_fault << 2)
+                       | (!!fetch_fault << 4))
+       )
+)
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */
 
 /* We just walked a paging element */
 LTTNG_TRACEPOINT_EVENT(
This page took 0.026306 seconds and 4 git commands to generate.