cma.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM cma
  3. #if !defined(_TRACE_CMA_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_CMA_H
  5. #include <linux/types.h>
  6. #include <linux/tracepoint.h>
  7. DECLARE_EVENT_CLASS(cma_alloc_class,
  8. TP_PROTO(unsigned long pfn, const struct page *page,
  9. unsigned int count, unsigned int align),
  10. TP_ARGS(pfn, page, count, align),
  11. TP_STRUCT__entry(
  12. __field(unsigned long, pfn)
  13. __field(const struct page *, page)
  14. __field(unsigned int, count)
  15. __field(unsigned int, align)
  16. ),
  17. TP_fast_assign(
  18. __entry->pfn = pfn;
  19. __entry->page = page;
  20. __entry->count = count;
  21. __entry->align = align;
  22. ),
  23. TP_printk("pfn=%lx page=%p count=%u align=%u",
  24. __entry->pfn,
  25. __entry->page,
  26. __entry->count,
  27. __entry->align)
  28. );
  29. TRACE_EVENT(cma_release,
  30. TP_PROTO(unsigned long pfn, const struct page *page,
  31. unsigned int count),
  32. TP_ARGS(pfn, page, count),
  33. TP_STRUCT__entry(
  34. __field(unsigned long, pfn)
  35. __field(const struct page *, page)
  36. __field(unsigned int, count)
  37. ),
  38. TP_fast_assign(
  39. __entry->pfn = pfn;
  40. __entry->page = page;
  41. __entry->count = count;
  42. ),
  43. TP_printk("pfn=%lx page=%p count=%u",
  44. __entry->pfn,
  45. __entry->page,
  46. __entry->count)
  47. );
  48. TRACE_EVENT(cma_alloc_start,
  49. TP_PROTO(unsigned int count, unsigned int align),
  50. TP_ARGS(count, align),
  51. TP_STRUCT__entry(
  52. __field(unsigned int, count)
  53. __field(unsigned int, align)
  54. ),
  55. TP_fast_assign(
  56. __entry->count = count;
  57. __entry->align = align;
  58. ),
  59. TP_printk("count=%u align=%u",
  60. __entry->count,
  61. __entry->align)
  62. );
  63. DEFINE_EVENT(cma_alloc_class, cma_alloc,
  64. TP_PROTO(unsigned long pfn, const struct page *page,
  65. unsigned int count, unsigned int align),
  66. TP_ARGS(pfn, page, count, align)
  67. );
  68. DEFINE_EVENT(cma_alloc_class, cma_alloc_busy_retry,
  69. TP_PROTO(unsigned long pfn, const struct page *page,
  70. unsigned int count, unsigned int align),
  71. TP_ARGS(pfn, page, count, align)
  72. );
  73. #endif /* _TRACE_CMA_H */
  74. /* This part must be outside protection */
  75. #include <trace/define_trace.h>