diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2009-12-01 03:23:36 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-01 11:33:29 -0500 |
commit | fcc19438dda38dacc8c144e2db3ebc6b9fd4f8b8 (patch) | |
tree | 0f82cd0ce19bc113e2ba631c14f2e8c04884d608 /kernel/trace/trace_syscalls.c | |
parent | 31c16b13349970b2684248c7d8608d2a96ae135d (diff) |
trace_syscalls: Remove enter_id exit_id
use ->enter_event->id instead of ->enter_id
use ->exit_event->id instead of ->exit_id
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Jason Baron <jbaron@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4B14D288.7030001@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_syscalls.c')
-rw-r--r-- | kernel/trace/trace_syscalls.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c index 39649b1675dd..27eb18d69222 100644 --- a/kernel/trace/trace_syscalls.c +++ b/kernel/trace/trace_syscalls.c | |||
@@ -67,16 +67,6 @@ int syscall_name_to_nr(const char *name) | |||
67 | return -1; | 67 | return -1; |
68 | } | 68 | } |
69 | 69 | ||
70 | void set_syscall_enter_id(int num, int id) | ||
71 | { | ||
72 | syscalls_metadata[num]->enter_id = id; | ||
73 | } | ||
74 | |||
75 | void set_syscall_exit_id(int num, int id) | ||
76 | { | ||
77 | syscalls_metadata[num]->exit_id = id; | ||
78 | } | ||
79 | |||
80 | enum print_line_t | 70 | enum print_line_t |
81 | print_syscall_enter(struct trace_iterator *iter, int flags) | 71 | print_syscall_enter(struct trace_iterator *iter, int flags) |
82 | { | 72 | { |
@@ -93,7 +83,7 @@ print_syscall_enter(struct trace_iterator *iter, int flags) | |||
93 | if (!entry) | 83 | if (!entry) |
94 | goto end; | 84 | goto end; |
95 | 85 | ||
96 | if (entry->enter_id != ent->type) { | 86 | if (entry->enter_event->id != ent->type) { |
97 | WARN_ON_ONCE(1); | 87 | WARN_ON_ONCE(1); |
98 | goto end; | 88 | goto end; |
99 | } | 89 | } |
@@ -148,7 +138,7 @@ print_syscall_exit(struct trace_iterator *iter, int flags) | |||
148 | return TRACE_TYPE_HANDLED; | 138 | return TRACE_TYPE_HANDLED; |
149 | } | 139 | } |
150 | 140 | ||
151 | if (entry->exit_id != ent->type) { | 141 | if (entry->exit_event->id != ent->type) { |
152 | WARN_ON_ONCE(1); | 142 | WARN_ON_ONCE(1); |
153 | return TRACE_TYPE_UNHANDLED; | 143 | return TRACE_TYPE_UNHANDLED; |
154 | } | 144 | } |
@@ -302,8 +292,8 @@ void ftrace_syscall_enter(struct pt_regs *regs, long id) | |||
302 | 292 | ||
303 | size = sizeof(*entry) + sizeof(unsigned long) * sys_data->nb_args; | 293 | size = sizeof(*entry) + sizeof(unsigned long) * sys_data->nb_args; |
304 | 294 | ||
305 | event = trace_current_buffer_lock_reserve(&buffer, sys_data->enter_id, | 295 | event = trace_current_buffer_lock_reserve(&buffer, |
306 | size, 0, 0); | 296 | sys_data->enter_event->id, size, 0, 0); |
307 | if (!event) | 297 | if (!event) |
308 | return; | 298 | return; |
309 | 299 | ||
@@ -334,8 +324,8 @@ void ftrace_syscall_exit(struct pt_regs *regs, long ret) | |||
334 | if (!sys_data) | 324 | if (!sys_data) |
335 | return; | 325 | return; |
336 | 326 | ||
337 | event = trace_current_buffer_lock_reserve(&buffer, sys_data->exit_id, | 327 | event = trace_current_buffer_lock_reserve(&buffer, |
338 | sizeof(*entry), 0, 0); | 328 | sys_data->exit_event->id, sizeof(*entry), 0, 0); |
339 | if (!event) | 329 | if (!event) |
340 | return; | 330 | return; |
341 | 331 | ||
@@ -510,11 +500,11 @@ static void prof_syscall_enter(struct pt_regs *regs, long id) | |||
510 | 500 | ||
511 | rec = (struct syscall_trace_enter *) raw_data; | 501 | rec = (struct syscall_trace_enter *) raw_data; |
512 | tracing_generic_entry_update(&rec->ent, 0, 0); | 502 | tracing_generic_entry_update(&rec->ent, 0, 0); |
513 | rec->ent.type = sys_data->enter_id; | 503 | rec->ent.type = sys_data->enter_event->id; |
514 | rec->nr = syscall_nr; | 504 | rec->nr = syscall_nr; |
515 | syscall_get_arguments(current, regs, 0, sys_data->nb_args, | 505 | syscall_get_arguments(current, regs, 0, sys_data->nb_args, |
516 | (unsigned long *)&rec->args); | 506 | (unsigned long *)&rec->args); |
517 | perf_tp_event(sys_data->enter_id, 0, 1, rec, size); | 507 | perf_tp_event(sys_data->enter_event->id, 0, 1, rec, size); |
518 | 508 | ||
519 | end: | 509 | end: |
520 | perf_swevent_put_recursion_context(rctx); | 510 | perf_swevent_put_recursion_context(rctx); |
@@ -615,11 +605,11 @@ static void prof_syscall_exit(struct pt_regs *regs, long ret) | |||
615 | rec = (struct syscall_trace_exit *)raw_data; | 605 | rec = (struct syscall_trace_exit *)raw_data; |
616 | 606 | ||
617 | tracing_generic_entry_update(&rec->ent, 0, 0); | 607 | tracing_generic_entry_update(&rec->ent, 0, 0); |
618 | rec->ent.type = sys_data->exit_id; | 608 | rec->ent.type = sys_data->exit_event->id; |
619 | rec->nr = syscall_nr; | 609 | rec->nr = syscall_nr; |
620 | rec->ret = syscall_get_return_value(current, regs); | 610 | rec->ret = syscall_get_return_value(current, regs); |
621 | 611 | ||
622 | perf_tp_event(sys_data->exit_id, 0, 1, rec, size); | 612 | perf_tp_event(sys_data->exit_event->id, 0, 1, rec, size); |
623 | 613 | ||
624 | end: | 614 | end: |
625 | perf_swevent_put_recursion_context(rctx); | 615 | perf_swevent_put_recursion_context(rctx); |