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