From: Mathieu Desnoyers Date: Thu, 31 Oct 2013 14:14:32 +0000 (-0400) Subject: update: kmem instrumentation 3.12 kernel support X-Git-Tag: v2.4.0-rc1~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=926b925690602310917356ebcac2fde83e8b354c;p=lttng-modules.git update: kmem instrumentation 3.12 kernel support Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/kmem.h b/instrumentation/events/lttng-module/kmem.h index 7607fc0c..2bc70a8d 100644 --- a/instrumentation/events/lttng-module/kmem.h +++ b/instrumentation/events/lttng-module/kmem.h @@ -286,6 +286,52 @@ DEFINE_EVENT_PRINT(mm_page, mm_page_pcpu_drain, __entry->order, __entry->migratetype) ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) + +TRACE_EVENT(mm_page_alloc_extfrag, + + TP_PROTO(struct page *page, + int alloc_order, int fallback_order, + int alloc_migratetype, int fallback_migratetype, + int change_ownership), + + TP_ARGS(page, + alloc_order, fallback_order, + alloc_migratetype, fallback_migratetype, + change_ownership), + + TP_STRUCT__entry( + __field_hex( struct page *, page ) + __field( int, alloc_order ) + __field( int, fallback_order ) + __field( int, alloc_migratetype ) + __field( int, fallback_migratetype ) + __field( int, change_ownership ) + ), + + TP_fast_assign( + tp_assign(page, page) + tp_assign(alloc_order, alloc_order) + tp_assign(fallback_order, fallback_order) + tp_assign(alloc_migratetype, alloc_migratetype) + tp_assign(fallback_migratetype, fallback_migratetype) + tp_assign(change_ownership, change_ownership) + ), + + TP_printk("page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d", + __entry->page, + page_to_pfn(__entry->page), + __entry->alloc_order, + __entry->fallback_order, + pageblock_order, + __entry->alloc_migratetype, + __entry->fallback_migratetype, + __entry->fallback_order < pageblock_order, + __entry->change_ownership) +) + +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ + TRACE_EVENT(mm_page_alloc_extfrag, TP_PROTO(struct page *page, @@ -323,6 +369,9 @@ TRACE_EVENT(mm_page_alloc_extfrag, __entry->fallback_order < pageblock_order, __entry->alloc_migratetype == __entry->fallback_migratetype) ) + +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ + #endif #endif /* _TRACE_KMEM_H */