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.6.1~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6c23a6ee50dcd8b5c1103cebd6258e8fa5b72b09;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 2b71d441..918622cc 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 "../../../../../../probes/lttng-tracepoint-event.h" #include +#include #undef TRACE_SYSTEM #define TRACE_SYSTEM kvmmmu @@ -195,6 +196,33 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kvm_mmu_page_class, kvm_mmu_prepare_zap_page, TP_ARGS(sp) ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) + +LTTNG_TRACEPOINT_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)) */ + LTTNG_TRACEPOINT_EVENT( mark_mmio_spte, TP_PROTO(u64 *sptep, gfn_t gfn, unsigned access), @@ -216,6 +244,8 @@ LTTNG_TRACEPOINT_EVENT( __entry->access) ) +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */ + LTTNG_TRACEPOINT_EVENT( handle_mmio_page_fault, TP_PROTO(u64 addr, gfn_t gfn, unsigned access),