Implement event notifiers for syscalls
[lttng-modules.git] / include / instrumentation / syscalls / headers / syscalls_unknown.h
... / ...
CommitLineData
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
14LTTNG_TRACEPOINT_EVENT(syscall_entry_unknown,
15 TP_PROTO(int id, unsigned long *args),
16 TP_ARGS(id, args),
17 TP_FIELDS(
18 ctf_integer(int, id, id)
19 ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
20 )
21)
22LTTNG_TRACEPOINT_EVENT(compat_syscall_entry_unknown,
23 TP_PROTO(int id, unsigned long *args),
24 TP_ARGS(id, args),
25 TP_FIELDS(
26 ctf_integer(int, id, id)
27 ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
28 )
29)
30
31#undef TP_PROBE_CB
32#define TP_PROBE_CB(_template) &syscall_entry_event_notifier_probe
33
34LTTNG_TRACEPOINT_EVENT(syscall_notifier_entry_unknown,
35 TP_PROTO(int id, unsigned long *args),
36 TP_ARGS(id, args),
37 TP_FIELDS(
38 ctf_integer(int, id, id)
39 ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
40 )
41)
42LTTNG_TRACEPOINT_EVENT(compat_syscall_notifier_entry_unknown,
43 TP_PROTO(int id, unsigned long *args),
44 TP_ARGS(id, args),
45 TP_FIELDS(
46 ctf_integer(int, id, id)
47 ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
48 )
49)
50
51#undef TP_PROBE_CB
52#define TP_PROBE_CB(_template) &syscall_exit_event_probe
53
54LTTNG_TRACEPOINT_EVENT(syscall_exit_unknown,
55 TP_PROTO(int id, long ret, unsigned long *args),
56 TP_ARGS(id, ret, args),
57 TP_FIELDS(
58 ctf_integer(int, id, id)
59 ctf_integer(long, ret, ret)
60 ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
61 )
62)
63LTTNG_TRACEPOINT_EVENT(compat_syscall_exit_unknown,
64 TP_PROTO(int id, long ret, unsigned long *args),
65 TP_ARGS(id, ret, args),
66 TP_FIELDS(
67 ctf_integer(int, id, id)
68 ctf_integer(long, ret, ret)
69 ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
70 )
71)
72#endif /* _TRACE_SYSCALLS_UNKNOWN_H */
73
74/* This part must be outside protection */
75#include <lttng/define_trace.h>
This page took 0.030711 seconds and 4 git commands to generate.