Cleanup: Remove toplevel directory from include search path
[lttng-modules.git] / include / instrumentation / events / lttng-module / arch / x86 / exceptions.h
CommitLineData
b7cdc182 1/* SPDX-License-Identifier: GPL-2.0-only */
da0f6c58
MD
2#if !defined(LTTNG_TRACE_EXCEPTIONS_H) || defined(TRACE_HEADER_MULTI_READ)
3#define LTTNG_TRACE_EXCEPTIONS_H
4
3b4aafcb 5#include <lttng/tracepoint-event.h>
da0f6c58
MD
6#include <linux/version.h>
7
8#undef TRACE_SYSTEM
9#define TRACE_SYSTEM x86_exceptions
10
11LTTNG_TRACEPOINT_EVENT_CLASS(x86_exceptions_class,
12
13 TP_PROTO(unsigned long address, struct pt_regs *regs,
14 unsigned long error_code),
15
16 TP_ARGS(address, regs, error_code),
17
18 TP_FIELDS(
19 ctf_integer_hex(unsigned long, address, address)
20 ctf_integer_hex(unsigned long, ip, regs->ip)
21 /*
22 * Note: we cast error_code from unsigned long
23 * to unsigned char to save space in the trace.
24 * Currently, only 5 low bits are used. Should be made
25 * larger if error codes are added to the kernel.
26 */
27 ctf_integer_hex(unsigned char, error_code, error_code)
28 )
29)
30
31#define LTTNG_EXCEPTIONS_TRACEPOINT_EVENT_INSTANCE_MAP(name, map) \
32LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(x86_exceptions_class, \
33 name, \
34 map, \
35 TP_PROTO(unsigned long address, struct pt_regs *regs, \
36 unsigned long error_code), \
37 TP_ARGS(address, regs, error_code) \
38)
39
40LTTNG_EXCEPTIONS_TRACEPOINT_EVENT_INSTANCE_MAP(page_fault_user,
41 x86_exceptions_page_fault_user)
42LTTNG_EXCEPTIONS_TRACEPOINT_EVENT_INSTANCE_MAP(page_fault_kernel,
43 x86_exceptions_page_fault_kernel)
44
45#endif /* LTTNG_TRACE_EXCEPTIONS_H */
46
47#undef TRACE_INCLUDE_PATH
c075712b 48#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module/arch/x86
da0f6c58
MD
49#undef TRACE_INCLUDE_FILE
50#define TRACE_INCLUDE_FILE exceptions
51
52/* This part must be outside protection */
3b4aafcb 53#include <lttng/define_trace.h>
This page took 0.031473 seconds and 4 git commands to generate.