2 #define TRACE_SYSTEM exceptions
4 #if !defined(_TRACE_PAGE_FAULT_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_PAGE_FAULT_H
7 #include <linux/tracepoint.h>
9 extern void trace_irq_vector_regfunc(void);
10 extern void trace_irq_vector_unregfunc(void);
12 DECLARE_EVENT_CLASS(x86_exceptions
,
14 TP_PROTO(unsigned long address
, struct pt_regs
*regs
,
15 unsigned long error_code
),
17 TP_ARGS(address
, regs
, error_code
),
20 __field( unsigned long, address
)
21 __field( unsigned long, ip
)
22 __field( unsigned long, error_code
)
26 __entry
->address
= address
;
27 __entry
->ip
= regs
->ip
;
28 __entry
->error_code
= error_code
;
31 TP_printk("address=%pf ip=%pf error_code=0x%lx",
32 (void *)__entry
->address
, (void *)__entry
->ip
,
33 __entry
->error_code
) );
35 #define DEFINE_PAGE_FAULT_EVENT(name) \
36 DEFINE_EVENT_FN(x86_exceptions, name, \
37 TP_PROTO(unsigned long address, struct pt_regs *regs, \
38 unsigned long error_code), \
39 TP_ARGS(address, regs, error_code), \
40 trace_irq_vector_regfunc, \
41 trace_irq_vector_unregfunc);
43 DEFINE_PAGE_FAULT_EVENT(page_fault_user
);
44 DEFINE_PAGE_FAULT_EVENT(page_fault_kernel
);
46 #undef TRACE_INCLUDE_PATH
47 #define TRACE_INCLUDE_PATH .
48 #define TRACE_INCLUDE_FILE exceptions
49 #endif /* _TRACE_PAGE_FAULT_H */
51 /* This part must be outside protection */
52 #include <trace/define_trace.h>