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