0001
0002 #ifndef _TRACE_SYSCALL_H
0003 #define _TRACE_SYSCALL_H
0004
0005 #include <linux/tracepoint.h>
0006 #include <linux/unistd.h>
0007 #include <linux/trace_events.h>
0008 #include <linux/thread_info.h>
0009
0010 #include <asm/ptrace.h>
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 struct syscall_metadata {
0026 const char *name;
0027 int syscall_nr;
0028 int nb_args;
0029 const char **types;
0030 const char **args;
0031 struct list_head enter_fields;
0032
0033 struct trace_event_call *enter_event;
0034 struct trace_event_call *exit_event;
0035 };
0036
0037 #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
0038 static inline void syscall_tracepoint_update(struct task_struct *p)
0039 {
0040 if (test_syscall_work(SYSCALL_TRACEPOINT))
0041 set_task_syscall_work(p, SYSCALL_TRACEPOINT);
0042 else
0043 clear_task_syscall_work(p, SYSCALL_TRACEPOINT);
0044 }
0045 #else
0046 static inline void syscall_tracepoint_update(struct task_struct *p)
0047 {
0048 }
0049 #endif
0050
0051 #endif