aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/syscall.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-09-11 23:35:13 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-11 23:35:13 -0400
commitcabc5c0f7fa1342049042d6e147db5a73773955b (patch)
tree2be09ae1777d580c7dfe05d6d5b76e57281ec447 /include/trace/syscall.h
parentb73d884756303316ead4cd7dad51236b2a515a1a (diff)
parent86d710146fb9975f04c505ec78caa43d227c1018 (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts: arch/sparc/Kconfig
Diffstat (limited to 'include/trace/syscall.h')
-rw-r--r--include/trace/syscall.h48
1 files changed, 38 insertions, 10 deletions
diff --git a/include/trace/syscall.h b/include/trace/syscall.h
index 8cfe515cbc47..5dc283ba5ae0 100644
--- a/include/trace/syscall.h
+++ b/include/trace/syscall.h
@@ -1,8 +1,13 @@
1#ifndef _TRACE_SYSCALL_H 1#ifndef _TRACE_SYSCALL_H
2#define _TRACE_SYSCALL_H 2#define _TRACE_SYSCALL_H
3 3
4#include <linux/tracepoint.h>
5#include <linux/unistd.h>
6#include <linux/ftrace_event.h>
7
4#include <asm/ptrace.h> 8#include <asm/ptrace.h>
5 9
10
6/* 11/*
7 * A syscall entry in the ftrace syscalls array. 12 * A syscall entry in the ftrace syscalls array.
8 * 13 *
@@ -10,26 +15,49 @@
10 * @nb_args: number of parameters it takes 15 * @nb_args: number of parameters it takes
11 * @types: list of types as strings 16 * @types: list of types as strings
12 * @args: list of args as strings (args[i] matches types[i]) 17 * @args: list of args as strings (args[i] matches types[i])
18 * @enter_id: associated ftrace enter event id
19 * @exit_id: associated ftrace exit event id
20 * @enter_event: associated syscall_enter trace event
21 * @exit_event: associated syscall_exit trace event
13 */ 22 */
14struct syscall_metadata { 23struct syscall_metadata {
15 const char *name; 24 const char *name;
16 int nb_args; 25 int nb_args;
17 const char **types; 26 const char **types;
18 const char **args; 27 const char **args;
28 int enter_id;
29 int exit_id;
30
31 struct ftrace_event_call *enter_event;
32 struct ftrace_event_call *exit_event;
19}; 33};
20 34
21#ifdef CONFIG_FTRACE_SYSCALLS 35#ifdef CONFIG_FTRACE_SYSCALLS
22extern void arch_init_ftrace_syscalls(void);
23extern struct syscall_metadata *syscall_nr_to_meta(int nr); 36extern struct syscall_metadata *syscall_nr_to_meta(int nr);
24extern void start_ftrace_syscalls(void); 37extern int syscall_name_to_nr(char *name);
25extern void stop_ftrace_syscalls(void); 38void set_syscall_enter_id(int num, int id);
26extern void ftrace_syscall_enter(struct pt_regs *regs); 39void set_syscall_exit_id(int num, int id);
27extern void ftrace_syscall_exit(struct pt_regs *regs); 40extern struct trace_event event_syscall_enter;
28#else 41extern struct trace_event event_syscall_exit;
29static inline void start_ftrace_syscalls(void) { } 42extern int reg_event_syscall_enter(void *ptr);
30static inline void stop_ftrace_syscalls(void) { } 43extern void unreg_event_syscall_enter(void *ptr);
31static inline void ftrace_syscall_enter(struct pt_regs *regs) { } 44extern int reg_event_syscall_exit(void *ptr);
32static inline void ftrace_syscall_exit(struct pt_regs *regs) { } 45extern void unreg_event_syscall_exit(void *ptr);
46extern int syscall_enter_format(struct ftrace_event_call *call,
47 struct trace_seq *s);
48extern int syscall_exit_format(struct ftrace_event_call *call,
49 struct trace_seq *s);
50extern int syscall_enter_define_fields(struct ftrace_event_call *call);
51extern int syscall_exit_define_fields(struct ftrace_event_call *call);
52enum print_line_t print_syscall_enter(struct trace_iterator *iter, int flags);
53enum print_line_t print_syscall_exit(struct trace_iterator *iter, int flags);
54#endif
55#ifdef CONFIG_EVENT_PROFILE
56int reg_prof_syscall_enter(char *name);
57void unreg_prof_syscall_enter(char *name);
58int reg_prof_syscall_exit(char *name);
59void unreg_prof_syscall_exit(char *name);
60
33#endif 61#endif
34 62
35#endif /* _TRACE_SYSCALL_H */ 63#endif /* _TRACE_SYSCALL_H */