You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.1 KiB

  1. --- a/instrumentation/events/lttng-module/kmem.h
  2. +++ b/instrumentation/events/lttng-module/kmem.h
  3. @@ -286,7 +286,94 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT(mm
  4. __entry->order, __entry->migratetype)
  5. )
  6. -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
  7. +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2) \
  8. + || LTTNG_KERNEL_RANGE(3,18,10, 3,19,0) \
  9. + || LTTNG_KERNEL_RANGE(3,14,36, 3,15,0))
  10. +
  11. +LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
  12. +
  13. + TP_PROTO(struct page *page,
  14. + int alloc_order, int fallback_order,
  15. + int alloc_migratetype, int fallback_migratetype),
  16. +
  17. + TP_ARGS(page,
  18. + alloc_order, fallback_order,
  19. + alloc_migratetype, fallback_migratetype),
  20. +
  21. + TP_STRUCT__entry(
  22. + __field_hex( struct page *, page )
  23. + __field( int, alloc_order )
  24. + __field( int, fallback_order )
  25. + __field( int, alloc_migratetype )
  26. + __field( int, fallback_migratetype )
  27. + __field( int, change_ownership )
  28. + ),
  29. +
  30. + TP_fast_assign(
  31. + tp_assign(page, page)
  32. + tp_assign(alloc_order, alloc_order)
  33. + tp_assign(fallback_order, fallback_order)
  34. + tp_assign(alloc_migratetype, alloc_migratetype)
  35. + tp_assign(fallback_migratetype, fallback_migratetype)
  36. + tp_assign(change_ownership,
  37. + (alloc_migratetype == get_pageblock_migratetype(page)))
  38. + ),
  39. +
  40. + 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",
  41. + __entry->page,
  42. + page_to_pfn(__entry->page),
  43. + __entry->alloc_order,
  44. + __entry->fallback_order,
  45. + pageblock_order,
  46. + __entry->alloc_migratetype,
  47. + __entry->fallback_migratetype,
  48. + __entry->fallback_order < pageblock_order,
  49. + __entry->change_ownership)
  50. +)
  51. +
  52. +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,30))
  53. +
  54. +LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
  55. +
  56. + TP_PROTO(struct page *page,
  57. + int alloc_order, int fallback_order,
  58. + int alloc_migratetype, int fallback_migratetype, int new_migratetype),
  59. +
  60. + TP_ARGS(page,
  61. + alloc_order, fallback_order,
  62. + alloc_migratetype, fallback_migratetype, new_migratetype),
  63. +
  64. + TP_STRUCT__entry(
  65. + __field_hex( struct page *, page )
  66. + __field( int, alloc_order )
  67. + __field( int, fallback_order )
  68. + __field( int, alloc_migratetype )
  69. + __field( int, fallback_migratetype )
  70. + __field( int, change_ownership )
  71. + ),
  72. +
  73. + TP_fast_assign(
  74. + tp_assign(page, page)
  75. + tp_assign(alloc_order, alloc_order)
  76. + tp_assign(fallback_order, fallback_order)
  77. + tp_assign(alloc_migratetype, alloc_migratetype)
  78. + tp_assign(fallback_migratetype, fallback_migratetype)
  79. + tp_assign(change_ownership, (new_migratetype == alloc_migratetype))
  80. + ),
  81. +
  82. + 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",
  83. + __entry->page,
  84. + page_to_pfn(__entry->page),
  85. + __entry->alloc_order,
  86. + __entry->fallback_order,
  87. + pageblock_order,
  88. + __entry->alloc_migratetype,
  89. + __entry->fallback_migratetype,
  90. + __entry->fallback_order < pageblock_order,
  91. + __entry->change_ownership)
  92. +)
  93. +
  94. +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
  95. LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,