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_set_pmd, 12 13 TP_PROTO(unsigned long addr, unsigned long pmd), 14 TP_ARGS(addr, pmd), 15 TP_STRUCT__entry( 16 __field(unsigned long, addr) 17 __field(unsigned long, pmd) 18 ), 19 20 TP_fast_assign( 21 __entry->addr = addr; 22 __entry->pmd = pmd; 23 ), 24 25 TP_printk("Set pmd with 0x%lx with 0x%lx", __entry->addr, __entry->pmd) 26 ); 27 28 29 TRACE_EVENT(hugepage_update, 30 31 TP_PROTO(unsigned long addr, unsigned long pte, unsigned long clr, unsigned long set), 32 TP_ARGS(addr, pte, clr, set), 33 TP_STRUCT__entry( 34 __field(unsigned long, addr) 35 __field(unsigned long, pte) 36 __field(unsigned long, clr) 37 __field(unsigned long, set) 38 ), 39 40 TP_fast_assign( 41 __entry->addr = addr; 42 __entry->pte = pte; 43 __entry->clr = clr; 44 __entry->set = set; 45 46 ), 47 48 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) 49 ); 50 51 #endif /* _TRACE_THP_H */ 52 53 /* This part must be outside protection */ 54 #include <trace/define_trace.h> 55