From: Mathieu Desnoyers Date: Thu, 19 Mar 2015 17:02:38 +0000 (-0400) Subject: Fix: kmem instrumentation update for mm_page_alloc_extfrag kernel 3.19.2+ X-Git-Tag: v2.6.1~29 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c2b1261d224b8e02a30b62f214d7c8b2478f629c;p=lttng-modules.git Fix: kmem instrumentation update for mm_page_alloc_extfrag kernel 3.19.2+ This commit introduces an API change for mm_page_alloc_extfrag instrumentation: commit cdf476685b5c9dcd20f0305791bd60212cace25d Author: Vlastimil Babka Date: Wed Feb 11 15:28:15 2015 -0800 mm: when stealing freepages, also take pages created by splitting buddy page Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/kmem.h b/instrumentation/events/lttng-module/kmem.h index cde2a20f..3782ac68 100644 --- a/instrumentation/events/lttng-module/kmem.h +++ b/instrumentation/events/lttng-module/kmem.h @@ -286,7 +286,50 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT(mm_page, mm_page_pcpu_drain, __entry->order, __entry->migratetype) ) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,30)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2)) + +LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag, + + TP_PROTO(struct page *page, + int alloc_order, int fallback_order, + int alloc_migratetype, int fallback_migratetype), + + TP_ARGS(page, + alloc_order, fallback_order, + alloc_migratetype, fallback_migratetype), + + 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, + (alloc_migratetype == get_pageblock_migratetype(page))) + ), + + 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) +) + +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,30)) LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,