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