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