aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_syscalls.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-04-23 10:38:03 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-05-14 14:33:15 -0400
commit32c0edaeaad74a7883e736ae0f3798784cfc2a80 (patch)
treee70784ed690172cb0f1b4365b93aa077d40219c9 /kernel/trace/trace_syscalls.c
parent80decc70afc57c87eee9d6b836aec2ecacba3457 (diff)
tracing: Remove duplicate id information in event structure
Now that the trace_event structure is embedded in the ftrace_event_call structure, there is no need for the ftrace_event_call id field. The id field is the same as the trace_event type field. Removing the id and re-arranging the structure brings down the tracepoint footprint by another 5K. text data bss dec hex filename 4913961 1088356 861512 6863829 68bbd5 vmlinux.orig 4895024 1023812 861512 6780348 6775bc vmlinux.print 4894944 1018052 861512 6774508 675eec vmlinux.id Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Acked-by: Masami Hiramatsu <mhiramat@redhat.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_syscalls.c')
-rw-r--r--kernel/trace/trace_syscalls.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index 7c7cfe95a853..9d358301ae3e 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -117,7 +117,7 @@ print_syscall_enter(struct trace_iterator *iter, int flags,
117 if (!entry) 117 if (!entry)
118 goto end; 118 goto end;
119 119
120 if (entry->enter_event->id != ent->type) { 120 if (entry->enter_event->event.type != ent->type) {
121 WARN_ON_ONCE(1); 121 WARN_ON_ONCE(1);
122 goto end; 122 goto end;
123 } 123 }
@@ -173,7 +173,7 @@ print_syscall_exit(struct trace_iterator *iter, int flags,
173 return TRACE_TYPE_HANDLED; 173 return TRACE_TYPE_HANDLED;
174 } 174 }
175 175
176 if (entry->exit_event->id != ent->type) { 176 if (entry->exit_event->event.type != ent->type) {
177 WARN_ON_ONCE(1); 177 WARN_ON_ONCE(1);
178 return TRACE_TYPE_UNHANDLED; 178 return TRACE_TYPE_UNHANDLED;
179 } 179 }
@@ -315,7 +315,7 @@ void ftrace_syscall_enter(void *ignore, struct pt_regs *regs, long id)
315 size = sizeof(*entry) + sizeof(unsigned long) * sys_data->nb_args; 315 size = sizeof(*entry) + sizeof(unsigned long) * sys_data->nb_args;
316 316
317 event = trace_current_buffer_lock_reserve(&buffer, 317 event = trace_current_buffer_lock_reserve(&buffer,
318 sys_data->enter_event->id, size, 0, 0); 318 sys_data->enter_event->event.type, size, 0, 0);
319 if (!event) 319 if (!event)
320 return; 320 return;
321 321
@@ -347,7 +347,7 @@ void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
347 return; 347 return;
348 348
349 event = trace_current_buffer_lock_reserve(&buffer, 349 event = trace_current_buffer_lock_reserve(&buffer,
350 sys_data->exit_event->id, sizeof(*entry), 0, 0); 350 sys_data->exit_event->event.type, sizeof(*entry), 0, 0);
351 if (!event) 351 if (!event)
352 return; 352 return;
353 353
@@ -511,7 +511,8 @@ static void perf_syscall_enter(void *ignore, struct pt_regs *regs, long id)
511 return; 511 return;
512 512
513 rec = (struct syscall_trace_enter *)perf_trace_buf_prepare(size, 513 rec = (struct syscall_trace_enter *)perf_trace_buf_prepare(size,
514 sys_data->enter_event->id, &rctx, &flags); 514 sys_data->enter_event->event.type,
515 &rctx, &flags);
515 if (!rec) 516 if (!rec)
516 return; 517 return;
517 518
@@ -586,7 +587,8 @@ static void perf_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
586 return; 587 return;
587 588
588 rec = (struct syscall_trace_exit *)perf_trace_buf_prepare(size, 589 rec = (struct syscall_trace_exit *)perf_trace_buf_prepare(size,
589 sys_data->exit_event->id, &rctx, &flags); 590 sys_data->exit_event->event.type,
591 &rctx, &flags);
590 if (!rec) 592 if (!rec)
591 return; 593 return;
592 594