Implement event notifiers for syscalls
[lttng-modules.git] / include / instrumentation / syscalls / headers / syscalls_unknown.h
1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
2
3 #if !defined(_TRACE_SYSCALLS_UNKNOWN_H) || defined(TRACE_HEADER_MULTI_READ)
4 #define _TRACE_SYSCALLS_UNKNOWN_H
5
6 #include <lttng/tracepoint-event.h>
7 #include <linux/syscalls.h>
8
9 #define UNKNOWN_SYSCALL_NRARGS 6
10
11 #undef TP_PROBE_CB
12 #define TP_PROBE_CB(_template) &syscall_entry_event_probe
13
14 #undef TP_EVENT_NOTIFIER_PROBE_CB
15 #define TP_EVENT_NOTIFIER_PROBE_CB(_template) &syscall_entry_event_notifier_probe
16
17 LTTNG_TRACEPOINT_EVENT(syscall_entry_unknown,
18 TP_PROTO(int id, unsigned long *args),
19 TP_ARGS(id, args),
20 TP_FIELDS(
21 ctf_integer(int, id, id)
22 ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
23 )
24 )
25 LTTNG_TRACEPOINT_EVENT(compat_syscall_entry_unknown,
26 TP_PROTO(int id, unsigned long *args),
27 TP_ARGS(id, args),
28 TP_FIELDS(
29 ctf_integer(int, id, id)
30 ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
31 )
32 )
33
34 #undef TP_PROBE_CB
35 #define TP_PROBE_CB(_template) &syscall_exit_event_probe
36 #undef TP_EVENT_NOTIFIER_PROBE_CB
37 #define TP_EVENT_NOTIFIER_PROBE_CB(_template) &syscall_exit_event_notifier_probe
38
39 LTTNG_TRACEPOINT_EVENT(syscall_exit_unknown,
40 TP_PROTO(int id, long ret, unsigned long *args),
41 TP_ARGS(id, ret, args),
42 TP_FIELDS(
43 ctf_integer(int, id, id)
44 ctf_integer(long, ret, ret)
45 ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
46 )
47 )
48 LTTNG_TRACEPOINT_EVENT(compat_syscall_exit_unknown,
49 TP_PROTO(int id, long ret, unsigned long *args),
50 TP_ARGS(id, ret, args),
51 TP_FIELDS(
52 ctf_integer(int, id, id)
53 ctf_integer(long, ret, ret)
54 ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
55 )
56 )
57 #endif /* _TRACE_SYSCALLS_UNKNOWN_H */
58
59 /* This part must be outside protection */
60 #include <lttng/define_trace.h>
This page took 0.030714 seconds and 4 git commands to generate.