xref: /openbmc/linux/include/trace/events/thp.h (revision 6c33a6f4)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM thp
4 
5 #if !defined(_TRACE_THP_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_THP_H
7 
8 #include <linux/types.h>
9 #include <linux/tracepoint.h>
10 
11 TRACE_EVENT(hugepage_invalidate,
12 
13 	    TP_PROTO(unsigned long addr, unsigned long pte),
14 	    TP_ARGS(addr, pte),
15 	    TP_STRUCT__entry(
16 		    __field(unsigned long, addr)
17 		    __field(unsigned long, pte)
18 		    ),
19 
20 	    TP_fast_assign(
21 		    __entry->addr = addr;
22 		    __entry->pte = pte;
23 		    ),
24 
25 	    TP_printk("hugepage invalidate at addr 0x%lx and pte = 0x%lx",
26 		      __entry->addr, __entry->pte)
27 );
28 
29 TRACE_EVENT(hugepage_set_pmd,
30 
31 	    TP_PROTO(unsigned long addr, unsigned long pmd),
32 	    TP_ARGS(addr, pmd),
33 	    TP_STRUCT__entry(
34 		    __field(unsigned long, addr)
35 		    __field(unsigned long, pmd)
36 		    ),
37 
38 	    TP_fast_assign(
39 		    __entry->addr = addr;
40 		    __entry->pmd = pmd;
41 		    ),
42 
43 	    TP_printk("Set pmd with 0x%lx with 0x%lx", __entry->addr, __entry->pmd)
44 );
45 
46 
47 TRACE_EVENT(hugepage_update,
48 
49 	    TP_PROTO(unsigned long addr, unsigned long pte, unsigned long clr, unsigned long set),
50 	    TP_ARGS(addr, pte, clr, set),
51 	    TP_STRUCT__entry(
52 		    __field(unsigned long, addr)
53 		    __field(unsigned long, pte)
54 		    __field(unsigned long, clr)
55 		    __field(unsigned long, set)
56 		    ),
57 
58 	    TP_fast_assign(
59 		    __entry->addr = addr;
60 		    __entry->pte = pte;
61 		    __entry->clr = clr;
62 		    __entry->set = set;
63 
64 		    ),
65 
66 	    TP_printk("hugepage update at addr 0x%lx and pte = 0x%lx clr = 0x%lx, set = 0x%lx", __entry->addr, __entry->pte, __entry->clr, __entry->set)
67 );
68 TRACE_EVENT(hugepage_splitting,
69 
70 	    TP_PROTO(unsigned long addr, unsigned long pte),
71 	    TP_ARGS(addr, pte),
72 	    TP_STRUCT__entry(
73 		    __field(unsigned long, addr)
74 		    __field(unsigned long, pte)
75 		    ),
76 
77 	    TP_fast_assign(
78 		    __entry->addr = addr;
79 		    __entry->pte = pte;
80 		    ),
81 
82 	    TP_printk("hugepage splitting at addr 0x%lx and pte = 0x%lx",
83 		      __entry->addr, __entry->pte)
84 );
85 
86 #endif /* _TRACE_THP_H */
87 
88 /* This part must be outside protection */
89 #include <trace/define_trace.h>
90