xref: /openbmc/linux/include/trace/events/page_pool.h (revision 2169e6da)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM page_pool
4 
5 #if !defined(_TRACE_PAGE_POOL_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define      _TRACE_PAGE_POOL_H
7 
8 #include <linux/types.h>
9 #include <linux/tracepoint.h>
10 
11 #include <net/page_pool.h>
12 
13 TRACE_EVENT(page_pool_inflight,
14 
15 	TP_PROTO(const struct page_pool *pool,
16 		 s32 inflight, u32 hold, u32 release),
17 
18 	TP_ARGS(pool, inflight, hold, release),
19 
20 	TP_STRUCT__entry(
21 		__field(const struct page_pool *, pool)
22 		__field(s32,	inflight)
23 		__field(u32,	hold)
24 		__field(u32,	release)
25 	),
26 
27 	TP_fast_assign(
28 		__entry->pool		= pool;
29 		__entry->inflight	= inflight;
30 		__entry->hold		= hold;
31 		__entry->release	= release;
32 	),
33 
34 	TP_printk("page_pool=%p inflight=%d hold=%u release=%u",
35 	  __entry->pool, __entry->inflight, __entry->hold, __entry->release)
36 );
37 
38 TRACE_EVENT(page_pool_state_release,
39 
40 	TP_PROTO(const struct page_pool *pool,
41 		 const struct page *page, u32 release),
42 
43 	TP_ARGS(pool, page, release),
44 
45 	TP_STRUCT__entry(
46 		__field(const struct page_pool *,	pool)
47 		__field(const struct page *,		page)
48 		__field(u32,				release)
49 	),
50 
51 	TP_fast_assign(
52 		__entry->pool		= pool;
53 		__entry->page		= page;
54 		__entry->release	= release;
55 	),
56 
57 	TP_printk("page_pool=%p page=%p release=%u",
58 		  __entry->pool, __entry->page, __entry->release)
59 );
60 
61 TRACE_EVENT(page_pool_state_hold,
62 
63 	TP_PROTO(const struct page_pool *pool,
64 		 const struct page *page, u32 hold),
65 
66 	TP_ARGS(pool, page, hold),
67 
68 	TP_STRUCT__entry(
69 		__field(const struct page_pool *,	pool)
70 		__field(const struct page *,		page)
71 		__field(u32,				hold)
72 	),
73 
74 	TP_fast_assign(
75 		__entry->pool	= pool;
76 		__entry->page	= page;
77 		__entry->hold	= hold;
78 	),
79 
80 	TP_printk("page_pool=%p page=%p hold=%u",
81 		  __entry->pool, __entry->page, __entry->hold)
82 );
83 
84 #endif /* _TRACE_PAGE_POOL_H */
85 
86 /* This part must be outside protection */
87 #include <trace/define_trace.h>
88