cma.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. TRACE_EVENT(cma_alloc,
  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. #endif /* _TRACE_CMA_H */
  49. /* This part must be outside protection */
  50. #include <trace/define_trace.h>