diff options
author | Jason Baron <jbaron@redhat.com> | 2009-08-10 16:52:53 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-11 14:35:28 -0400 |
commit | 64c12e0444fcc6b75eb49144ba46d43dbdc6bc8f (patch) | |
tree | 8fe7b546fe787061fca8f97ed2051f40f9b16a57 /include/trace | |
parent | fb34a08c3469b2be9eae626ccb96476b4687b810 (diff) |
tracing: Add individual syscalls tracepoint id support
The current state of syscalls tracepoints generates only one event id
for every syscall events.
This patch associates an id with each syscall trace event, so that we
can identify each syscall trace event using the 'perf' tool.
Signed-off-by: Jason Baron <jbaron@redhat.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Jiaying Zhang <jiayingz@google.com>
Cc: Martin Bligh <mbligh@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/syscall.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/trace/syscall.h b/include/trace/syscall.h index 73fb8b4a9955..df628404241a 100644 --- a/include/trace/syscall.h +++ b/include/trace/syscall.h | |||
@@ -32,23 +32,31 @@ DECLARE_TRACE_WITH_CALLBACK(syscall_exit, | |||
32 | * @nb_args: number of parameters it takes | 32 | * @nb_args: number of parameters it takes |
33 | * @types: list of types as strings | 33 | * @types: list of types as strings |
34 | * @args: list of args as strings (args[i] matches types[i]) | 34 | * @args: list of args as strings (args[i] matches types[i]) |
35 | * @enter_id: associated ftrace enter event id | ||
36 | * @exit_id: associated ftrace exit event id | ||
35 | */ | 37 | */ |
36 | struct syscall_metadata { | 38 | struct syscall_metadata { |
37 | const char *name; | 39 | const char *name; |
38 | int nb_args; | 40 | int nb_args; |
39 | const char **types; | 41 | const char **types; |
40 | const char **args; | 42 | const char **args; |
43 | int enter_id; | ||
44 | int exit_id; | ||
41 | }; | 45 | }; |
42 | 46 | ||
43 | #ifdef CONFIG_FTRACE_SYSCALLS | 47 | #ifdef CONFIG_FTRACE_SYSCALLS |
44 | extern struct syscall_metadata *syscall_nr_to_meta(int nr); | 48 | extern struct syscall_metadata *syscall_nr_to_meta(int nr); |
45 | extern int syscall_name_to_nr(char *name); | 49 | extern int syscall_name_to_nr(char *name); |
50 | void set_syscall_enter_id(int num, int id); | ||
51 | void set_syscall_exit_id(int num, int id); | ||
46 | extern struct trace_event event_syscall_enter; | 52 | extern struct trace_event event_syscall_enter; |
47 | extern struct trace_event event_syscall_exit; | 53 | extern struct trace_event event_syscall_exit; |
48 | extern int reg_event_syscall_enter(void *ptr); | 54 | extern int reg_event_syscall_enter(void *ptr); |
49 | extern void unreg_event_syscall_enter(void *ptr); | 55 | extern void unreg_event_syscall_enter(void *ptr); |
50 | extern int reg_event_syscall_exit(void *ptr); | 56 | extern int reg_event_syscall_exit(void *ptr); |
51 | extern void unreg_event_syscall_exit(void *ptr); | 57 | extern void unreg_event_syscall_exit(void *ptr); |
58 | enum print_line_t print_syscall_enter(struct trace_iterator *iter, int flags); | ||
59 | enum print_line_t print_syscall_exit(struct trace_iterator *iter, int flags); | ||
52 | #endif | 60 | #endif |
53 | 61 | ||
54 | #endif /* _TRACE_SYSCALL_H */ | 62 | #endif /* _TRACE_SYSCALL_H */ |