1 #if !defined(LTTNG_TRACE_EXCEPTIONS_H) || defined(TRACE_HEADER_MULTI_READ)
2 #define LTTNG_TRACE_EXCEPTIONS_H
4 #include <probes/lttng-tracepoint-event.h>
5 #include <linux/version.h>
8 #define TRACE_SYSTEM x86_exceptions
10 LTTNG_TRACEPOINT_EVENT_CLASS(x86_exceptions_class
,
12 TP_PROTO(unsigned long address
, struct pt_regs
*regs
,
13 unsigned long error_code
),
15 TP_ARGS(address
, regs
, error_code
),
18 ctf_integer_hex(unsigned long, address
, address
)
19 ctf_integer_hex(unsigned long, ip
, regs
->ip
)
21 * Note: we cast error_code from unsigned long
22 * to unsigned char to save space in the trace.
23 * Currently, only 5 low bits are used. Should be made
24 * larger if error codes are added to the kernel.
26 ctf_integer_hex(unsigned char, error_code
, error_code
)
30 #define LTTNG_EXCEPTIONS_TRACEPOINT_EVENT_INSTANCE_MAP(name, map) \
31 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(x86_exceptions_class, \
34 TP_PROTO(unsigned long address, struct pt_regs *regs, \
35 unsigned long error_code), \
36 TP_ARGS(address, regs, error_code) \
39 LTTNG_EXCEPTIONS_TRACEPOINT_EVENT_INSTANCE_MAP(page_fault_user
,
40 x86_exceptions_page_fault_user
)
41 LTTNG_EXCEPTIONS_TRACEPOINT_EVENT_INSTANCE_MAP(page_fault_kernel
,
42 x86_exceptions_page_fault_kernel
)
44 #endif /* LTTNG_TRACE_EXCEPTIONS_H */
46 #undef TRACE_INCLUDE_PATH
47 #define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module/arch/x86
48 #undef TRACE_INCLUDE_FILE
49 #define TRACE_INCLUDE_FILE exceptions
51 /* This part must be outside protection */
52 #include <probes/define_trace.h>