syscall.h 1017 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _TRACE_SYSCALL_H
  2. #define _TRACE_SYSCALL_H
  3. #include <asm/ptrace.h>
  4. /*
  5. * A syscall entry in the ftrace syscalls array.
  6. *
  7. * @name: name of the syscall
  8. * @nb_args: number of parameters it takes
  9. * @types: list of types as strings
  10. * @args: list of args as strings (args[i] matches types[i])
  11. */
  12. struct syscall_metadata {
  13. const char *name;
  14. int nb_args;
  15. const char **types;
  16. const char **args;
  17. };
  18. #ifdef CONFIG_FTRACE_SYSCALLS
  19. extern void arch_init_ftrace_syscalls(void);
  20. extern struct syscall_metadata *syscall_nr_to_meta(int nr);
  21. extern void start_ftrace_syscalls(void);
  22. extern void stop_ftrace_syscalls(void);
  23. extern void ftrace_syscall_enter(struct pt_regs *regs);
  24. extern void ftrace_syscall_exit(struct pt_regs *regs);
  25. #else
  26. static inline void start_ftrace_syscalls(void) { }
  27. static inline void stop_ftrace_syscalls(void) { }
  28. static inline void ftrace_syscall_enter(struct pt_regs *regs) { }
  29. static inline void ftrace_syscall_exit(struct pt_regs *regs) { }
  30. #endif
  31. #endif /* _TRACE_SYSCALL_H */