From: Mathieu Desnoyers Date: Mon, 27 Apr 2015 21:32:54 +0000 (-0400) Subject: Fix: x86 mmutrace event extra field for kernels >= 3.11 X-Git-Tag: v2.5.4~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c873bb58aea96e7d71d139a42d8d7c1119f12a03;p=lttng-modules.git Fix: x86 mmutrace event extra field for kernels >= 3.11 Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h index 56ddbabf..ad82e7d4 100644 --- a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h +++ b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h @@ -3,6 +3,7 @@ #include #include +#include #undef TRACE_SYSTEM #define TRACE_SYSTEM kvmmmu @@ -195,6 +196,33 @@ DEFINE_EVENT(kvm_mmu_page_class, kvm_mmu_prepare_zap_page, TP_ARGS(sp) ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) + +TRACE_EVENT( + mark_mmio_spte, + TP_PROTO(u64 *sptep, gfn_t gfn, unsigned access, unsigned int gen), + TP_ARGS(sptep, gfn, access, gen), + + TP_STRUCT__entry( + __field(void *, sptep) + __field(gfn_t, gfn) + __field(unsigned, access) + __field(unsigned int, gen) + ), + + TP_fast_assign( + tp_assign(sptep, sptep) + tp_assign(gfn, gfn) + tp_assign(access, access) + tp_assign(gen, gen) + ), + + TP_printk("sptep:%p gfn %llx access %x", __entry->sptep, __entry->gfn, + __entry->access) +) + +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */ + TRACE_EVENT( mark_mmio_spte, TP_PROTO(u64 *sptep, gfn_t gfn, unsigned access), @@ -216,6 +244,8 @@ TRACE_EVENT( __entry->access) ) +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */ + TRACE_EVENT( handle_mmio_page_fault, TP_PROTO(u64 addr, gfn_t gfn, unsigned access),