Cleanup: Remove deprecated TODO file
[lttng-modules.git] / instrumentation / syscalls / headers / syscalls_unknown.h
index ad39e2d329eedc1957e0a1f8bcf0049fdfdadd55..79939c80ca89a70ac0a80ddac8d8351e193782e6 100644 (file)
@@ -1,45 +1,55 @@
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM syscalls_unknown
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
 
 #if !defined(_TRACE_SYSCALLS_UNKNOWN_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_SYSCALLS_UNKNOWN_H
 
-#include <linux/tracepoint.h>
+#include <lttng/tracepoint-event.h>
 #include <linux/syscalls.h>
 
 #define UNKNOWN_SYSCALL_NRARGS 6
 
-TRACE_EVENT(sys_unknown,
-       TP_PROTO(unsigned int id, unsigned long *args),
+#undef TP_PROBE_CB
+#define TP_PROBE_CB(_template)          &syscall_entry_probe
+
+LTTNG_TRACEPOINT_EVENT(syscall_entry_unknown,
+       TP_PROTO(int id, unsigned long *args),
        TP_ARGS(id, args),
-       TP_STRUCT__entry(
-               __field(unsigned int, id)
-               __array(unsigned long, args, UNKNOWN_SYSCALL_NRARGS)
-       ),
-       TP_fast_assign(
-               tp_assign(id, id)
-               tp_memcpy(args, args, UNKNOWN_SYSCALL_NRARGS * sizeof(*args))
-       ),
-       TP_printk()
+       TP_FIELDS(
+               ctf_integer(int, id, id)
+               ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
+       )
 )
-/* 
- * This is going to hook on sys_exit in the kernel.
- * We change the name so we don't clash with the sys_exit syscall entry
- * event.
- */
-TRACE_EVENT(exit_syscall,
-       TP_PROTO(long errno),
-       TP_ARGS(errno),
-       TP_STRUCT__entry(
-               __field(long, errno)
-       ),
-       TP_fast_assign(
-               tp_assign(errno, errno)
-       ),
-       TP_printk()
+LTTNG_TRACEPOINT_EVENT(compat_syscall_entry_unknown,
+       TP_PROTO(int id, unsigned long *args),
+       TP_ARGS(id, args),
+       TP_FIELDS(
+               ctf_integer(int, id, id)
+               ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
+       )
 )
 
+#undef TP_PROBE_CB
+#define TP_PROBE_CB(_template)          &syscall_exit_probe
+
+LTTNG_TRACEPOINT_EVENT(syscall_exit_unknown,
+       TP_PROTO(int id, long ret, unsigned long *args),
+       TP_ARGS(id, ret, args),
+       TP_FIELDS(
+               ctf_integer(int, id, id)
+               ctf_integer(long, ret, ret)
+               ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
+       )
+)
+LTTNG_TRACEPOINT_EVENT(compat_syscall_exit_unknown,
+       TP_PROTO(int id, long ret, unsigned long *args),
+       TP_ARGS(id, ret, args),
+       TP_FIELDS(
+               ctf_integer(int, id, id)
+               ctf_integer(long, ret, ret)
+               ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS)
+       )
+)
 #endif /*  _TRACE_SYSCALLS_UNKNOWN_H */
 
 /* This part must be outside protection */
-#include "../../../probes/define_trace.h"
+#include <lttng/define_trace.h>
This page took 0.024052 seconds and 4 git commands to generate.